Просмотр файла count.php

Размер файла: 900B
  1. <?php
  2.  
  3. /**
  4. * @author Koder
  5. * @copyright 2010
  6. */
  7. defined('_IN_JOHNCMS') or die('Restricted access');
  8. $rew = mysql_query("SELECT * FROM `lib_settings`;");
  9. $lib = array();
  10. while ($re = mysql_fetch_row($rew))
  11. $lib[$re[0]] = $re[1];
  12. mysql_free_result($rew);
  13.  
  14. $new_fil = $lib['new_fil'];
  15.  
  16. $countb = 0;
  17. $countbnew = 0;
  18. $cou = '';
  19. $countb = mysql_result(mysql_query("select COUNT(*) from `library` where `type` = 'file' and `path` LIKE '/%' and `moder` = '1'"),0);
  20. $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);
  21. $cou = '('.intval($countb);
  22. if($countbnew !== "0"){ $cou .= '/<span class="red">+'.intval($countnew).'</span>)';}else{$cou .= ')';}
  23. ?>