hello, not sure if its the right place and sorry if its not but i need help with this script
the formula behind this script is that an online person on my website gets 1 point per 1 hour being online
i need to change it to days (24 hours) = 1 point
thank you for your help
ONLINE TIME TO CREDITS EXCHANGER
<? $exchange_time_settings = simplexml_load_file(‘engine/config_mods/exchange_online_time.xml’);
$reward = $exchange_time_settings->reward;if(!isset($_SESSION[‘user_auth_id’])) { die(“You need to be logged in.”); }$name = $_SESSION[‘user_auth_id’];
$query = mssql_query(“Select OnlineTime from MEMB_STAT where memb___id=’$name’”);
$hour = mssql_fetch_row($query);
$hours = floor($hour[0] / 60);$credit = mssql_query(“Select WCoinC from T_InGameShop_Point where AccountID=’$name’”);
$cr = mssql_fetch_row($credit);if(!isset($_POST[‘agree’]))
{?>
<? } else { $name = $_SESSION['user_auth_id']; $queryy = mssql_query("Select OnlineTime from MEMB_STAT where memb___id='$name'"); $hr = mssql_fetch_row($queryy); $hh = floor($hr[0] / 60);
Your WCoinC : <? echo($cr[0]); ?> Your Online Hours : <? if($hours == "") { $hours = "0"; } echo($hours); ?> You Will Get : <? $k = $hours*$reward; echo($k); ?> WCoinC $mm = mssql_query(“Select connectstat from MEMB_STAT where Memb___id=’$name’”);
$fmm = mssql_fetch_row($mm);
if($fmm[0] == “1”)
{
die(“You need to be OFFLINE before you trade your hours.”);
}
$k = $hh * $reward + $cr[0];
mssql_query(“Update T_InGameShop_Point set WCoinC=’$k’ where AccountID=’$name’”);
mssql_query(“Update MEMB_STAT set OnlineTime = 0 where memb___id=’$name’”);
$queryyy = mssql_query(“Select OnlineTime from MEMB_STAT where memb___id=’$name’”);
$hrr = mssql_fetch_row($queryyy);
$hhh = $hrr[0];
echo(“You have now “.$k.” WCoinC and 0 Online Hours”);
}
?>