Файл: in4at/emo.php
Строк: 139
<?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');
require('func.php');
$us=$row['user'];
echo head;
if(!isset($go)){
if ($vv!=0) echo '<div class="d0"><b>Мои эмоции</b></div>';
else echo '<card id="emo" title="Мои эмоции"><p>';
if ($vv!=0) echo "<form action="emo.php?$wp&go=rew" method="post">";
echo $fsize1;
echo '<b>Автоответчик для писем:</b><br/>';
echo $fsize2;
$avtootvet=$row['avtootvet'];
echo "<input name="avtootvet" maxlength="50" value="$avtootvet"/><br/>";
echo $fsize1;
echo divide;
echo '<b>Эмоции:</b><br/>';
echo $fsize2;
$selemoc=$row['selemoc'];
echo "<select name="selemoc">";
if($selemoc=="1") {
echo"<option value="1">Включены</option>";
echo"<option value="0">Выключены</option>";
}else{
echo"<option value="0">Выключены</option>";
echo"<option value="1">Включены</option>";
}
echo '</select><br/>';
echo $fsize1;
echo '<b>Личные эмоции:</b><br/>';
echo $fsize2;
$emocmenu=$row['emocmenu'];
echo "<select name="emocmenu">";
if($emocmenu=="1") {
echo"<option value="1">Да</option>";
echo"<option value="0">Нет</option>";
}else{
echo"<option value="0">Нет</option>";
echo"<option value="1">Да</option>";
}
echo '</select><br/>';
echo $fsize1;
echo 'Личные эмоции:<br/>';
echo $fsize2;
$emoc1=$row['emoc1'];
echo "<input name="emoc1" maxlength="12" value="$emoc1"/><br/>";
$emoc2=$row['emoc2'];
echo "<input name="emoc2" maxlength="12" value="$emoc2"/><br/>";
$emoc3=$row['emoc3'];
echo "<input name="emoc3" maxlength="12" value="$emoc3"/><br/>";
$emoc4=$row['emoc4'];
echo "<input name="emoc4" maxlength="12" value="$emoc4"/><br/>";
$emoc5=$row['emoc5'];
echo "<input name="emoc5" maxlength="12" value="$emoc5"/><br/>";
$emoc6=$row['emoc6'];
echo "<input name="emoc6" maxlength="12" value="$emoc6"/><br/>";
$emoc7=$row['emoc7'];
echo "<input name="emoc7" maxlength="12" value="$emoc7"/><br/>";
$emoc8=$row['emoc8'];
echo "<input name="emoc8" maxlength="12" value="$emoc8"/><br/>";
$emoc9=$row['emoc9'];
echo "<input name="emoc9" maxlength="12" value="$emoc9"/><br/>";
$emoc10=$row['emoc10'];
echo "<input name="emoc10" maxlength="12" value="$emoc10"/><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="emo.php?$wp&go=rew" method="post">n";
echo "<postfield name="avtootvet" value="$(avtootvet)"/>n";
echo "<postfield name="selemoc" value="$(selemoc)"/>n";
echo "<postfield name="emocmenu" value="$(emocmenu)"/>n";
echo "<postfield name="emoc1" value="$(emoc1)"/>n";
echo "<postfield name="emoc2" value="$(emoc2)"/>n";
echo "<postfield name="emoc3" value="$(emoc3)"/>n";
echo "<postfield name="emoc4" value="$(emoc4)"/>n";
echo "<postfield name="emoc5" value="$(emoc5)"/>n";
echo "<postfield name="emoc6" value="$(emoc6)"/>n";
echo "<postfield name="emoc7" value="$(emoc7)"/>n";
echo "<postfield name="emoc8" value="$(emoc8)"/>n";
echo "<postfield name="emoc9" value="$(emoc9)"/>n";
echo "<postfield name="emoc10" value="$(emoc10)"/>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;
}
$protected = $avtootvet.$selemoc.$emocmenu.$omail.$emoc1.$emoc2.$emoc3.$emoc4.$emoc5.$emoc6.$emoc7.$emoc8.$emoc9.$emoc10.$omail;
if (eregi("'",$protected)) { header('Location: http://'.chat_adr.'/error.php');die; }
if($row['translit']==1){
$avtootvet = trun_to_rus($avtootvet);
$selemoc = trun_to_rus($selemoc);
$emocmenu = trun_to_rus($emocmenu);
$emoc1 = trun_to_rus($emoc1);
$emoc2 = trun_to_rus($emoc2);
$emoc3 = trun_to_rus($emoc3);
$emoc4 = trun_to_rus($emoc4);
$emoc5 = trun_to_rus($emoc5);
$emoc6 = trun_to_rus($emoc6);
$emoc7 = trun_to_rus($emoc7);
$emoc8 = trun_to_rus($emoc8);
$emoc9 = trun_to_rus($emoc9);
$emoc10 = trun_to_rus($emoc10);
}
$avtootvet=check(substr($avtootvet,0,100));
$selemoc = intval(substr($selemoc,0,2));
$emocmenu = intval(substr($emocmenu,0,2));
$emoc1=check(substr($emoc1,0,24));
$emoc2=check(substr($emoc2,0,24));
$emoc3=check(substr($emoc3,0,24));
$emoc4=check(substr($emoc4,0,24));
$emoc5=check(substr($emoc5,0,24));
$emoc6=check(substr($emoc6,0,24));
$emoc7=check(substr($emoc7,0,24));
$emoc8=check(substr($emoc8,0,24));
$emoc9=check(substr($emoc9,0,24));
$emoc10=check(substr($emoc10,0,24));
if (!isset($error)) {
$result = mysql_query("Select id from users where id = '".$id."' LIMIT 1;");
if (mysql_affected_rows() == 0) {
$error = 'database error...';
} else {
$ins_str = "Update users set avtootvet = '".$avtootvet."', selemoc = '".$selemoc."', emocmenu = '".$emocmenu."', emoc1 = '".$emoc1."', emoc2 = '".$emoc2."', emoc3 = '".$emoc3."', emoc4 = '".$emoc4."', emoc5 = '".$emoc5."', emoc6 = '".$emoc6."', emoc7 = '".$emoc7."', emoc8 = '".$emoc8."', emoc9 = '".$emoc9."', emoc10 = '".$emoc10."' 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="emo.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/>';
if (isset($rm)) echo "<a href="chat.php?$wp&rm=$rm">В чат</a><br/>";
else echo "<a href="cabinet.php?$wp">Кабинет</a><br/>";
echo $fsize2;
echo foot;
?>