مدیر ارشد عزیز واقعا دس مریزا خداییش فکر نمی کردم جواب بدید واقعا آفرین داره و باید بگم خیلی خیلی خیلی ممنون کئ های که تو فایل هست اینه
<?php
//Database Connection
$host = "localhost";
$dbuser = "root";
$dbpass = " ";
$db = "xrace_pro";
$db_conn = mysql_connect("$host", "$dbuser", "$dbpass") or die("Unable to connect to the database");
mysql_select_db("$db", $db_conn) or die("Unable to select the database");
mysql_query("SET CHARACTER SET utf8");
//Set Online
@session_start();
@$user = $_SESSION['xrace_pro'];
$selectuser = mysql_query("SELECT * FROM users WHERE username='$user'");
if (mysql_num_rows($selectuser) > 0) {
$urow = mysql_fetch_array($selectuser);
$timenow = time();
$update = mysql_query("UPDATE users SET timeonline='$timenow' WHERE username='$user'");
} else {
session_unset();
}
//Level Up
if (mysql_num_rows($selectuser) > 0) {
$wins = $urow['wins'];
$losses = $urow['losses'];
$userraces = $wins + $losses;
$userlevel = $urow['level'];
$levels = mysql_query("SELECT * FROM levels WHERE level='$userlevel'");
$lrow = mysql_fetch_array($levels);
$minraces = $lrow['minraces'];
$biggerlevels = mysql_query("SELECT * FROM levels WHERE level='$userlevel'+1");
$lbrow = mysql_fetch_array($biggerlevels);
$blevel = $lbrow['level'];
$bminraces = $lbrow['minraces'];
if ($userraces > $minraces && $userraces > $bminraces OR $userraces == $bminraces) {
$update = mysql_query("UPDATE users SET level='$blevel' WHERE username='$user'");
}
if ($userraces < $minraces) {
$update = mysql_query("UPDATE users SET level=level-1 WHERE username='$user'");
}
}
//Fuel Refill (by default every 10 minutes)
//$run = mysql_query("SELECT * FROM `settings`");
//$site = mysql_fetch_assoc($run);
//$refilltime = $site['refilltime'];
//$refilltimetype = $site['fullrefilltimetype'];
//$fullrefilltime = $site['fullrefilltime'];
//$fullrefilltimetype = $site['refilltimetype'];
//$run2 = mysql_query("SELECT * FROM `cron-tasks` WHERE type='fuelrefill'");
//$site2 = mysql_fetch_assoc($run2);
//$lastrun = $site2['lastrun'];
//$timenow = time();
//if ($refilltimetype == "hours") {
//$plustime = $refilltime*3600;
//} else {
//if ($refilltimetype == "minutes") {
//$plustime = $refilltime*60;
//} else {
//if ($refilltimetype == "seconds") {
//$plustime = $refilltime;
//}
//}
//}
//$run3 = mysql_query("SELECT * FROM `cron-tasks` WHERE type='fullfuelrefill'");
//$site3 = mysql_fetch_assoc($run3);
//$lastrun2 = $site3['lastrun'];
//if ($fullrefilltimetype == "hours") {
//$plustime2 = $fullrefilltime*3600;
//} else {
//if ($fullrefilltimetype == "minutes") {
//$plustime2 = $fullrefilltime*60;
//} else {
//if ($fullrefilltimetype == "seconds") {
//$plustime2 = $fullrefilltime;
//}
//}
//}
//if(mysql_num_rows($selectuser)>0) {
//if ($urow['fuel'] < $urow['fuelcapacity']) {
//$timenow = time();
//if($timenow >= $lastrun + $plustime) {
//$timenow = time();
//$sqlusers = mysql_query("SELECT * FROM users WHERE banned='No'");
//while ($rowuser = mysql_fetch_assoc($sqlusers)) {
//$userrefillfuel = mysql_query("UPDATE users SET fuel=fuel+1 WHERE username='$rowuser[username]'");
//}
//$updaterun = mysql_query("UPDATE `cron-tasks` SET lastrun='$timenow' WHERE type='fuelrefill'");
//}
//}
//$timenow = time();
//if($timenow >= $lastrun2 + $plustime2) {
//$timenow = time();
//$sqlusers = mysql_query("SELECT * FROM users WHERE banned='No'");
//while ($rowuser = mysql_fetch_assoc($sqlusers)) {
//$userrefillfuel = mysql_query("UPDATE users SET fuel='$rowuser[fuelcapacity]' WHERE username='$rowuser[username]'");
//}
//$updaterun2 = mysql_query("UPDATE `cron-tasks` SET lastrun='$timenow' WHERE type='fullfuelrefill'");
//}
//}
?>
اگرم خواستید براتون اپلود می کنم اسکرین شاپ نمی گیرم چون باید دوباره تایپ کنید پس میزارم براتون گفتید رنگش تغییر می کنه والا این از یه خط گذشته
هستید؟