Файл: public_html/klan/adm_panel/set.php
Строк: 88
<?
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
$set['title'] = 'Админка';
include_once '../../sys/inc/thead.php';
title();
aut();
$id = intval($_GET['id']);
$us = mysql_fetch_array(mysql_query("SELECT * FROM `clan_user` WHERE `id_user` = '$user[id]' AND `id_clan` = '$id' LIMIT 1"));
if($us['level']==2){
echo "<div class='p_t'><center><img src='/klan/img/01.png'/></center></div>";
if (isset($_POST['msg']))
{
$msg=esc($_POST['msg']);
if (strlen2($msg)>50){$err='Название слишком большое';}
if (strlen2($msg)<2){$err='Название слишком короткие';}
$msg=mysql_real_escape_string($msg);
$all=intval($_POST['all']);
if (!isset($err)){
mysql_query("UPDATE `clan` SET `name` = '".$msg."' , `all` = '".$all."' WHERE `id` = '$id' LIMIT 1");
msg('Описание изменено');
}
}
$clan = mysql_fetch_array(mysql_query("SELECT * FROM `clan` WHERE `id` = '$id' LIMIT 1"));
echo "<div class='p_m'>n";
echo "<form method="post" action="?id=$id&act=set">n";
echo "Название клана:<br />n<input type='text' name='msg' value='$clan[name]'/><br />n";
echo "Вступление в клан:<br/>n<select name='all'>n";
echo "<option value='0'".($clan['all']==0?" selected='selected'":null).">Свободное</option>n";
echo "<option value='1'".($clan['all']==1?" selected='selected'":null).">С активацией</option>n";
echo "</select><br />n";
echo "<input value="Сохранить" type="submit" />n";
echo "</form>n";
echo "</div>n";
echo "<img src='/klan/img/nazad.png'/> | <a href='index.php?id=$id'>Админка </a><br/>n";
echo "</div>n";
}
include '../inc/foot.php';
include_once '../../sys/inc/tfoot.php';
?>