Файл: modules/userblock/ajax.php
Строк: 9
<?
if($CONFIG['uid']==0) die('Access denied.');
switch($this->Act){
case 'tasks':
$Array = Core::MysqlSelect('tasks','`id`,`bal`,`pay`,`social`,`type`',array('uid'=>$CONFIG['uid']),'ORDER BY `date` DESC LIMIT 0, 10');
foreach($Array as $i=>$t){
$Array[$i]['done'] = mysql_num_rows(mysql_query("SELECT `tid` FROM done WHERE `tid` = '".$t['id']."' AND `mode`='done';"));
$Array[$i]['count'] = $t['bal']/$t['pay']+$Array[$i]['done'];
}
Ajax::Responce($Array);
break;
echo 'err';
}