Файл: modules/downloads/new_files.php
Строк: 46
<?php
/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) 2013, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
* @link http://perf-engine.net
* @package PerfEngine
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
$locate = 'in_downloads';
$title = _t('new_files').' | '._t('downloads');
include_header($title);
$tpl->div('title', _t('new_files').' | '._t('downloads'));
$files_r = $db->query("SELECT * FROM `downloads_files` WHERE `time` > '". (time()-60*60*24) ."'")->rowCount();
$pages = new Paginator($files_r, $ames);
if($files_r == 0) {
echo $tpl->div('menu', _t('no_files'));
}
else {
$files_q = $db->query("SELECT * FROM `downloads_files` WHERE `time` > '". (time()-60*60*24) ."' ORDER BY time DESC LIMIT $start, $ames");
while($files = $files_q->fetch()) {
echo '<div class="menu">
'.dlext($files['ext']).'
<a href="/downloads/file/'. $files['id'] .'">'. $files['name'] .' ('.$files['ext'].')</a> ['.size($files['size']).']<br/>
'. mb_substr($files['description'], 0, 100).'...
</div>';
}
$pages->view();
}
$tpl->div('block', NAV . ' <a href="/downloads/">'. _t('downloads') .'</a><br/>' . HICO .' <a href="/">'. _t('home') .'</a>');
include_footer();
?>