Help In Online Stats PHP
#1

PHP код:
file_get_contents('ftp://[username]:[password]@87.98.216.36/scriptfiles/Users/$user'); 
87.98.216.36 = my server + ftp ip
ERROR img
code
PHP код:
<?php
if(!isset($_SESSION['Username'])&&!isset($_SESSION['Password'])&&!isset($_POST['Username']) && !isset($_POST['Password']))
{
    echo 
'<form name="form1" method="post" action="index.php">
        <strong><span style="color:black">Login</span></strong><br>
        Username: <input name="Username" type="text" id="Username"><br>
        Password: <input name="Password" type="password" id="Password"><br>
        <input type="submit" name="Submit" value="Login">
        </form>'
;
}
else
{
    require_once 
'Config/Lite.php';
    
$user['Name'] = $_SESSION['Username'].".ini";
    
file_get_contents('ftp://@87.98.216.36/scriptfiles/Users/$user');
    
$file = new Config_Lite($user['Name']);//Get INI file
    //Check If account exists
    
if (!file_exists($user['Name'])) {
    unset (
$_SESSION['Password'],$_SESSION['Username']);
    echo 
'Invalid Account name!
    <meta HTTP-EQUIV="REFRESH" content="3; url=index.php">'
;
    } else
    {
    
//GetData
    
$user['Password'] = $file->get(null'Password');
    
$user["Money"] = $file->get(null'Money');
    
$user["Score"] = $file->get(null'Score');
    
$user["Admin Level"] = $file->get(null'Admin');
    
$user["Donator"] = $file->get(null'VIP');
    
$user["skin"] = $file->get(null'Savedskin');
    
$user["ID"] = $file->get(null'ID');
    
$password1 $_SESSION['Password'];
    
//Hashing Pass..
    
$hashed hash('whirlpool'$password1);
    
//Checking Pass
    
if($user['Password'] != $hashed)
    {
    unset (
$_SESSION['Password'],$_SESSION['Username']);
    echo 
'Invalid Password, Please try again!
    <meta HTTP-EQUIV="REFRESH" content="3; url=index.php">'
;
    } else
    {
            if(!isset(
$_GET['page']))
            {
                
$_GET['page'] = 0;
            }
            
$page $_GET['page'];
            if(
$page == 0)
            {
                echo 
'<table align="center" width="80%"><TR VALIGN=TOP><td><span style="color:black">
                </td>
                <td>'
;
                echo 
'<br><img align="left" SRC="images/skins/'.$user['Skin'].'.jpg">';
                echo 
'<h1 style="color:red" align="center">Your Stats:</h1>';
                echo 
"<br><span style='color:black'><h2 align='center'>Money: ".$user['Money']."</span>";
                echo 
"<br><span style='color:black'>Score: ".$user['Score']."</span>";
                echo 
"<br><span style='color:black'>AdminLevel: ".$user['Admin']."</span>";
                echo 
"<br><span style='color:black'>VIPLevel: ".$user['VIP']."</span>";
                echo 
"<br><span style='color:black'>Skin: ".$user['Skin']."</span>";
                echo 
"<br><span style='color:black'>Registered On: ".$user['RegOn']."</span>";
                echo 
"</h2>";
                echo
'</td></tr></table>';
            } else
            if(
$page == 1)
            {
                if(!isset(
$_GET['ac']))
                {
                    
$_GET['ac'] = 0;
                }
                
$acc $_GET['ac'];
                if(
$acc == 0)
                {
                    echo 
'<h1><a href="index.php?page=1&ac=1">Change Password</a></h1>';
                } else
                if(
$acc == 1)
                {
                    if(!isset(
$_POST['password']))
                    {
                        echo 
'<center>
                        New Password: <form action="index.php?page=1&ac=1" method="post">
                        <input type="text" name="password" />
                        <input type="submit" value="Change" />
                        </form>
                        <center>'
;
                    }
                    else
                    {
                        
//Hashing Pass..
                        
$hashed hash('whirlpool'$_POST['password']);
                        
$file->set(null'Password'$hashed);//Set password
                        
$file->save();//save file
                        
echo "Your password have been changed successfully";
                        unset (
$_SESSION['Password'],$_SESSION['Username']);
                        echo 
'<br>Please Login Again, with new password!
                        <meta HTTP-EQUIV="REFRESH" content="3; url=index.php">'
;
                    }
                    }
            }
            else
            if(
$page == 2)
            {
                if(!isset(
$_POST['name']))
                {
                    echo 
'<center><br>Type the username below to generate:<br>
                    <form action="index.php?page=2" method="post">
                    <input type="text" name="name" />
                    <input type="submit" value="Show" />
                    </form>
                    <center>'
;
                }
                else
                {
                    
$user['Name'] = $_POST['name'].".ini";
                    
$file = new Config_Lite($user['Name']);//Get INI file
                    
if (!file_exists($user['Name'])) {
                    echo 
'No such user exists.
                        <meta HTTP-EQUIV="REFRESH" content="3; url=index.php?page=2">'
;
                    } else
                    {
                    
//GetData Of user.
                    
$user["Money"] = $file->get(null'Money');
                    
$user["Score"] = $file->get(null'Score');
                    
$user["Admin"] = $file->get(null'Admin');
                    
$user["VIP"] = $file->get(null'VIP');
                    
$user["Skin"] = $file->get(null'Skin');
                    
$user["ID"] = $file->get(null'ID');
                    
$user["RegOn"] = $file->get(null'RegDate');
                    
$add "images/generate.jpg";
                    
$tsrc "sig\/".$_POST['name'].".jpg";
                    
$im ImageCreateFromJPEG($add);
                    
$green imagecolorallocate($im,41,175,72);
                    
$pink imagecolorallocate($im,222,0,225);
                    
$font2 'arial.ttf';
                    
$font 'arialbd.ttf';
                    
imagettftext($im20,80 ,25$green$font,$_POST['name']);
                    
imagettftext($im10,80 ,60$pink$font,"Cash ".$user['Money']);
                    
imagettftext($im10,80 ,80$pink$font,"Score ".$user['Score']);
                    
imagettftext($im10,80 ,100$pink$font,"SkinID  ".$user['Skin']);
                    
imagettftext($im10,170 ,60$pink$font,"AdminLevel ".$user['Admin']);
                    
imagettftext($im10,170 ,80$pink$font,"VIPLevel ".$user['VIP']);
                    
imagettftext($im10,170 ,100$pink$font,"Registered On  ".$user['RegOn']);
                    
ImageJpeg($im,$tsrc);
                    echo 
"<h1 style='color:red' align='center'>".$_POST['name']."'s statics has been generated:</h1>";
                    echo 
'<center><img src="sig/'.$_POST['name'].'.jpg"></img></center>';
                    }
                    }
                }
            else
            if(
$page == 3)
            {
                if(!isset(
$_POST['name']))
                {
                    echo 
'<center><br>Type the username below:<br>
                    <form action="index.php?page=3" method="post">
                    <input type="text" name="name" />
                    <input type="submit" value="Show" />
                    </form>
                    <center>'
;
                }
                else
                {
                    
$user['Name'] = $_POST['name'].".ini";
                    
$file = new Config_Lite($user['Name']);//Get INI file
                    
if (!file_exists($user['Name'])) {
                    echo 
'No such user exists.
                        <meta HTTP-EQUIV="REFRESH" content="3; url=index.php?page=3">'
;
                    } else
                    {
                    
//GetData Of user.
                    
$user["Money"] = $file->get(null'Money');
                    
$user["Score"] = $file->get(null'Score');
                    
$user["Admin"] = $file->get(null'Admin');
                    
$user["VIP"] = $file->get(null'VIP');
                    
$user["Skin"] = $file->get(null'Skin');
                    
$user["ID"] = $file->get(null'ID');
                    
$user["RegOn"] = $file->get(null'RegDate');
                    echo 
'<table align="center" width="80%"><TR VALIGN=TOP><td><span style="color:black">
                    </td>
                    <td>'
;
                    echo 
"<h1 style='color:red' align='center'>".$_POST['name']." stats:</h1>";
                    echo 
"<span style='color:black'><h2 align='center'>Money: ".$user['Money']."</span>";
                    echo 
"<br><span style='color:black'>Score: ".$user['Score']."</span>";
                    echo 
"<br><span style='color:black'>AdminLevel: ".$user['Admin']."</span>";
                    echo 
"<br><span style='color:black'>VIPLevel: ".$user['VIP']."</span>";
                    echo 
"<br><span style='color:black'>Skin: ".$user['Skin']."</span>";
                    echo 
"<br><span style='color:black'>Registered On: ".$user['RegOn']."</span>";
                    echo 
"</h2>";
                    echo
'</td></tr></table>';
                    }
                    }
                }
            else
            if(
$page == 4)
            {
                unset (
$_SESSION['Password'],$_SESSION['Username']);
                echo 
'<span style="color:red">Logging you out...</span><meta HTTP-EQUIV="REFRESH" content="2; url=index.php">';
            }
            else
            {
                
$_GET['page'] = 0;
                echo 
'Invalid page, redirecting you to profile.
                <meta HTTP-EQUIV="REFRESH" content="2; url=index.php">'
;
            }
    }
    }
    }
?>
Reply
#2

Replace
PHP код:
file_get_contents('ftp://dmIvsI:************@87.98.216.36/scriptfiles/Users/$user'); 
with
PHP код:
file_get_contents('ftp://dmIvsI:************@87.98.216.36/scriptfiles/Users/'.$user.'.ini'); 
You need to concatenate your string, consider reading http://php.net/manual/en/language.operators.string.php

Also as I can see you're using our hosting, I highly suggest you remove those FTP details.
Reply
#3

shit ! didn't notice them :/ can u change my ftp password ?? and it didn't work too
Reply
#4

didn't work tested

PHP код:
<?php 
if(!isset($_SESSION['Username'])&&!isset($_SESSION['Password'])&&!isset($_POST['Username']) && !isset($_POST['Password'])) 

    echo 
'<form name="form1" method="post" action="index.php"> 
        <strong><span style="color:black">Login</span></strong><br> 
        Username: <input name="Username" type="text" id="Username"><br> 
        Password: <input name="Password" type="password" id="Password"><br> 
        <input type="submit" name="Submit" value="Login"> 
        </form>'


else 

    require_once 
'Config/Lite.php'
    
$login file_get_contents('ftp://dmIvsI:[password]@87.98.216.36/scriptfiles/Users/'.$user.'.ini');
    
$user['Name'] = $login;
    
$file = new Config_Lite($user['Name']);//Get INI file 

    //Check If account exists 
    
if (!file_exists($user['Name'])) {
    unset (
$_SESSION['Password'],$_SESSION['Username']); 
    echo 
'Invalid Account name! 
    <meta HTTP-EQUIV="REFRESH" content="3; url=index.php">'

    } else 
    { 
    
//GetData 
    
$user['Password'] = $file->get(null'Password'); 
    
$user["Money"] = $file->get(null'Money'); 
    
$user["Score"] = $file->get(null'Score'); 
    
$user["Admin Level"] = $file->get(null'Admin'); 
    
$user["Donator"] = $file->get(null'VIP'); 
    
$user["skin"] = $file->get(null'Savedskin'); 
    
$user["ID"] = $file->get(null'ID'); 
    
$password1 $_SESSION['Password']; 

    
//Hashing Pass.. 
    
$hashed hash('whirlpool'$password1); 
    
//Checking Pass 
    
if($user['Password'] != $hashed
    { 
    unset (
$_SESSION['Password'],$_SESSION['Username']); 
    echo 
'Invalid Password, Please try again! 
    <meta HTTP-EQUIV="REFRESH" content="3; url=index.php">'

    } else 
    { 
            if(!isset(
$_GET['page'])) 
            { 
                
$_GET['page'] = 0
            } 
            
$page $_GET['page']; 
            if(
$page == 0
            { 
                echo 
'<table align="center" width="80%"><TR VALIGN=TOP><td><span style="color:black"> 
                </td> 
                <td>'

                echo 
'<br><img align="left" SRC="images/skins/'.$user['Skin'].'.jpg">'
                echo 
'<h1 style="color:red" align="center">Your Stats:</h1>'
                echo 
"<br><span style='color:black'><h2 align='center'>Money: ".$user['Money']."</span>"
                echo 
"<br><span style='color:black'>Score: ".$user['Score']."</span>"
                echo 
"<br><span style='color:black'>AdminLevel: ".$user['Admin']."</span>"
                echo 
"<br><span style='color:black'>VIPLevel: ".$user['VIP']."</span>"
                echo 
"<br><span style='color:black'>Skin: ".$user['Skin']."</span>"
                echo 
"<br><span style='color:black'>Registered On: ".$user['RegOn']."</span>"
                echo 
"</h2>"
                echo
'</td></tr></table>'
            } else 
            if(
$page == 1
            { 
                if(!isset(
$_GET['ac'])) 
                { 
                    
$_GET['ac'] = 0
                } 
                
$acc $_GET['ac']; 
                if(
$acc == 0
                { 
                    echo 
'<h1><a href="index.php?page=1&ac=1">Change Password</a></h1>'
                } else 
                if(
$acc == 1
                { 
                    if(!isset(
$_POST['password'])) 
                    { 
                        echo 
'<center> 
                        New Password: <form action="index.php?page=1&ac=1" method="post"> 
                        <input type="text" name="password" /> 
                        <input type="submit" value="Change" /> 
                        </form> 
                        <center>'

                    } 
                    else 
                    { 
                        
//Hashing Pass.. 
                        
$hashed hash('whirlpool'$_POST['password']); 
                        
$file->set(null'Password'$hashed);//Set password 
                        
$file->save();//save file 
                        
echo "Your password have been changed successfully"
                        unset (
$_SESSION['Password'],$_SESSION['Username']); 
                        echo 
'<br>Please Login Again, with new password! 
                        <meta HTTP-EQUIV="REFRESH" content="3; url=index.php">'


                    } 
                    } 
            } 
            else 
            if(
$page == 2
            { 
                if(!isset(
$_POST['name'])) 
                { 
                    echo 
'<center><br>Type the username below to generate:<br> 
                    <form action="index.php?page=2" method="post"> 
                    <input type="text" name="name" /> 
                    <input type="submit" value="Show" /> 
                    </form> 
                    <center>'

                } 
                else 
                { 
                    
$user['Name'] = $_POST['name'].".ini"

                    
$file = new Config_Lite($user['Name']);//Get INI file 
                    
if (!file_exists($user['Name'])) { 
                    echo 
'No such user exists. 
                        <meta HTTP-EQUIV="REFRESH" content="3; url=index.php?page=2">'

                    } else 
                    { 
                    
//GetData Of user. 
                    
$user["Money"] = $file->get(null'Money'); 
                    
$user["Score"] = $file->get(null'Score'); 
                    
$user["Admin"] = $file->get(null'Admin'); 
                    
$user["VIP"] = $file->get(null'VIP'); 
                    
$user["Skin"] = $file->get(null'Skin'); 
                    
$user["ID"] = $file->get(null'ID'); 
                    
$user["RegOn"] = $file->get(null'RegDate'); 

                    
$add "images/generate.jpg"
                    
$tsrc "sig\/".$_POST['name'].".jpg"
                    
$im ImageCreateFromJPEG($add); 
                    
$green imagecolorallocate($im,41,175,72); 
                    
$pink imagecolorallocate($im,222,0,225); 
                    
$font2 'arial.ttf'
                    
$font 'arialbd.ttf'
                    
imagettftext($im20,80 ,25$green$font,$_POST['name']); 
                    
imagettftext($im10,80 ,60$pink$font,"Cash ".$user['Money']); 
                    
imagettftext($im10,80 ,80$pink$font,"Score ".$user['Score']); 
                    
imagettftext($im10,80 ,100$pink$font,"SkinID  ".$user['Skin']); 

                    
imagettftext($im10,170 ,60$pink$font,"AdminLevel ".$user['Admin']); 
                    
imagettftext($im10,170 ,80$pink$font,"VIPLevel ".$user['VIP']); 
                    
imagettftext($im10,170 ,100$pink$font,"Registered On  ".$user['RegOn']); 
                    
ImageJpeg($im,$tsrc); 
                    echo 
"<h1 style='color:red' align='center'>".$_POST['name']."'s statics has been generated:</h1>"
                    echo 
'<center><img src="sig/'.$_POST['name'].'.jpg"></img></center>'
                    } 
                    } 
                } 
            else 
            if(
$page == 3
            { 
                if(!isset(
$_POST['name'])) 
                { 
                    echo 
'<center><br>Type the username below:<br> 
                    <form action="index.php?page=3" method="post"> 
                    <input type="text" name="name" /> 
                    <input type="submit" value="Show" /> 
                    </form> 
                    <center>'

                } 
                else 
                { 
                    
$user['Name'] = $_POST['name'].".ini"

                    
$file = new Config_Lite($user['Name']);//Get INI file 
                    
if (!file_exists($user['Name'])) { 
                    echo 
'No such user exists. 
                        <meta HTTP-EQUIV="REFRESH" content="3; url=index.php?page=3">'

                    } else 
                    { 
                    
//GetData Of user. 
                    
$user["Money"] = $file->get(null'Money'); 
                    
$user["Score"] = $file->get(null'Score'); 
                    
$user["Admin"] = $file->get(null'Admin'); 
                    
$user["VIP"] = $file->get(null'VIP'); 
                    
$user["Skin"] = $file->get(null'Skin'); 
                    
$user["ID"] = $file->get(null'ID'); 
                    
$user["RegOn"] = $file->get(null'RegDate'); 

                    echo 
'<table align="center" width="80%"><TR VALIGN=TOP><td><span style="color:black"> 
                    </td> 
                    <td>'

                    echo 
"<h1 style='color:red' align='center'>".$_POST['name']." stats:</h1>"
                    echo 
"<span style='color:black'><h2 align='center'>Money: ".$user['Money']."</span>"
                    echo 
"<br><span style='color:black'>Score: ".$user['Score']."</span>"
                    echo 
"<br><span style='color:black'>AdminLevel: ".$user['Admin']."</span>"
                    echo 
"<br><span style='color:black'>VIPLevel: ".$user['VIP']."</span>"
                    echo 
"<br><span style='color:black'>Skin: ".$user['Skin']."</span>"
                    echo 
"<br><span style='color:black'>Registered On: ".$user['RegOn']."</span>"
                    echo 
"</h2>"
                    echo
'</td></tr></table>'
                    } 
                    } 
                } 

            else 
            if(
$page == 4
            { 
                unset (
$_SESSION['Password'],$_SESSION['Username']); 
                echo 
'<span style="color:red">Logging you out...</span><meta HTTP-EQUIV="REFRESH" content="2; url=index.php">'
            } 
            else 
            { 
                
$_GET['page'] = 0
                echo 
'Invalid page, redirecting you to profile. 
                <meta HTTP-EQUIV="REFRESH" content="2; url=index.php">'

            } 
    } 
    } 
    } 
?>
tried everything that i can think (with common sense) but it was no use now there are no pics in there only the username and password box and login button just help me connect to my data base i know how to add more things in it and how to read an file there can anyone please set this script got this from == UCPI
Reply
#5

Could you comment out the FTP line and print_r the $user variable, I haven't really used that UCP I only put the method of using FTP in that topic which is the same used in FractalBB. But as you can see it's trying to get Array.ini which unless you have a user called Array isn't going to happen!
Reply
#6

print_r the $user ?? i got by what u meant y commenting
PHP код:
<?php
if(!isset($_SESSION['Username'])&&!isset($_SESSION['Password'])&&!isset($_POST['Username']) && !isset($_POST['Password']))
{
    echo 
'<form name="form1" method="post" action="index.php">
        <strong><span style="color:black">Login</span></strong><br>
        Username: <input name="Username" type="text" id="Username"><br>
        Password: <input name="Password" type="password" id="Password"><br>
        <input type="submit" name="Submit" value="Login">
        </form>'
;
}
else
{
    require_once 
'Config/Lite.php';
    
//$login = file_get_contents('ftp://dmIvsI:[password]@87.98.216.36/scriptfiles/Users/'.$user.'.ini');
    
$user['Name'] = $_SESSION['Username'].".ini";
    
$file = new Config_Lite($user['Name']);//Get INI file

    //Check If account exists
    
if (!file_exists($user['Name'])) {
    unset (
$_SESSION['Password'],$_SESSION['Username']);
    echo 
'Invalid Account name!
    <meta HTTP-EQUIV="REFRESH" content="3; url=index.php">'
;
    } else
    {
    
//GetData
    
$user['Password'] = $file->get(null'Password');
    
$user["Money"] = $file->get(null'Money');
    
$user["Score"] = $file->get(null'Score');
    
$user["Admin Level"] = $file->get(null'Admin');
    
$user["Donator"] = $file->get(null'VIP');
    
$user["skin"] = $file->get(null'Savedskin');
    
$user["ID"] = $file->get(null'ID');
    
$password1 $_SESSION['Password'];

    
//Hashing Pass..
    
$hashed hash('whirlpool'$password1);
    
//Checking Pass
    
if($user['Password'] != $hashed)
    {
    unset (
$_SESSION['Password'],$_SESSION['Username']);
    echo 
'Invalid Password, Please try again!
    <meta HTTP-EQUIV="REFRESH" content="3; url=index.php">'
;
    } else
    {
            if(!isset(
$_GET['page']))
            {
                
$_GET['page'] = 0;
            }
            
$page $_GET['page'];
            if(
$page == 0)
            {
                echo 
'<table align="center" width="80%"><TR VALIGN=TOP><td><span style="color:black">
                </td>
                <td>'
;
                echo 
'<br><img align="left" SRC="images/skins/'.$user['Skin'].'.jpg">';
                echo 
'<h1 style="color:red" align="center">Your Stats:</h1>';
                echo 
"<br><span style='color:black'><h2 align='center'>Money: ".$user['Money']."</span>";
                echo 
"<br><span style='color:black'>Score: ".$user['Score']."</span>";
                echo 
"<br><span style='color:black'>AdminLevel: ".$user['Admin']."</span>";
                echo 
"<br><span style='color:black'>VIPLevel: ".$user['VIP']."</span>";
                echo 
"<br><span style='color:black'>Skin: ".$user['Skin']."</span>";
                echo 
"<br><span style='color:black'>Registered On: ".$user['RegOn']."</span>";
                echo 
"</h2>";
                echo
'</td></tr></table>';
            } else
            if(
$page == 1)
            {
                if(!isset(
$_GET['ac']))
                {
                    
$_GET['ac'] = 0;
                }
                
$acc $_GET['ac'];
                if(
$acc == 0)
                {
                    echo 
'<h1><a href="index.php?page=1&ac=1">Change Password</a></h1>';
                } else
                if(
$acc == 1)
                {
                    if(!isset(
$_POST['password']))
                    {
                        echo 
'<center>
                        New Password: <form action="index.php?page=1&ac=1" method="post">
                        <input type="text" name="password" />
                        <input type="submit" value="Change" />
                        </form>
                        <center>'
;
                    }
                    else
                    {
                        
//Hashing Pass..
                        
$hashed hash('whirlpool'$_POST['password']);
                        
$file->set(null'Password'$hashed);//Set password
                        
$file->save();//save file
                        
echo "Your password have been changed successfully";
                        unset (
$_SESSION['Password'],$_SESSION['Username']);
                        echo 
'<br>Please Login Again, with new password!
                        <meta HTTP-EQUIV="REFRESH" content="3; url=index.php">'
;

                    }
                    }
            }
            else
            if(
$page == 2)
            {
                if(!isset(
$_POST['name']))
                {
                    echo 
'<center><br>Type the username below to generate:<br>
                    <form action="index.php?page=2" method="post">
                    <input type="text" name="name" />
                    <input type="submit" value="Show" />
                    </form>
                    <center>'
;
                }
                else
                {
                    
$user['Name'] = $_POST['name'].".ini";

                    
$file = new Config_Lite($user['Name']);//Get INI file
                    
if (!file_exists($user['Name'])) {
                    echo 
'No such user exists.
                        <meta HTTP-EQUIV="REFRESH" content="3; url=index.php?page=2">'
;
                    } else
                    {
                    
//GetData Of user.
                    
$user["Money"] = $file->get(null'Money');
                    
$user["Score"] = $file->get(null'Score');
                    
$user["Admin"] = $file->get(null'Admin');
                    
$user["VIP"] = $file->get(null'VIP');
                    
$user["Skin"] = $file->get(null'Skin');
                    
$user["ID"] = $file->get(null'ID');
                    
$user["RegOn"] = $file->get(null'RegDate');

                    
$add "images/generate.jpg";
                    
$tsrc "sig\/".$_POST['name'].".jpg";
                    
$im ImageCreateFromJPEG($add);
                    
$green imagecolorallocate($im,41,175,72);
                    
$pink imagecolorallocate($im,222,0,225);
                    
$font2 'arial.ttf';
                    
$font 'arialbd.ttf';
                    
imagettftext($im20,80 ,25$green$font,$_POST['name']);
                    
imagettftext($im10,80 ,60$pink$font,"Cash ".$user['Money']);
                    
imagettftext($im10,80 ,80$pink$font,"Score ".$user['Score']);
                    
imagettftext($im10,80 ,100$pink$font,"SkinID  ".$user['Skin']);

                    
imagettftext($im10,170 ,60$pink$font,"AdminLevel ".$user['Admin']);
                    
imagettftext($im10,170 ,80$pink$font,"VIPLevel ".$user['VIP']);
                    
imagettftext($im10,170 ,100$pink$font,"Registered On  ".$user['RegOn']);
                    
ImageJpeg($im,$tsrc);
                    echo 
"<h1 style='color:red' align='center'>".$_POST['name']."'s statics has been generated:</h1>";
                    echo 
'<center><img src="sig/'.$_POST['name'].'.jpg"></img></center>';
                    }
                    }
                }
            else
            if(
$page == 3)
            {
                if(!isset(
$_POST['name']))
                {
                    echo 
'<center><br>Type the username below:<br>
                    <form action="index.php?page=3" method="post">
                    <input type="text" name="name" />
                    <input type="submit" value="Show" />
                    </form>
                    <center>'
;
                }
                else
                {
                    
$user['Name'] = $_POST['name'].".ini";

                    
$file = new Config_Lite($user['Name']);//Get INI file
                    
if (!file_exists($user['Name'])) {
                    echo 
'No such user exists.
                        <meta HTTP-EQUIV="REFRESH" content="3; url=index.php?page=3">'
;
                    } else
                    {
                    
//GetData Of user.
                    
$user["Money"] = $file->get(null'Money');
                    
$user["Score"] = $file->get(null'Score');
                    
$user["Admin"] = $file->get(null'Admin');
                    
$user["VIP"] = $file->get(null'VIP');
                    
$user["Skin"] = $file->get(null'Skin');
                    
$user["ID"] = $file->get(null'ID');
                    
$user["RegOn"] = $file->get(null'RegDate');

                    echo 
'<table align="center" width="80%"><TR VALIGN=TOP><td><span style="color:black">
                    </td>
                    <td>'
;
                    echo 
"<h1 style='color:red' align='center'>".$_POST['name']." stats:</h1>";
                    echo 
"<span style='color:black'><h2 align='center'>Money: ".$user['Money']."</span>";
                    echo 
"<br><span style='color:black'>Score: ".$user['Score']."</span>";
                    echo 
"<br><span style='color:black'>AdminLevel: ".$user['Admin']."</span>";
                    echo 
"<br><span style='color:black'>VIPLevel: ".$user['VIP']."</span>";
                    echo 
"<br><span style='color:black'>Skin: ".$user['Skin']."</span>";
                    echo 
"<br><span style='color:black'>Registered On: ".$user['RegOn']."</span>";
                    echo 
"</h2>";
                    echo
'</td></tr></table>';
                    }
                    }
                }

            else
            if(
$page == 4)
            {
                unset (
$_SESSION['Password'],$_SESSION['Username']);
                echo 
'<span style="color:red">Logging you out...</span><meta HTTP-EQUIV="REFRESH" content="2; url=index.php">';
            }
            else
            {
                
$_GET['page'] = 0;
                echo 
'Invalid page, redirecting you to profile.
                <meta HTTP-EQUIV="REFRESH" content="2; url=index.php">'
;
            }
    }
    }
    }
?>
Reply
#7

PHP код:
print_r($user); 
Reply
#8

thanks won't work version 2 is out it will be fine awsomedude helping me
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)