File size: 4.54Kb
<?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>Клавиши</b></div>';
else echo '<card id="bind" title="Клавиши"><p>';
if ($vv!=0) echo "<form action=\"bind.php?$wp&go=rew\" method=\"post\">";
echo $fsize1;
echo '<b>Сказать:</b><br/>';
echo $fsize2;
$bind1=$row['bind1'];
echo "<input size=\"1\" name=\"bind1$ref\" maxlength=\"1\" value=\"$bind1\"/><br/>";
echo $fsize1;
echo '<b>Обновить:</b><br/>';
echo $fsize2;
$bind2=$row['bind2'];
echo "<input size=\"1\" name=\"bind2$ref\" maxlength=\"1\" value=\"$bind2\"/><br/>";
echo $fsize1;
echo '<b>История:</b><br/>';
echo $fsize2;
$bind3=$row['bind3'];
echo "<input size=\"1\" name=\"bind3$ref\" maxlength=\"1\" value=\"$bind3\"/><br/>";
echo $fsize1;
echo '<b>Прихожая:</b><br/>';
echo $fsize2;
$bind4=$row['bind4'];
echo "<input size=\"1\" name=\"bind4$ref\" maxlength=\"1\" value=\"$bind4\"/><br/>";
echo $fsize1;
echo '<b>След.:</b><br/>';
echo $fsize2;
$bind5=$row['bind5'];
echo "<input size=\"1\" name=\"bind5$ref\" maxlength=\"1\" value=\"$bind5\"/><br/>";
echo $fsize1;
echo '<b>Пред.:</b><br/>';
echo $fsize2;
$bind6=$row['bind6'];
echo "<input size=\"1\" name=\"bind6$ref\" maxlength=\"1\" value=\"$bind6\"/><br/>";
if ($vv!=0){
echo "<input class=\"ibutton\" type=\"submit\" value=\"Сохранить\"/></form>";
echo $fsize1;
} else {
echo $fsize1;
echo divide;
echo "<anchor title=\"go\">Сохранить<go href=\"bind.php?$wp&go=rew\" method=\"post\">\n";
echo "<postfield name=\"bind1\" value=\"$(bind1$ref)\"/>\n";
echo "<postfield name=\"bind2\" value=\"$(bind2$ref)\"/>\n";
echo "<postfield name=\"bind3\" value=\"$(bind3$ref)\"/>\n";
echo "<postfield name=\"bind4\" value=\"$(bind4$ref)\"/>\n";
echo "<postfield name=\"bind5\" value=\"$(bind5$ref)\"/>\n";
echo "<postfield name=\"bind6\" value=\"$(bind6$ref)\"/>\n";
echo '</go></anchor><br/>';
}
echo divide;
echo "<a href=\"cabinet.php?$wp\">Личный кабинет</a><br/>\n";
echo '<a href="enter.php?'.$wp.'">Пpuxoжaя</a><br/>';
echo $fsize2;
echo foot;
mysql_close ($link);
exit;
}
if (!ctype_digit($bind1)) { header("Location: error.php");die;}
if (!ctype_digit($bind2)) { header("Location: error.php");die;}
if (!ctype_digit($bind3)) { header("Location: error.php");die;}
if (!ctype_digit($bind4)) { header("Location: error.php");die;}
if (!ctype_digit($bind5)) { header("Location: error.php");die;}
if (!ctype_digit($bind6)) { 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 {
$bind1 = intval($bind1);
$bind2 = intval($bind2);
$bind3 = intval($bind3);
$bind4 = intval($bind4);
$bind5 = intval($bind5);
$bind6 = intval($bind6);
$ins_str = "Update users set bind1 = '".$bind1."',bind2 = '".$bind2."',bind3 = '".$bind3."',bind4 = '".$bind4."',bind5 = '".$bind5."',bind6 = '".$bind6."' where id ='".$id."' LIMIT 1;";
}
if (mysql_query($ins_str)) {
$msg = 'Ваши настройки изменены';
} else {
$error = " ".mysql_error()." ";
}
}
mysql_close($link);
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;
?>