Файл: public_html/modules/forum/section.php
Строк: 33
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
include_once ($root.'/core/base.php');
falseauth();
$header = "Форум";
include_once ($root.'/core/head.php');
$section = fl($_GET['section']);
$sect = $db->query("SELECT * FROM `forum_sections` WHERE `id` = '".$section."'")->fetch_object();
$count = $db -> query("SELECT * FROM `forum_themes` WHERE `section_id` = '".$section."' ORDER BY `time` DESC") -> num_rows;
$k_page = k_page($count,10);
$page = page($k_page);
$start = 10*$page-10;
$sql = $db -> query("SELECT * FROM `forum_themes` WHERE `section_id` = '".$section."' ORDER BY `time` DESC LIMIT $start, 5");
while($q = $sql->fetch_object())
{
echo '<a class = "link" href="/forum/'.$section.'/theme'.$q->id.'"><img src="/images/icons/9.png" width="35" height="35"> '.$q->name.'</a>';
}
if($count < 1) echo '<a class = "link">Нет тем</a>';
if($count >= 10) echo str('/forum/'.$section.'/?',$k_page,$page);
if($u['admin'] >= $sect->access) echo '<br><center><a href="/forum/'.$section.'/addTheme" class = "btn _green">Добавить тему</a></center>';
include_once ($root.'/core/foot.php');