View file modules/built/cron/cron_built_tree.asp
<?php include('../../../system/include/settings.inc');//Потключаемся к базе $req = mysql_query("SELECT * FROM `my_construction`WHERE `type` = 'tree'"); while ($cron = mysql_fetch_array($req)) { $req = mysql_query("SELECT * FROM `chars` WHERE `nick` = '".$cron['usr']."'"); $usr = mysql_fetch_array($req); if($cron['usr'] == $usr['nick']) { $tree = $usr['tree'] + $cron['earnings']; mysql_query("UPDATE `chars` SET `tree` = '$tree' WHERE `nick` = '".$cron['usr']."'"); }} ?>