Str@nnik, И всего?![]()
это на главную
' . counters::lib() . '
это в incfiles/classes/counters.php
static function lib()
{
global $rootpath;
//$file = $rootpath . 'files/cache/count_library.dat';
if (file_exists($file) && filemtime($file) > (time() - 3200)) {
$res = unserialize(file_get_contents($file));
$total = $res['total'];
$new = $res['new'];
$mod = $res['mod'];
} else {
$total = intval(mysql_result(mysql_query("SELECT COUNT(*) FROM `mod_lib` WHERE `type` = 'arc' AND `mod` = '0'"), 0));
$new = mysql_result(mysql_query("SELECT COUNT(*) FROM `mod_lib` WHERE `time` > '" . (time() - 259200) . "' AND `type` = 'arc' AND `mod` = '0'"), 0);
$mod = mysql_result(mysql_query("SELECT COUNT(*) FROM `mod_lib` WHERE `type` = 'arc' AND `mod` = '1'"), 0);
}
if ($new) $total .= '/<span class="red"><a href="/lib/index.php">+' . $new . '</a></span>';
if ((core::$user_rights == 5 || core::$user_rights >= 6) && $mod) {
$total .= '/<span class="red"><a href="' . core::$system_set['homeurl'] . '/lib/?act=panel&mod=moderation">Mod:' . $mod . '</a></span>';
}
return $total;
}