Размер файла: 900B
<?php
/**
* @author Koder
* @copyright 2010
*/
defined('_IN_JOHNCMS') or die('Restricted access');
$rew = mysql_query("SELECT * FROM `lib_settings`;");
$lib = array();
while ($re = mysql_fetch_row($rew))
$lib[$re[0]] = $re[1];
mysql_free_result($rew);
$new_fil = $lib['new_fil'];
$countb = 0;
$countbnew = 0;
$cou = '';
$countb = mysql_result(mysql_query("select COUNT(*) from `library` where `type` = 'file' and `path` LIKE '/%' and `moder` = '1'"),0);
$countbnew = mysql_result(mysql_query("select COUNT(*) from `library` where `type` = 'file' and `path` LIKE '/%' and `time` > '".($realtime -($new_fil * 24 * 3600) )."' and `moder` = '1'"),0);
$cou = '('.intval($countb);
if($countbnew !== "0"){ $cou .= '/<span class="red">+'.intval($countnew).'</span>)';}else{$cou .= ')';}
?>