Файл: modules/obmen/new.php
Строк: 68
<?php
/* DCMS S (Special)
* Версия файла 0.0.1
* Дата последнего редактирования 25.11.2015
* Модифицировал densnet
*/
require_once '../../sys/inc/start.php';
require_once H . 'sys/inc/compress.php';
require_once H . 'sys/inc/sess.php';
require_once H . 'sys/inc/settings.php';
require_once H . 'sys/inc/db_connect.php';
require_once H . 'sys/inc/ipua.php';
require_once H . 'sys/inc/fnc.php';
require_once H . 'sys/inc/user.php';
$set['title'] = 'Обменник - Новые';
require_once H . 'sys/inc/thead.php';
aut(); // форма авторизации
err();
$k_new = mysql_result(mysql_query("SELECT COUNT(*) FROM `obmennik_files` WHERE `time` > '" . (time() - 86400) . "'"), 0);
$k_page = k_page($k_new, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
if ($k_new == 0) {
echo "<div class='list-group-item'>";
echo "<span class='fa fa-info-circle'></span> Нет результатов";
echo "</div>";
}
$q = mysql_query("SELECT * FROM `obmennik_files` WHERE `time` > '" . (time() - 86400) . "' ORDER BY time DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_array($q)) {
$ras = $post['ras'];
$file = H . "sys/obmen/files/$post[id].dat";
$name = $post['name'];
$size = $post['size'];
echo "<div class = 'list-group-item'>";
if ($post['ras'] == 'zip' || $post['ras'] == 'rar') {
$r = "<span class='fa fa-file-archive-o'></span>";
} elseif ($post['ras'] == 'png' || $post['ras'] == 'jpg' || $post['ras'] == 'jpeg' || $post['ras'] == 'gif') {
$r = "<span class='fa fa-file-image-o'></span>";
} elseif ($post['ras'] == 'mp3') {
$r = "<span class='fa fa-file-audio-o'></span>";
} elseif ($post['ras'] == 'txt') {
$r = "<span class='fa fa-file-text-o'></span>";
} elseif ($post['ras'] == 'mp4' || $post['ras'] == 'avi' || $post['ras'] == '3gp') {
$r = "<span class='fa fa-file-video-o'></span>";
} elseif ($post['ras'] == 'php') {
$r = "<span class='fa fa-file-code-o'></span>";
} else {
$r = "<span class='fa fa-file-o'></span>";
}
$dir = mysql_fetch_array(mysql_query("SELECT * FROM `obmennik_dir` WHERE `id` = '$post[id_dir]' LIMIT 1"));
if ($set['echo_rassh'] == 1) {
$ras = ".$post[ras]";
} else {
$ras = NULL;
}
echo "<a href='/modules/obmen$dir[dir]$post[name].$post[ras]?showinfo'>$r $post[name]$ras</a><br />";
echo "<span class='fa fa-folder-o'></span> <a href = '/modules/obmen$dir[dir]?'>$dir[name]</a>";
echo "</div>";
}
echo "<div class = 'list-group-item'><a href = '/modules/obmen/'><span class='fa fa-arrow-left'></span> Обменник</a></div>";
if ($k_page > 1) {
str('?', $k_page, $page);
} // Вывод страниц
require_once H . 'sys/inc/tfoot.php';