Файл: modules/index.php
Строк: 64
<?php
/**********************************
* @package: PerfCMS *
* @year: 2012 *
* @author: Artas *
* @link: http://perfcms.ru *
**********************************/
$page = 'index';
$locate = 'in_index';
$title = $lang->word('home');
require_once(SYS.'/view/header.php');
$tpl->div('title', 'Новые домены');
$files_r = $db->query("SELECT * FROM `share_files` WHERE `time` > '". (time()-60*60*24) ."'")->rowCount();
$pages = new Paginator($files_r, $ames);
if($files_r == 0) {
echo $tpl->div('menu', '-');
}
else {
$files_q = $db->query("SELECT * FROM `share_files` WHERE `time` > '". (time()-60*60*24) ."' ORDER BY time DESC LIMIT $start, $ames");
while($files = $files_q->fetch()) {
echo '<div class="menu">
'.(preg_match('/jpeg|jpg|gif|png|bmp/i', $files['ext']) ? img('image.png') : NULL).'
'.(preg_match('/jar|sis|sisx|jad|apk/i', $files['ext']) ? img('application.png') : NULL).'
'.(preg_match('/mp4|3gp|avi|flv/i', $files['ext']) ? img('video.png') : NULL).'
'.(preg_match('/mp3|aac|amr|wav|midi|mid/i', $files['ext']) ? img('music.png') : NULL).'
'.(preg_match('/zip|rar|tar.gz|7z/i', $files['ext']) ? img('box.png') : NULL).'
<a href="/domens/file/'. $files['id'] .'/">'. $files['name'] .'</a><br/>
Цена: '.$files['cena'].' руб.
</div>';
}
}
$tpl->div('title', 'Купля-продажа доменов');
$tpl->div('menu', img('folder.png').' <a href="/domens/folder/2/">Россия и СНГ</a><br/><span style="font-size: xx-small;">.ru, .рф, .su, .ua и др.</span>');
$tpl->div('menu', img('folder.png').' <a href="/domens/folder/3/">Международные</a><br/><span style="font-size: xx-small;">.com, .net, .org, .biz и др.</span>');
$tpl->div('menu', img('folder.png').' <a href="/domens/folder/4/">Европа</a><br/><span style="font-size: xx-small;">.eu, .lt, .cz, .pl и др.</span>');
$tpl->div('menu', img('folder.png').' <a href="/domens/folder/5/">Америка</a><br/><span style="font-size: xx-small;">.us, .co, .bz, .lc и др.</span>');
$tpl->div('menu', img('folder.png').' <a href="/domens/folder/6/">Азия и Африка</a><br/><span style="font-size: xx-small;">.asia, .tw, .mn, .in и др.</span>');
$tpl->div('menu', img('folder.png').' <a href="/domens/folder/7/">Другие страны</a><br/><span style="font-size: xx-small;">.cc, .ws, .cx, .ms и др.</span>');
$tpl->div('title', 'Другое');
$tpl->div('menu', USERS_ICON .' <a href="/users/">'. $lang->word('users') .'</a> '. $stat->users() .'<br/>');
require_once(SYS.'/view/footer.php');
?>