Файл: accmarket.net/cron/2.php
Строк: 18
<?php
define('_ON_CMS', 1);
require_once '../includes/start.php';
require_once '../includes/function.php';
require_once '../includes/header.php';
div('Восстановление запасов','top');
$realtime=time();
$PAGINGS = mysql_query("SELECT * FROM `planet_loc` WHERE `type`>=2 AND `res`<100000 ORDER BY `id` DESC");
if($PAGINGS > 0)
{
while($row = mysql_fetch_array($PAGINGS))
{
$q = mysql_query("SELECT * FROM `science` WHERE `uid`='".check(mysql_real_escape_string($row['uid']))."'");
$f = mysql_fetch_array($q);
$vost=$f['s1']*150;
mysql_query("UPDATE `planet_loc` SET `res`=res+$vost WHERE `id`='".$row['id']."';");
}
}
div('<a href="../">На главную</a>','downban');
require_once '../includes/footer.php';
?>