Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
about a file
#1
ok i had the file found for what i am doing but i lost the file and dont remember which one it was Tongue

it is the file that has all the case in it for the tht to go into the databases and get the posts of the username for the hosting packages

so if someone could help me out i would like it Big Grin
[Image: tv.png]
Reply
#2
Are you looking for:
Code:
includes/types/p2h.php
Wink
Kevin Mark - TheHostingTool Lead Developer
Reply
#3
hmmm i looked in there but i must have looked over what i was looking for hehe

i am good at doing that lol
ok i am working on the coding and as i am looking at the other ones that is listed they use a salt but with this php fusion it uses a double md5 hash

md5(md5('password'))

and i am trying to get the part coded where it checks in the sign up part and i have got some of it coded and i am stuck on how to add this double md5 hash in

but here is what i go so far done

Code:
            case "php fusion":
                $result = mysql_query("select * from `{$prefix}users` where username = '{$fuser}'", $this->con);
                if(mysql_num_rows($result) == "0") {
                    return 3;
                }
                else {
                    $member = mysql_fetch_array($result);
                    if(md5

i know it isnt much but i am trying and i got stuck Sad
[Image: tv.png]
Reply
#4
You need to also edit the signup and the monthly posts and the acp page so it adds php fusion in the first place. Are you sure your able to do this?

With the code above, check the password as you started doing. It password is right, check the posts.
Jonny H - THT Main Developer & Founder


Reply
#5
this is the part i am talking about where i am stuck on

this is from the aef and part of the check sign up code

Code:
                    $member = mysql_fetch_array($result);
                    if(md5($member['salt'] . $fpass) == $member['password']) {
                        if($member['posts'] >= $signup) {
                            return 1;

what i am lost is where it does the

Code:
if(md5($member['salt'] . $fpass) == $member['password'])

b/c php fusion dont use the salt

so would i just replace the salt with md5 ?
[Image: tv.png]
Reply
#6
Yes, so...
PHP Code:
if(md5($member['salt'] . $fpass) == $member['password']) 
Might become...
PHP Code:
if(md5(md5($fpass)) == $member['password']) 
Kevin Mark - TheHostingTool Lead Developer
Reply
#7
ok thanks kevin i will try it and see if i can get it to work then and will post back on it Big Grin



ok for some reason i am getting an error in the case

Parse error: syntax error, unexpected T_CASE in /home/post/public_html/client/includes/types/p2h.php on line 431

this is line 431

Code:
case "fusion":
[Image: tv.png]
Reply
#8
It's probably a syntax error on the line before 431. Can you post what you have before that?
Kevin Mark - TheHostingTool Lead Developer
Reply
#9
ok i got that error fixed i didnt see it at the time but at the break above the code it was missing the ";"

but now i got it working i am trying to make a client account and it is saying i dont have the 10 posts for it so i am going to post what i have got made and see what you think about it

plus i will post the info for the database like how the username is set up the way to find the member id in the posts in the database

ok here is the code for the monthly check

Code:
            case "fusion":
                $n = 0;
                $forumuser = $fuser;
                $result = mysql_query("SELECT * FROM `{$prefix}users` WHERE user_name = '{$fuser}'", $this->con);
                $mem = mysql_fetch_array($result);
                $select = mysql_query("SELECT * FROM {$prefix}posts WHERE `post_author` = '{$mem['id']}'", $this->con);
                
                while($data2 = mysql_fetch_array($select)) {
                    $date = explode(":", strftime("%m:%y" ,$data2['ptime']));
                    if($nmonth <= $date[0] && $nyear <= $date[1]) {
                        $n++;
                    }
                }
                break;

and then here is the code for for the check sign up

Code:
            case "fusion":
                $result = mysql_query("select * from `{$prefix}users` where user_name = '{$fuser}'", $this->con);
                if(mysql_num_rows($result) == "0") {
                    return 3;
                }
                else {
                    $member = mysql_fetch_array($result);
                    if(md5(md5($fpass)) == $member['password']) {
                        if($member['posts'] >= $signup) {
                            return 1;
                        }
                        else {
                            return 0;
                        }
                    }
                    else {
                        return array('true' => '0', 'customerror' => '<h1>Error</h1>That forum password is incorrect!');
                    }
                }
                break;


here is a screen shot of the fusion_posts

[Image: poststuff.jpg]

here is a screen shot of the fusion_users

[Image: userstuff.jpg]
[Image: tv.png]
Reply
#10
Try this:
PHP Code:
case "fusion":
                
$result mysql_query("select * from `{$prefix}users` where user_name = '{$fuser}'"$this->con);
                if(
mysql_num_rows($result) == "0") {
                    return 
3;
                }
                else {
                    
$member mysql_fetch_array($result);
                    if(
md5(md5($fpass)) == $member['user_password']) {
                        if(
$member['posts'] >= $signup) {
                            return 
1;
                        }
                        else {
                            return 
0;
                        }
                    }
                    else {
                        return array(
'true' => '0''customerror' => '<h1>Error</h1>That forum password is incorrect!');
                    }
                }
                break; 
Kevin Mark - TheHostingTool Lead Developer
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)