08-22-2012, 06:04 PM
Hey Guys I worked on it for abiut 3 hours ;D
I want to show you my new script for change time point for cash !!!
Here Are :
// Check For Login
if( $User->LoggedIn == true )
{
$mysql1 = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );
$query1 = mysql_query("SELECT cash from bg_user WHERE user_code = ". $User->ID ."");
$result1b = mysql_fetch_array( $query1 );
$mysql2 = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );
$query2 = mysql_query("SELECT a_online_time from t_user_log WHERE a_account_index = ". $User->ID ."");
$result2b = mysql_fetch_array( $query2 );
$cash = $result1b['cash'];
$onlinetimepoints = $result2b['a_online_time'];
echo'<center>';
echo 'Your Currenty Cash Is : ';
print $cash;
echo'<br>';
echo 'Your Currenty Online Time Points : ';
print $onlinetimepoints;
echo '<br>';
if(isset($_POST['change'])) {
$mysql1 = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );
$query1 = mysql_query("UPDATE bg_user SET cash = cash + ". $onlinetimepoints ." WHERE user_code = ". $User->ID ."");
$mysql2 = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );
$query2 = mysql_query("UPDATE t_user_log SET a_online_time = 0 WHERE a_account_index = ". $User->ID ."");
$mysql1 = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );
$query1 = mysql_query("SELECT cash from bg_user WHERE user_code = ". $User->ID ."");
$result1b = mysql_fetch_array( $query1 );
$mysql2 = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );
$query2 = mysql_query("SELECT a_online_time from t_user_log WHERE a_account_index = ". $User->ID ."");
$result2b = mysql_fetch_array( $query2 );
$curonlinept = $result2b['a_online_time'];
$curcash = $result1b['cash'];
echo 'Now You Got(Cash) : ';
print $curcash;
echo '<br>Now You Got(OnlinePoints) :';
print $curonlinept;
}
?>
<form id="form1" name="form1" method="post" action="">
<input name="change" value="Time For Cash !" type="submit" />
</form>
</html>
<?php
echo '</center>';
}
else{
echo 'No Logged ! Please Login For Excange Online Time Points !' ;
}
You Must Use It For Your Page ;D
Have Fun !
Some Things :
2
2
THIS IS CREATED BY MYSELF !!!


ARAM_INT);