Pages

Game Time to Points Ran Online

[Guide] Game Time To MR-EP
PHP Code:

<?php require("config.php"); $error=1
if(
$_POST['lostpassword']=='Buy') { 
     
    
$error 2
    
$account_id stripslashes($_SESSION['user']); 
    
$Nation stripslashes($_POST['nation']); 
    
$query "SELECT header from RanUser.dbo.Web"
    
$result $db->Execute($query); 
    
$row $result->fetchrow(); 
    
$idcode = (int)$_POST['idcode']; 
    
$name stripslashes($_POST['name']); 
    
$row $result->fetchrow(); 
    
$Cost 600
    
$result mssql_query ("SELECT GameTime2 FROM RanUser.dbo.UserInfo Where Username = '$account_id'"); 
    
$rows=mssql_num_rows($result); 

    if(
$rows>0) { 
        
$rows=mssql_fetch_assoc($result);  
        
extract($rows); 
        
$lev = ($ChaLevel); 
        
$Gold = ($ChaMoney); 
        
$ChaOnline = ($ChaOnline); 
    if(
$GameTime2<$Cost) { 
            echo 
'<script language="JavaScript"> 
        alert("Your Account Dont Have Enough Game Time Points to Change."); 
        </script>'

        echo 
"<center><img src=creativestyle/images/warning.gif /> Your Account Dont Have Enough Game Time Points to Change.</center>";            
        
$error 1;  
        } 
    if(
$account_id == NULL) { 
        echo 
'<script language="JavaScript"> 
        alert("No Account Selected. Please Create First and Try Again."); 
        </script>'

        } 
    } 

if(
$error==1) { 
    
$query "SELECT resetmoney,resetlevel,resetslimit,reset_skill,reset_quest,reset_stat,clean_skills from RanUser.dbo.Web"
    
$result $db->Execute($query); 
    
$row $result->fetchrow(); $login stripslashes($_SESSION['user']); $comanda1="SELECT UserNum from RanUser.dbo.UserInfo where Username = '$login' "$rezultat2=mssql_query($comanda1) or die("Can`t be executed"); 
while(
$r2=mssql_fetch_array($rezultat2)){ $Usernum $r2["UserNum"]; 




echo 
"<center> 
<div style='width:546px; margin:0 0 0 10px; padding:10px; border:1px solid #484848; background:#0099CC; color:white; text-align:center; line-height:18px'> 
    Convert your Game Time to MR-Points. (10 Hours(600 Minutes) GameTime2 = 10 MR-Point)</div><br> 
<table width=450 border=0 cellspacing=0 cellpadding=0 bgcolor=white align=center> 
                    <tr height=19><td align=center bgcolor=gray width=150 height=26 style='background: #2F89EF; font: 11px verdana, sans-serif; color:#eee;'><font size=-1 color=#fbffff face=Helvetica, Geneva, Arial, SunSans-Regular, sans-serif><strong>Name</strong></font></td> 
                        <td align=center bgcolor=gray width=200 height=26 style='background: #2F89EF; font: 11px verdana, sans-serif; color:#eee;'><font size=-1 color=#fbffff face=Helvetica, Geneva, Arial, SunSans-Regular, sans-serif><strong>Game Time(Minute/s)</strong></font></td>                         
                    </tr>"
$rezultat4=mssql_query("SELECT * from RanUser.dbo.UserInfo where Usernum = '$Usernum' ") or die("Cant"); 

while(
$r3=mssql_fetch_array($rezultat4)) 


            
$UName $r3["UserName"]; 
            
$GPoints $r3['GameTime2']; 
echo
"                     
                    <tr height=19><td align=center width=150 height=19 style='border-bottom:#CCCCCC 1px solid'><b><font color=gray size=2>
$UName</td> 
                        <td align=center width=200 height=19 style='border-bottom:#CCCCCC 1px solid'><b><font color=gray size=2>
$GPoints Minute/s</td> 
</td> 
</tr></table> 
"






                    echo
"<Br> 
<form name='lostpassword' action='' method='post' onsubmit='return checkform1()' autocomplete='off'> 
        <table CELLSPACING=0 BORDER=0 CELLPADDING=0 align=CENTER> 
            <tr> 
                <td width=170 align=right> 
                <font size=2><b><img src='creativestyle/images/point_b.gif'/> UserName: &nbsp;&nbsp; 
                </td> 
                <td> 
                 
                 
                 
                <select style='background: #4191BB; font: 11px verdana, sans-serif; color:#eee;'>"
;
$account_id stripslashes($_SESSION['user']); 
    echo(

            <option value='
.$account_id.'>'.$account_id.'</option> 
        '
); 



echo 

                    </select>  
                </td> 
            </tr> 

         
         
             
            <tr align=center><td align=right><BR><input type=hidden name=lostpassword value='Buy'> 
            <input type=hidden name=Nation value='
$r2'> 
            </td></tr><tr><td align=right><input type=submit name=Login value=' Submit  '></td></tr> 
         
    </form> 


"


if(
$error==2) { 
    
$account_id stripslashes($_SESSION['user']); 
    
$Usernum = ($UserNum); 
    
$Alz = ($Alz); 
    
$query "SELECT header from RanUser.dbo.Web"
    
$result $db->Execute($query); 
    
$row $result->fetchrow(); 
    
$Nation stripslashes($_POST['nation']); 
    
$name stripslashes($_POST['name']); 
    
$idcode = (int)$_POST['idcode']; 

    
$result1 mssql_query ("SELECT GameTime2 FROM RanUser.dbo.UserInfo Where Username = '$account_id'"); 
    
$rows=mssql_num_rows($result1); 
    
$rows=mssql_fetch_assoc($result1);  
    
extract($rows); 
    
$bayad=600
    
$bayad1=10
    
$wa=$GameTime2/$bayad
    
$sagot=(int)$wa
    
$sagot1=$sagot*$bayad
    
$sagot2=$sagot*$bayad1
     
    
mssql_query("UPDATE Userinfo SET GameTime2= GameTime2 - $sagot1 WHERE Username = '$account_id' "); 
    
mssql_query("UPDATE Userinfo SET UserPoint = UserPoint+$sagot2 WHERE Username = '$account_id' "); 

     
    echo 
'<script language="JavaScript"> 
        alert("Successfully Convert your Game Time Points to MR-Points !* Thank you."); 
        </script>'

        
$error 1;  
    echo 
"<center><img src=creativestyle/images/ok.gif />  <font color=green size=3>Convert Game Time Points to MR-Points !*</font> <font size=2>has been Successful.</font><br/>";     /* Game Function End */ 
        
$error 1;  





?>
Credits : to mr.Jescolta

mactet05
Ragezone