Вход Регистрация
Файл: public_html/modules/alliance/forum/addsection.php
Строк: 66
<?php
$root 
$_SERVER['DOCUMENT_ROOT'];
include_once (
$root.'/core/base.php');
falseauth(1);
$header "Форум альянса";
include_once (
$root.'/core/head.php');
$allianceId fl($_GET['alliance']);
if(empty(
$allianceId)) redirect('/alliance/');
if(
allianceInfo($allianceId'id') == 'error'redirect('/alliance');
if(
$u['alliance_id'] != $allianceId && $u['alliance_rank'] < 5redirect('/alliance/forum/'.$allianceId);
if(isset(
$_GET['confirm']))
{
    
$name fl($_POST['name']);
    
$access fl($_POST['access']);
    if(!
in_array($access, ['all''alliance'])) redirect('/alliance/forum/'.$allianceId);
    if(
$u['alliance_id'] == $allianceId && $u['alliance_rank'] == 5)
    {
        
$db->query("INSERT INTO `alliance_forum_sections` (`alliance`,`name`,`access`) VALUES ('".$allianceId."', '".$name."', '".$access."')");
        
header("Location: /alliance/forum/".$allianceId."/".$db->insert_id);
        exit;
    }
    else
    {
        
header("Location: /alliance/forum/".$allianceId);
        exit;
    }
}
echo 
'<a class = "link"><font color="white"><center><form action="/alliance/forum/'.$allianceId.'/createSection/confirm" method="post">
Название темы:<br>
<input type="text" name="name" required><br>
Доступ:<br>
<input type="radio" name="access" value="all"> Для всех<br>
<input type="radio" name="access" value="alliance"> Только для альянса<br>
<input type="submit" name="createSection" value="Добавить">
</form></center></font></a>'
;
include_once (
$root.'/core/foot.php');
Онлайн: 0
Реклама