Народ помагите я написал код
при открыти его выдает ошибку
Код:
function up_down_total()
{
$sql = "SELECT ROUND(SUM(u_up_total+u_down_total)) AS pumped, ROUND(SUM(u_up_total)) AS upl, ROUND(SUM(u_down_total)) AS donl
FROM " . BT_USERS_TABLE . " ";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query ', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$ud_all = $row['pumped'];
$up = $row['upl'];
$dn = $row['donl'];
$template->assign_vars( array(
'UD_ALL' => ($ud_all) ? humn_size($ud_all) : 0 ,
'UPL' => ($up) ? humn_size($up) : 0 ,
'DNL' => ($dn) ? humn_size($dn) : 0
));
}
function active_seeders_begin()
{
$sql = 'SELECT COUNT(DISTINCT user_id) AS st FROM '. BT_TRACKER_TABLE .' WHERE seeder = 1 ';
if (!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query ', '', __LINE__, __FILE__, $sql); }
$row = $db->sql_fetchrow($result);
$cur_seed = $row['st'] ;
$template->assign_vars( array(
'ST' => $cur_seed ));
}
function active_leechers_begin()
{
$sql = 'SELECT COUNT(DISTINCT user_id) AS lt FROM '. BT_TRACKER_TABLE .' WHERE seeder = 0 ';
if (!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query ', '', __LINE__, __FILE__, $sql); }
$row = $db->sql_fetchrow($result);
$cur_leech = $row['lt'] ;
$template->assign_vars( array(
'LT' => $cur_leech ));
}
function active_torrents_begin()
{
$sql = 'SELECT COUNT(DISTINCT tor.topic_id) AS tt , SUM(tor.size) AS ts
FROM '. BT_TRACKER_TABLE .' tr , '. BT_TORRENTS_TABLE .' tor
WHERE tr.topic_id = tor.topic_id
';
if (!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query ', '', __LINE__, __FILE__, $sql); }
$row = $db->sql_fetchrow($result);
$cur_tor = $row['tt'] ;
$cur_ts = $row['ts'] ;
$template->assign_vars( array(
'TT' => $cur_tor ,
'TS' => humn_size($cur_ts)
));
}
function all_torrents_begin()
{
$sql = ' SELECT COUNT(*) as tn, SUM(size) AS tos
FROM '.BT_TORRENTS_TABLE .'';
if (!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query ', '', __LINE__, __FILE__, $sql); }
$row = $db->sql_fetchrow($result);
$tn = $row['tn'];
$tos = $row['tos'];
$template->assign_vars( array(
'TN' => $tn ,
'TOS' => humn_size($tos)
));
}
почему подскажите плиз очень надо{"error_code":1000,"error_msg":"no action specified","action":null}