Файл: obmen/folder.php
Строк: 68
<?
include_once('../apahe/ini.php');
$obmen = mysql_fetch_assoc(mysql_query("SELECT * FROM `obmen` WHERE `id` = '".int($_GET['id'])."'"));
$urlup='/obmen/index';
$inc['title'] = 'Обменник - '.$obmen['name'].'';
include_once('../apahe/top.php');
if (!isset($apache)){
header ('location: /input.dll');
exit;
}
if (!$obmen){
header ('location: /obmen/index.dll');
exit;
}
$obmen_s = mysql_fetch_assoc(mysql_query("SELECT * FROM `obmen-s` WHERE `id` = '1'"));
echo '<div class="main-text">';
echo '<a href="index.dll" title="Обменник">Обменник</a>';
echo '</div>';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `obmen-p` WHERE `id-obmen` = '".int($obmen['id'])."'"), 0);
nav_start($total, $obmen_s[tf]);
if ($total != 0){
$obmen_p_c = mysql_query("SELECT * FROM `obmen-p` WHERE `id-obmen` = '".int($obmen['id'])."' ORDER BY `date` LIMIT $start, $obmen_s[tf]");
while ($obmen_p = mysql_fetch_assoc($obmen_p_c)){
$o_f = mysql_result(mysql_query("SELECT COUNT(*) FROM `obmen-f` WHERE `id-obmen-p` = '".int($obmen_p['id'])."'"), 0);
$o_f_new = mysql_result(mysql_query("SELECT COUNT(*) FROM `obmen-f` WHERE `id-obmen-p` = '".int($obmen_p['id'])."' and `date` > '".(time()-86400)."'"), 0);
echo '<div class="main-href">';
echo '<table width="100%" cellspacing="0" cellpadding="0">';
echo '<tr><td class="apa-l">';
echo '<a href="subfolder-'.int($obmen_p['id']).'.dll" title="'.$obmen_p['name'].'">';
iconsob('folder');
echo ''.$obmen_p['name'].'';
echo '</td>';
echo '<td class="apa-r">';
echo '<time>'.$o_f.'';
if ($o_f_new!=0)echo '<new>+'.$o_f_new.'</new>';
echo '</time>';
echo '</td></tr>';
echo '</table>';
echo '</div>';
}}else{
error('В этой папке подпапки еще не создавались.');
}
view_nav('/obmen/folder-'.int($obmen['id']).'.dll?');
include_once('../apahe/bottom.php');
?>