Файл: in4at/buttons.php
Строк: 464
<?php
##################################################################################################
## Script name : In4at ##
## Version : Final ##
## Made by : XPYCT(Сергей Мищенко) ##
## E-mail : bce-ok@bk.ru ##
## ICQ : 447-50-50-62 ##
## Site : http://vkontakte.ru/id31604521 ##
## Внимание! Скрипт распространяется бесплатно! Модификация W4at by XPYCT ##
##################################################################################################
define('REQ_2_chat', true);
require('4at_set.php');
require('db_con.php');
require('style.php');
if ($py !== spy_code) require('us_info.php');
$us=$row['user'];
echo head;
if(!isset($go)){
if ($vv!=0) echo '<div class="d0"><b>Soft-кнопки</b></div>';
else echo '<card id="buttons" title="Soft-кнопки"><p>';
if ($vv!=0) echo "<form action="buttons.php?$wp&go=rew" method="post">";
echo $fsize1;
echo 'Обновить:<br/>';
echo $fsize2;
echo "<select name="kn_update">n";
if($row["kn_update"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Сказать:<br/>';
echo $fsize2;
echo "<select name="kn_say">n";
if($row["kn_say"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Записки:<br/>';
echo $fsize2;
echo "<select name="kn_letters">n";
if($row["kn_letters"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Кто Где?:<br/>';
echo $fsize2;
echo "<select name="kn_whochat">n";
if($row["kn_whochat"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Кто Тут?:<br/>';
echo $fsize2;
echo "<select name="kn_whoroom">n";
if($row["kn_whoroom"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Прихожая:<br/>';
echo $fsize2;
echo "<select name="kn_holl">n";
if($row["kn_holl"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Статистика:(Викт.)<br/>';
echo $fsize2;
echo "<select name="kn_stats">n";
if($row["kn_stats"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Команды:(Викт.)<br/>';
echo $fsize2;
echo "<select name="kn_kommands">n";
if($row["kn_kommands"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Купить ответ:(Викт.)<br/>';
echo $fsize2;
echo "<select name="trade">n";
if($row["trade"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Настроение:<br/>';
echo $fsize2;
echo "<select name="kn_nood">n";
if($row["kn_nood"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Вызов модера:<br/>';
echo $fsize2;
echo "<select name="kn_sos">n";
if($row["kn_sos"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Кабинет:<br/>';
echo $fsize2;
echo "<select name="kn_cabinet">n";
if($row["kn_cabinet"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
echo $fsize1;
echo 'Фильтр[P!]:<br/>';
echo $fsize2;
echo "<select name="kn_filtr">n";
if($row["kn_filtr"] == 0){
echo "<option value="0">Отключен</option>n";
echo "<option value="1">Включен</option>n";
} else {
echo "<option value="1">Включен</option>n";
echo "<option value="0">Отключен</option>n";
}
echo '</select><br/>';
if($row['level']>3) {
echo $fsize1;
echo 'Panel:<br/>';
echo $fsize2;
echo "<select name="kn_panel">n";
if($row["kn_panel"] == 0){
echo "<option value="0">Включен</option>n";
echo "<option value="1">Отключен</option>n";
} else {
echo "<option value="1">Отключен</option>n";
echo "<option value="0">Включен</option>n";
}
echo '</select><br/>';
}
if ($vv!=0){
echo "<input class="ibutton" type="submit" value="Сохранить"/></form>";
echo $fsize1;
} else {
echo $fsize1;
echo "<anchor title="go">Сохранить<go href="buttons.php?$wp&go=rew" method="post">n";
echo "<postfield name="kn_say" value="$(kn_say)"/>n";
echo "<postfield name="kn_update" value="$(kn_update)"/>n";
echo "<postfield name="kn_letters" value="$(kn_letters)"/>n";
echo "<postfield name="kn_whochat" value="$(kn_whochat)"/>n";
echo "<postfield name="kn_whoroom" value="$(kn_whoroom)"/>n";
echo "<postfield name="kn_holl" value="$(kn_holl)"/>n";
echo "<postfield name="kn_stats" value="$(kn_stats)"/>n";
echo "<postfield name="kn_kommands" value="$(kn_kommands)"/>n";
echo "<postfield name="trade" value="$(trade)"/>n";
echo "<postfield name="kn_nood" value="$(kn_nood)"/>n";
echo "<postfield name="kn_sos" value="$(kn_sos)"/>n";
echo "<postfield name="kn_cabinet" value="$(kn_cabinet)"/>n";
echo "<postfield name="kn_filtr" value="$(kn_filtr)"/>n";
if($row['level']>3) echo "<postfield name="kn_panel" value="$(kn_panel)"/>n";
echo '</go></anchor><br/>';
}
echo divide;
echo '<a href="cabinet.php?'.$wp.'">Кабuнет</a><br/>';
echo '<a href="enter.php?'.$wp.'">Пpuxoжaя</a><br/>';
echo $fsize2;
echo foot;
mysql_close ($link);
exit;
}
$protected = $kn_say.$kn_update.$kn_letters.$kn_whochat.$kn_whoroom.$kn_smile.$kn_holl.$kn_stats.$kn_kommands.$trade.$kn_topic.$kn_nood.$kn_sos.$kn_cabinet.$kn_clroom.$kn_filtr.$kn_panel;
if (eregi("'",$protected)) { header('Location: http://'.chat_adr.'/error.php');die; }
if (!ctype_digit($kn_say)) { header("Location: error.php");die;}
if (!ctype_digit($kn_update)) { header("Location: error.php");die;}
if (!ctype_digit($kn_letters)) { header("Location: error.php");die;}
if (!ctype_digit($kn_whochat)) { header("Location: error.php");die;}
if (!ctype_digit($kn_whoroom)) { header("Location: error.php");die;}
if (!ctype_digit($kn_holl)) { header("Location: error.php");die;}
if (!ctype_digit($kn_stats)) { header("Location: error.php");die;}
if (!ctype_digit($kn_kommands)) { header("Location: error.php");die;}
if (!ctype_digit($trade)) { header("Location: error.php");die;}
if (!ctype_digit($kn_nood)) { header("Location: error.php");die;}
if (!ctype_digit($kn_sos)) { header("Location: error.php");die;}
if (!ctype_digit($kn_cabinet)) { header("Location: error.php");die;}
if (!ctype_digit($kn_filtr)) { header("Location: error.php");die;}
if (isset($kn_panel) and !ctype_digit($kn_panel)) { header("Location: error.php");die;}
if (!isset($error)) {
$result = mysql_query("Select * users where id = '".$id."' LIMIT 1;");
if (mysql_affected_rows() == 0) {
$error = 'database error...';
} else {
$kn_say = intval($kn_say);
$kn_update = intval($kn_update);
$kn_letters = intval($kn_letters);
$kn_whochat = intval($kn_whochat);
$kn_whoroom = intval($kn_whoroom);
$kn_holl = intval($kn_holl);
$kn_stats = intval($kn_stats);
$kn_kommands = intval($kn_kommands);
$trade = intval($trade);
$kn_nood = intval($kn_nood);
$kn_sos = intval($kn_sos);
$kn_cabinet = intval($kn_cabinet);
$kn_filtr = intval($kn_filtr);
$kn_panel = intval($kn_panel);
$ins_str = "Update users set kn_say ='".$kn_say."', kn_update='".$kn_update."', kn_letters='".$kn_letters."', kn_whochat='".$kn_whochat."', kn_whoroom='".$kn_whoroom."', kn_holl='".$kn_holl."', kn_stats='".$kn_stats."', kn_kommands='".$kn_kommands."', trade='".$trade."', kn_nood='".$kn_nood."', kn_sos='".$kn_sos."', kn_cabinet='".$kn_cabinet."', kn_panel='".$kn_panel."', kn_filtr='".$kn_filtr."' where id ='".$id."' LIMIT 1;";
}
if (mysql_query($ins_str)) {
$msg = 'Ваши настройки изменены';
} else {
$error = " ".mysql_error()." ";
}
}
mysql_close($link);
if (isset($error)) {
if ($vv!=0) echo '<div class="d0"><b>Ошибка</b></div>';
else echo "<card id="error" title="Ошибка" ontimer="buttons.php?$wp"><timer value="10"/><p align="center">";
echo $fsize1;
echo '<b>'.$error.'</b>';
echo "<a href="cabinet.php?$wp">Назад</a><br/>";
echo $fsize2;
echo foot;
exit;
}
if ($vv!=0) echo '<div class="d0"><b>Ok!</b></div>';
else echo "<card id="ok" title="Ok!" ontimer="cabinet.php?$wp"><timer value="10"/><p align="center">";
echo $fsize1;
echo '<b>'.$msg.'</b><br/>';
echo "<a href="cabinet.php?$wp">Кабинет</a><br/>";
echo $fsize2;
echo foot;
?>