Файл: cron/reloded.php
Строк: 6
<?php
include_once("ini.php");
$users=mysql_query("SELECT * FROM `users` WHERE `udata16`<`udata17` ");
while($us= mysql_fetch_array($users)){
$reg=mysql_query("SELECT * FROM `addhpmp` WHERE `login`='".$us['udata0']."' AND `tip`='hp' ");
$r= mysql_fetch_array($reg);
$udata16=$us[udata16]+$r[kol]+5;
if($udata16>$us[udata17]){$udata16=$us[udata17];
mysql_query("UPDATE `users` SET `udata16`='$udata16' WHERE `udata16`<`udata17` ");
}
$users=mysql_query("SELECT * FROM `users` WHERE `udata29`<`udata30` ");
while($us= mysql_fetch_array($users)){
$reg=mysql_query("SELECT * FROM `addhpmp` WHERE `login`='".$us['udata0']."' AND `tip`='mp' ");
$r= mysql_fetch_array($reg);
$udata29=$us[udata29]+$r[kol]+5;
if($udata29>$us[udata30]){$udata29=$us[udata30];
mysql_query("UPDATE `users` SET `udata29`='$udata29' WHERE `udata29`<`udata30` ");
}
?>