Просмотр файла modules/downloads/new_files.php

Размер файла: 1.28Kb
  1. <?php
  2. /**********************************
  3. * @package: PerfCMS *
  4. * @year: 2012 *
  5. * @author: Artas *
  6. * @link: http://perfcms.pp.ua *
  7. **********************************/
  8. $locate = 'in_downloads';
  9. $title = $lang->word('new_files').' | '.$lang->word('downloads');
  10. require_once(SYS.'/view/header.php');
  11. $tpl->div('title', $lang->word('new_files').' | '.$lang->word('downloads'));
  12. $files_r = $db->query("SELECT * FROM `downloads_files` WHERE `time` > '". (time()-60*60*24) ."'")->rowCount();
  13. $pages = new Paginator($files_r, $ames);
  14. if($files_r == 0) {
  15. echo $tpl->div('menu', $lang->word('no_files'));
  16. }
  17. else {
  18. $files_q = $db->query("SELECT * FROM `downloads_files` WHERE `time` > '". (time()-60*60*24) ."' ORDER BY time DESC LIMIT $start, $ames");
  19. while($files = $files_q->fetch()) {
  20. echo '<div class="menu">
  21. '.dlext($files['ext']).'
  22. <a href="/downloads/file/'. $files['id'] .'">'. $files['name'] .' ('.$files['ext'].')</a> ['.size($files['size']).']<br/>
  23. '. mb_substr($files['description'], 0, 100).'...
  24. </div>';
  25. }
  26. $pages->view('/downloads/new_files/?');
  27. }
  28. $tpl->div('block', NAV . ' <a href="/downloads/">'. $lang->word('downloads') .'</a><br/>' . HICO .' <a href="/">'. $lang->word('home') .'</a>');
  29. require_once(SYS.'/view/footer.php');
  30. ?>