Файл: news/count.php
Строк: 18
<?php
$news_user = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > '" . (TIME - 300) . "' AND `url` like '/news/%'"), 0);
$k_p = mysql_result(mysql_query("SELECT COUNT(*) FROM `news`", $db), 0);
$k_n = mysql_result(mysql_query("SELECT COUNT(*) FROM `news` WHERE `time` > '" . (time() - 86400) . "'", $db), 0);
if ($k_n == 0) {
$k_n = NULL;
} else {
$k_n = '/+' . $k_n;
}
echo " <span class = 'count'>";
echo "$k_p$k_n";
echo "</span><span class = 'count'>";
echo "$news_user</span>";