Вход Регистрация
Файл: public_html/modules/alliance/forum/section.php
Строк: 55
<?php
$root 
$_SERVER['DOCUMENT_ROOT'];
include_once (
$root.'/core/base.php');
falseauth();
$header "Форум альянса";
include_once (
$root.'/core/head.php');
$allianceId fl($_GET['alliance']);
if(empty(
$allianceId)) redirect('/alliance/');
if(
allianceInfo($allianceId'id') == 'error'redirect('/alliance');
$section fl($_GET['section']);
$sect $db->query("SELECT * FROM `alliance_forum_sections` WHERE `id` = '".$section."'")->fetch_object();
if(
$sect->access != 'all' && $u['alliance_id'] != $allianceIdredirect('/alliance/forum/'.$allianceId);
$count $db -> query("SELECT * FROM `alliance_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 `alliance_forum_themes` WHERE `section_id` = '".$section."' ORDER BY `time` DESC LIMIT $start, 5");
while(
$q $sql->fetch_object())
{
    echo 
'<a class = "link" href="/alliance/forum/'.$allianceId.'/'.$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('/alliance/forum/'.$allianceId.'/'.$section.'/?',$k_page,$page);
if(
$sect->access == 'all' || $u['alliance_id'] == $allianceId) echo '<br><center><a href="/alliance/forum/'.$allianceId.'/'.$section.'/addTheme" class = "btn _green">Добавить тему</a></center>';
include_once (
$root.'/core/foot.php');
Онлайн: 0
Реклама