Файл: region_clean/anket.php
Строк: 1328
<?php
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################
require_once "start.php";
require_once "sid.php";
header("Cache-Control: no-cache");
if ($ver == "wml") header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else header("Content-Type:text/html; charset=UTF-8");
require_once "inc.php";
$link = connect_db();
list($row, $id, $ps, $fsize1, $fsize2) = check_login($link);
require_once "version.php";
switch ($mod) {
default:
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="anketa" title="Анкета">n
<p align="left" mode="wrap">n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Анкета</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo '<div class = "d1"><b>Моя анкета</b></div><br/>
• <a href="anket.php?'.$ses.'&mod=profile&ref='.$ref.'">Основное</a><br/>
• <a href="anket.php?'.$ses.'&mod=lichka&ref='.$ref.'">Личное</a><br/>
• <a href="anket.php?'.$ses.'&mod=uwlech&ref='.$ref.'">Увлечения</a><br/>
• <a href="anket.php?'.$ses.'&mod=obraz&ref='.$ref.'">Образование</a><br/>
• <a href="anket.php?'.$ses.'&mod=rabota&ref='.$ref.'">Работа</a><br/>
• <a href="anket.php?'.$ses.'&mod=slujba&ref='.$ref.'">Служба</a><br/>
<br/><div class = "d1"><a href = "cabinet.php?'.$ses.'&ref='.$ref.'">В кабинет</a><br/>
<a href = "enter.php?'.$ses.'&ref='.$ref.'">В прихожую</a></div>';
include_once 'foot.php';
break;
case 'profile':
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>
<card id="profile" title="Анкета">n
<p align="left">
Редактор профиля доступен только в xHTML версии чата.<br/><a href="enter.php?$ses&ver=xhtml&ref=$ref">В прихожую</a><br/>";
echo $fsize2;
include_once 'foot.php';
exit;
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Основное</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">
<form method="POST" action="anket.php?$ses&mod=profile&go=rew&ref=$ref" name="auth">n";
}
echo '<div class = "d1"><b>Основное</b></div>';
if (!isset($err)) $err = "";
if (!isset($go)) {
echo $fsize1;
echo '<br/><b>Мой пароль:</b><br/>';
echo $fsize2;
echo '<input type="password" name="pass" maxlength="20" value="'.$ps.'" title="pass" emptyok="false"><br/>';
echo $fsize1;
echo '<b>Меня зовут:</b><br/>';
echo $fsize2;
echo '<input name="name" maxlength="15" value="'.$row[name].'" title="name" emptyok="false"><br/>';
if ($row["sex"] === "М") {
echo $fsize1;
echo 'Пол:<br/>';
echo $fsize2;
echo '<select name="sex">
<option value="М">Парень</option>
<option value="Ж">Девушка</option>
</select><br/>';
} else {
echo $fsize1;
echo 'Пол:<br/>';
echo $fsize2;
echo '<select name="sex">
<option value="Ж">Девушка</option>
<option value="М">Парень</option>
</select><br/>';
}
@list( $day, $month, $year ) = split( '-', $row["birth"] );
$month1 = $month;
$month1 = str_replace("01","Января",$month1);
$month1 = str_replace("02","Февраля",$month1);
$month1 = str_replace("03","Марта",$month1);
$month1 = str_replace("04","Апреля",$month1);
$month1 = str_replace("05","Мая",$month1);
$month1 = str_replace("06","Июня",$month1);
$month1 = str_replace("07","Июля",$month1);
$month1 = str_replace("08","Августа",$month1);
$month1 = str_replace("09","Сентября",$month1);
$month1 = str_replace("10","Октября",$month1);
$month1 = str_replace("11","Ноября",$month1);
$month1 = str_replace("12","Декабря",$month1);
$month1 = str_replace("00","",$month1);
echo '<br/>День рождения: <b>' . $day . ' ' . $month1 . ' ' . $year . ' г.</b><br/>
<a href = "anket.php?'.$ses.'&mod=dat&ref='.$ref.'">Изменить</a><br/><br/>';
echo $fsize1;
echo '<b>Город:</b><br/>';
echo $fsize2;
echo '<input name="city" maxlength="40" value="'.$row['city'].'" title="city" emptyok="false"><br/>';
echo $fsize1;
echo 'Оператор:<br/>';
echo $fsize2;
echo '<input name="op" maxlength="20" value="'.$row['op'].'" title="op" emptyok="true"><br/>';
echo $fsize1;
echo 'Модель телефона:<br/>';
echo $fsize2;
echo '<input name="mob" maxlength="40" value="'.$row['mob'].'" title="mob" emptyok="true"><br/>';
echo $fsize1;
echo 'Номер телефона:<br/>';
echo '+';
echo $fsize2;
echo '<input name="number" maxlength="12" value="'.$row['number'].'" format="*N" title="number" emptyok="true"><br/>';
echo $fsize1;
echo 'E-mail:<br/>';
echo $fsize2;
echo '<input name="mail" maxlength="70" value="'.$row['mail'].'" title="mail" emptyok="true"><br/>';
echo $fsize1;
echo 'ICQ:<br/>';
echo $fsize2;
echo '<input name="icq" maxlength="11" value="'.$row['icq'].'" title="icq" emptyok="true"><br/>';
echo $fsize1;
echo '<b>О себе:</b><br/>';
echo $fsize2;
echo '<input name="infa" maxlength="220" value="'.$row['infa'].'" title="infa" emptyok="false"><br/>';
echo $fsize1;
echo 'Текст автоответчика(записки):<br/>';
echo $fsize2;
echo '<input name="avtootvet" maxlength="100" value="'.$row['avtootvet'].'" title="avtootvet" emptyok="true"><br/>';
echo $fsize1;
echo $divide;
echo $fsize2;
if ($ver == "wml") {
echo $fsize1;
echo '<anchor title="go">Сохранить<go href="anket.php?'.$ses.'&mod=profile&go=rew&ref='.$ref.'" method="post">
<postfield name="passx" value="$row([pass])"/>
<postfield name="name" value="$(name)"/>
<postfield name="sex" value="$(sex)"/>
<postfield name="op" value="$(op)"/>
<postfield name="mob" value="$(mob)"/>
<postfield name="number" value="$(number)"/>
<postfield name="mail" value="$(mail)"/>
<postfield name="city" value="$(city)"/>
<postfield name="icq" value="$(icq)"/>
<postfield name="infa" value="$(infa)"/>
<postfield name="avtootvet" value="$(avtootvet)"/>
</go></anchor>';
echo $fsize2;
echo '<br/>';
} else {
echo '<input type="submit" class="ibutton" value="Сохранить" name="enter"><br/>';
}
echo $fsize1;
echo $divide;
echo "<a href="enter.php?$ses&ref=$ref">Прихожая</a>n";
echo $fsize2;
include_once 'foot.php';
exit;
}
$error = "Ошибка! Или заполнено поле пароль.";
if ($row["translit"] == 1) {
$name = trun_to_rus($name);
$city = trun_to_rus($city);
$infa = trun_to_rus($infa);
$avtootvet = trun_to_rus($avtootvet);
}
$emp2 = "Неправильный формат данных!";
$emp = "Не заполнены обязательные поля!";
if ($mail != '' and !preg_match('/^[a-zA-Z0-9-._]{3,25}@[a-zA-Z0-9-]{2,25}.[a-zA-Z]{2,4}$/',$_POST['mail'])) {
echo 'Не верный формат email!<br/>';
break;
}
if ($name == "") {
$msg = $emp;
}
elseif ($pass == "") {
$msg = $emp;
}
elseif ($city == "") {
$msg = $emp;
}
elseif ($infa == "") {
$msg = $emp;
}
else
{
$pass = check($pass);
$name = mysql_real_escape_string(check($name));
$city = mysql_real_escape_string(check($city));
$mail = mysql_real_escape_string(check($mail));
$infa = mysql_real_escape_string(check($infa));
$avtootvet = mysql_real_escape_string(check($avtootvet));
$icq = mysql_real_escape_string(check($icq));
$sex = mysql_real_escape_string(check($sex));
$op = mysql_real_escape_string(check($op));
$mob = mysql_real_escape_string(check($mob));
$number = mysql_real_escape_string(check($number));
$number = abs(intval($number));
$icq = abs(intval($icq));
$infa = substr($infa,0,400);
$avtootvet = substr($avtootvet,0,100);
if (!eregi("^[a-z0-9._-]+@[a-z0-9._-]+.[a-z]{2,4}$", $mail)) $mail = "";
if ($_POST['pass'] != '') {
if (!preg_match("!^[a-z0-9]+$!i",$pass)) {
echo 'Недопустимые символы в пароле!';
exit;
}
if (strlen($pass) < 6) {
echo 'Пароль не должен быть короче шести символов!';
exit;
}
$pass = md5($_POST['pass']);
if (mysql_query ("Update users set pass='".$pass."', name='".$name."', sex='".$sex."', city='".$city."', mail='".$mail."', icq='".$icq."', infa='".$infa."', op='".$op."', mob='".$mob."', number='".$number."', avtootvet='".$avtootvet."' where id ='$id'")) {
echo "Твой профиль изменён <br/><br/><a href='enter.php?$ses&ref=$ref'>Продолжить!</a>";
$error = False;
} else {
$msg = "Error!";
}
}
mysql_close($link);
}
if ($error) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="error" title="Ошибка" ontimer="anket.php?$ses&ref=$ref"><timer value="20"/>n
<do type="prev" label="Back"><prev/></do>n
<p>n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ошибка!</title>
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=anket.php?$ses&ref=$ref">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<b>' .$error. '</b>';
echo $fsize2;
include_once 'foot.php';
exit;
}
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="ok" title="OK" ontimer="anket.php?$ses&ref=$ref"><timer value="20"/>n
<p>n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ок</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<b>' .$msg. '</b><br/>';
echo $fsize2;
include_once 'foot.php';
break;
#################################
case 'lichka':
if (!isset($err)) $err = "";
if (!isset($go)) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="lichka" title="Личное">n
<p>n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Личное</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">
<form method="post" action="anket.php?$ses&mod=lichka&go=rew&ref=$ref" name="auth">n<div>";
}
echo '<div class = "d1"><b>Личное</b></div>';
echo $fsize1;
echo '<br/>Рост:<br/>';
echo $fsize2;
echo '<input name="rost" maxlength="3" value="'.$row['rost'].'" title="rost" /><br/>';
echo $fsize1;
echo 'Вес:<br/>';
echo $fsize2;
echo '<input name="ves" maxlength="3" value="'.$row['ves'].'" title="ves" /><br/>';
echo $fsize1;
echo 'Фамилия:<br/>';
echo $fsize2;
echo '<input name="family" maxlength="15" value="'.$row['family'].'" title="family" /><br/>';
echo $fsize1;
echo 'Отчество:<br/>';
echo $fsize2;
echo '<input name="otch" maxlength="15" value="'.$row['otch'].'" title="otch" /><br/>';
echo $fsize1;
echo 'Курение:<br/><select name="kuren" class="input">
<option value="'.$row['kuren'].'">'.$row['kuren'].'</option>
<option value="Не курю">Не курю</option>
<option value="Курю,но редко">Курю,но редко</option>
<option value="Бросаю">Бросаю</option>
<option value="Курю,как паровоз">Курю,как паровоз</option>
</select><br/>';
echo $fsize2;
echo 'Алкоголь:<br/><select name="alkog" class="input">
<option value="'.$row['alkog'].'">'.$row['alkog'].'</option>
<option value="Не пью">Не пью</option>
<option value="Только по праздникам и в хорошей компании">Только по праздникам и в хорошей компании</option>
<option value="Люблю выпить">Люблю выпить</option>
</select><br/>';
echo $fsize1;
echo 'Наркотики:<br/><select name="vrpr" class="input">
<option value="'.$row['vrpr'].'">'.$row['vrpr'].'</option>
<option value="Нет,не принимал(а)">Нет,не принимал(а)</option>
<option value="Покуриваю травку">Покуриваю травку</option>
<option value="Принимаю легкие">Принимаю легкие</option>
<option value="Принимаю тяжелые">Принимаю тяжелые</option>
<option value="Бросаю">Бросаю</option>
<option value="Прохожу лечение">Прохожу лечение</option>
<option value="Бросил(а)">Бросил(а)</option>
</select><br/>';
echo $fsize2;
echo 'Цвет глаз:<br/><select name="glaz" class="input">
<option value="'.$row['glaz'].'">'.$row['glaz'].'</option>
<option value="Зеленые">Зеленые</option>
<option value="Голубые">Голубые</option>
<option value="Карие">Карие</option>
<option value="Темные">Темные</option>
<option value="Серые">Серые</option>
</select><br/>';
echo $fsize1;
if ($row['sex'] == "М") {
echo 'С/П:<br/><select name="sp" class="input">
<option value="'.$row['sp'].'">'.$row['sp'].'</option>
<option value="Не женат">Не женат</option>
<option value="В активном поиске">В активном поиске</option>
<option value="Есть подруга">Есть подруга</option>
<option value="Женат">Женат</option>
<option value="Все сложно">Все сложно</option>
</select><br/>';
} else {
echo 'С/П:<br/><select name="sp" class="input">
<option value="'.$row['sp'].'">'.$row['sp'].'</option>
<option value="Не замужем">Не замужем</option>
<option value="В активном поиске">В активном поиске</option>
<option value="Есть друг">Есть друг</option>
<option value="Замужем">Замужем</option>
<option value="Все сложно">Все сложно</option>
</select><br/>';
}
echo $fsize2;
if ($row['sex'] == "М") {
echo 'Цель:<br/><select name="cel" class="input">
<option value="'.$row['cel'].'">'.$row['cel'].'</option>
<option value="Дружба,общение">Дружба,общение</option>
<option value="Любовь,отношения">Любовь,отношения</option>
<option value="Секс,интим">Секс,интим</option>
<option value="Хочу женится">Хочу женится</option>
</select><br/>';
} else {
echo 'Цель:<br/><select name="cel" class="input">
<option value="'.$row['cel'].'">'.$row['cel'].'</option>
<option value="Дружба,общение">Дружба,общение</option>
<option value="Любовь,интим">Любовь,интим</option>
<option value="Секс,интим">Секс,интим</option>
<option value="Хочу замуж">Хочу замуж</option>
</select><br/>';
}
echo $fsize1;
if ($row['sex'] == "М") {
echo 'Ориентация:<br/><select name="ori" class="input">
<option value="'.$row['ori'].'">'.$row['ori'].'</option>
<option value="Гетеро">Гетеро</option>
<option value="Гей">Гей</option>
<option value="Би">Би</option>
</select><br/>';
} else {
echo 'Ориентация:<br/><select name="ori" class="input">
<option value="'.$row['ori'].'">'.$row['ori'].'</option>
<option value="Гетеро">Гетеро</option>
<option value="Лесби">Лесби</option>
<option value="Би">Би</option>
</select><br/>';
}
echo $fsize2;
echo 'Группа:<br/><select name="grup" class="input">
<option value="'.$row['grup'].'">'.$row['grup'].'</option>
<option value="Школьники и школьницы">Школьники и школьницы</option>
<option value="Студенты">Студенты</option>
<option value="Лидеры">Лидеры</option>
<option value="Умные">Умные</option>
<option value="Бездельники">Бездельники</option>
<option value="Soc4aTОвцы">Soc4aTОвцы</option>
</select><br/>';
echo $fsize1;
echo 'ВКонтакте id: (только цифры)<br/>';
echo $fsize2;
echo '<input name="vk" maxlength="10" value="'.$row['vk'].'" title="vk"/><br/>';
echo $divide;
echo $fsize1;
if ($ver == "wml") {
echo $fsize2;
echo '<anchor title="go">Изменить<go href="anket.php?'.$ses.'&mod=lichka&go=rew&ref='.$ref.'" method="post">
<postfield name="family" value="$(family)"/>
<postfield name="otch" value="$(otch)"/>
<postfield name="vrpr" value="$(vrpr)"/>
<postfield name="rost" value="$(rost)"/>
<postfield name="ves" value="$(ves)"/>
<postfield name="glaz" value="$(glaz)"/>
<postfield name="sp" value="$(sp)"/>
<postfield name="cel" value="$(cel)"/>
<postfield name="ori" value="$(ori)"/>
<postfield name="grup" value="$(grup)"/>
<postfield name="vk" value="$(vk)"/>
<postfield name="alkog" value="$(alkog)"/>
<postfield name="kuren" value="$(kuren)"/>
</go></anchor>';
echo $fsize1;
echo '<br/>';
} else {
echo '<input type="submit" class="ibutton" value="Сохранить" name="enter"/><br/>
</div>
</form>';
}
echo $fsize2;
echo $divide;
echo "<div class = 'd1'><a href="cabinet.php?$ses&ref=$ref">Личный кабинет</a><br/>n
<a href="anket.php?$ses&ref=$ref">Редактировать анкету</a><br/>n
<a href="enter.php?$ses&ref=$ref">Прихожая</a></div>n";
echo $fsize1;
include_once 'foot.php';
exit;
}
if (!empty($rost) and !is_numeric($rost)) {
include_once 'obolochka.php';
echo 'Рост вводится цыфрами!';
exit;
}
if ($rost > 230)
{
include_once 'obolochka.php';
echo 'Неужто такой рост? :)';
exit;
}
if ($ves > 120)
{
include_once 'obolochka.php';
echo 'Вряд-ли ты стока весишь:)';
exit;
}
if (!empty($ves) and !is_numeric($ves)) {
include_once 'obolochka.php';
echo 'Вес вводится цыфрами!';
exit;
}
if (!empty($vk) and !is_numeric($vk)) {
include_once 'obolochka.php';
echo 'id ВКонтакте вводится цифрами!';
exit;
}
$family = mysql_real_escape_string(check($family));
$otch = mysql_real_escape_string(check($otch));
$vrpr = mysql_real_escape_string(check($vrpr));
$rost = mysql_real_escape_string(check($rost));
$ves = mysql_real_escape_string(check($ves));
$glaz = mysql_real_escape_string(check($glaz));
$cel = mysql_real_escape_string(check($cel));
$sp = mysql_real_escape_string(check($sp));
$ori = mysql_real_escape_string(check($ori));
$grup = mysql_real_escape_string(check($grup));
$alkog = mysql_real_escape_string(check($alkog));
$kuren = mysql_real_escape_string(check($kuren));
$rost = abs(intval($rost));
$ves = abs(intval($ves));
if (mysql_query ("Update `users` set family='".$family."', otch='".$otch."', vrpr='".$vrpr."', rost='".$rost."', ves='".$ves."', glaz='".$glaz."', sp='".$sp."', cel='".$cel."', ori='".$ori."', grup='".$grup."', vk='".$vk."', kuren='".$kuren."', alkog='".$alkog."' where `id` ='$id'")) {
$msg = "<b>Изменено!</b>";
} else {
$msg = "<b>Ошибка!</b>";
}
mysql_close($link);
if ($error) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="error" title="Ошибка!" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<do type="prev" label="Back"><prev/></do>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ошибка!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo $error;
echo $fsize2;
include_once 'foot.php';
exit;
}
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="ok" title="OK!" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ок!</title>
<meta http-equiv="refresh" content="2; url=anket.php?$ses&ref=$ref"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center">";
}
echo $fsize1;
echo '<b>' .$msg. '</b><br/>';
echo $fsize2;
include_once 'foot.php';
break;
#################################
case 'uwlech':
if (!isset($err)) $err = "";
if (!isset($go)) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="prof" title="Увлечения">n
<p>n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Увлечения</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">
<form method="post" action="anket.php?$ses&mod=uwlech&go=rew&ref=$ref" name="auth">n";
}
echo '<div class = "d1"><b>Увлечения</b></div>';
echo $fsize1;
echo '<br/>Любимые телешоу:<br/>';
echo $fsize2;
echo '<textarea name="shou" maxlength="500" cols="17" rows="4">'.$row['shou'].'</textarea><br/>';
echo $fsize1;
echo 'Любимые игры:<br/>';
echo $fsize2;
echo '<textarea name="games" maxlength="500" cols="17" rows="4">'.$row['games'].'</textarea><br/>';
echo $fsize1;
echo 'Религиозные взляды:<br/>';
echo $fsize2;
echo '<textarea name="relig" maxlength="500" cols="17" rows="4">'.$row['relig'].'</textarea><br/>';
echo $fsize1;
echo 'Любимые цитаты:<br/>';
echo $fsize2;
echo '<textarea name="citat" maxlength="500" cols="17" rows="4">'.$row['citat'].'</textarea><br/>';
echo $fsize1;
echo 'Любимые книги:<br/>';
echo $fsize2;
echo '<textarea name="knig" maxlength="500" cols="17" rows="4">'.$row['knig'].'</textarea><br/>';
echo $fsize1;
echo 'Интересы:<br/>';
echo $fsize2;
echo '<textarea name="inter" maxlength="500" cols="17" rows="4">'.$row['inter'].'</textarea><br/>';
echo $fsize1;
echo 'Любимая музыка:<br/>';
echo $fsize2;
echo '<textarea name="music" maxlength="500" cols="17" rows="4">'.$row['music'].'</textarea><br/>';
echo $fsize1;
echo 'Любимые фильмы:<br/>';
echo $fsize2;
echo '<textarea name="films" maxlength="500" cols="17" rows="4">'.$row['films'].'</textarea><br/>';
echo $fsize1;
echo 'Политические взгляды:<br/><select name="polit" class="input">
<option value="'.$row['polit'].'">'.$row['polit'].'</option>
<option value="Индифферентные">Индифферентные</option>
<option value="Коммунистические">Коммунистические</option>
<option value="Социалистические">Социалистические</option>
<option value="Либеральные">Либеральные</option>
<option value="Умеренные">Умеренные</option>
<option value="Консервативные">Консервативные</option>
</select><br/>';
echo $divide;
echo $fsize2;
if ($ver == "wml") {
echo $fsize1;
echo '<anchor title="go">Изменить<go href="anket.php?'.$ses.'&mod=uwlech&go=rew&ref='.$ref.'" method="post">
<postfield name="inter" value="$(inter)"/>
<postfield name="polit" value="$(polit)"/>
<postfield name="music" value="$(music)"/>
<postfield name="films" value="$(films)"/>
<postfield name="knig" value="$(knig)"/>
<postfield name="citat" value="$(citat)"/>
<postfield name="relig" value="$(relig)"/>
<postfield name="games" value="$(games)"/>
<postfield name="shou" value="$(shou)"/>
</go></anchor>';
echo $fsize2;
echo '<br/>';
} else {
echo '<input type="submit" class="ibutton" value="Сохранить" name="enter"/><br/></form>';
}
echo $fsize1;
echo $divide;
echo "<div class = 'd1'><a href="cabinet.php?$ses&ref=$ref">Личный кабинет</a><br/>n
<a href="anket.php?$ses&ref=$ref">Редактировать анкету</a><br/>n
<a href="enter.php?$ses&ref=$ref">Прихожая</a></div>n";
echo $fsize2;
if ($ver == 'xhtml') echo '<div><small>';
include_once 'foot.php';
exit;
}
if ($row['translit'] == 1) {
$inter = trun_to_rus($inter);
$music = trun_to_rus($music);
$films = trun_to_rus($films);
$knig = trun_to_rus($knig);
$citat = trun_to_rus($citat);
$relig = trun_to_rus($relig);
$games = trun_to_rus($games);
$shou = trun_to_rus($shou);
}
$inter = mysql_real_escape_string(check($inter));
$polit = mysql_real_escape_string(check($polit));
$music = mysql_real_escape_string(check($music));
$films = mysql_real_escape_string(check($films));
$knig = mysql_real_escape_string(check($knig));
$citat = mysql_real_escape_string(check($citat));
$relig = mysql_real_escape_string(check($relig));
$games = mysql_real_escape_string(check($games));
$shou = mysql_real_escape_string(check($shou));
if (mysql_query ("Update `users` set shou='".$shou."', games='".$games."', relig='".$relig."', citat='".$citat."', knig='".$knig."', inter='".$inter."', polit='".$polit."', music='".$music."', films='".$films."' where `id` ='$id'")) {
$msg = "<b>Изменено!</b>";
} else {
$msg = "<b>Ошибка!</b>";
}
mysql_close($link);
if ($error) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="error" title="Ошибка" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<do type="prev" label="Back"><prev/></do>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ок</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<b>' .$error. '</b>';
echo $fsize2;
include_once 'foot.php';
exit;
}
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="ok" title="OK" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ок!</title>
<meta http-equiv="refresh" content="2; url=anket.php?$ses&ref=$ref"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center">";
}
echo $fsize1;
echo '<b>' .$msg. '</b><br/>';
echo $fsize2;
include_once 'foot.php';
break;
#################################
case 'obraz':
if (!isset($err)) $err = "";
if (!isset($go)) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="obraz" title="Образование">n
<p>n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Образование</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">
<form method="POST" action="anket.php?$ses&mod=obraz&go=rew&ref=$ref" name="auth">n";
}
echo '<div class = "d1"><b>Образование</b></div>';
echo $fsize1;
echo '<br/>Страна:<br/>';
echo $fsize2;
echo '<input name="stranobr" maxlength="40" value="'.$row['stranobr'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo 'Город:<br/>';
echo $fsize2;
echo '<input name="gorobr" maxlength="40" value="'.$row['gorobr'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo 'Школа:<br/>';
echo $fsize2;
echo '<input name="shkobr" maxlength="40" value="'.$row['shkobr'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo 'ВУЗ:<br/>';
echo $fsize2;
echo '<input name="vuzobr" maxlength="40" value="'.$row['vuzobr'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo 'ПТУ:<br/>';
echo $fsize2;
echo '<input name="ptuobr" maxlength="40" value="'.$row['ptuobr'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo $divide;
echo $fsize2;
if ($ver == "wml") {
echo $fsize1;
echo '<anchor title="go">Изменить<go href="anket.php?'.$ses.'&mod=obraz&go=rew&ref='.$ref.'" method="post">
<postfield name="stranobr" value="$(stranobr)"/>
<postfield name="gorobr" value="$(gorobr)"/>
<postfield name="shkobr" value="$(shkobr)"/>
<postfield name="vuzobr" value="$(vuzobr)"/>
<postfield name="ptuobr" value="$(ptuobr)"/>
</go></anchor>';
echo $fsize2;
echo '<br/>';
} else {
echo '<input type="submit" class="ibutton" value="Сохранить" name="enter"><br/>';
}
echo $fsize1;
echo $divide;
echo "<div class = 'd1'><a href="cabinet.php?$ses&ref=$ref">Личный кабинет</a><br/>n
<a href="anket.php?$ses&ref=$ref">Редактировать анкету</a><br/>n
<a href="enter.php?$ses&ref=$ref">Прихожая</a></div>n";
echo $fsize2;
include_once 'foot.php';
exit;
}
if ($row['translit'] == 1) {
$stranobr = trun_to_rus($stranobr);
$gorobr = trun_to_rus($gorobr);
$shkobr = trun_to_rus($shkobr);
$vuzobr = trun_to_rus($vuzobr);
$ptuobr = trun_to_rus($ptuobr);
}
$stranobr = mysql_real_escape_string(check($stranobr));
$gorobr = mysql_real_escape_string(check($gorobr));
$shkobr = mysql_real_escape_string(check($shkobr));
$vuzobr = mysql_real_escape_string(check($vuzobr));
$ptuobr = mysql_real_escape_string(check($ptuobr));
if (mysql_query ("Update `users` set stranobr='".$stranobr."', gorobr='".$gorobr."', shkobr='".$shkobr."', vuzobr='".$vuzobr."', ptuobr='".$ptuobr."' where `id` ='$id'")) {
$msg = '<b>Изменено!</b>';
} else {
$msg = "<b>Ошибка!</b>";
}
mysql_close($link);
if ($error) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="error" title="Ошибка" ontimer="anket.php.php?$ses&ref=$ref"><timer value="10"/>n
<do type="prev" label="Back"><prev/></do>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ок!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<b>' .$error. '</b>';
echo $fsize2;
include_once 'foot.php';
exit;
}
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="ok" title="OK!" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ок!</title>
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=anket.php?$ses&ref=$ref">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center">";
}
echo $fsize1;
echo '<b>' .$msg. '</b><br/>';
echo $fsize2;
include_once 'foot.php';
break;
#################################
case 'rabota':
if (!isset($err)) $err = "";
if (!isset($go)) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="rabota" title="Работа">n
<p>n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Работа</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">
<form method="POST" action="anket.php?$ses&mod=rabota&go=rew&ref=$ref" name="auth">n";
}
echo '<div class = "d1"><b>Работа</b></div>';
echo $fsize1;
echo '<br/>Страна:<br/>';
echo $fsize2;
echo '<input name="stran" maxlength="40" value="'.$row['stran'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo 'Город:<br/>';
echo $fsize2;
echo '<input name="gorrab" maxlength="40" value="'.$row['gorrab'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo 'Место работы:<br/>';
echo $fsize2;
echo '<input name="mestrab" maxlength="40" value="'.$row['mestrab'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo 'Год начала работы:<br/>';
echo $fsize2;
echo '<input name="godna" maxlength="4" value="'.$row['godna'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo 'Год окончания работы:<br/>';
echo $fsize2;
echo '<input name="godko" maxlength="4" value="'.$row['godko'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo 'Должность:<br/>';
echo $fsize2;
echo '<input name="dolgrab" maxlength="40" value="'.$row['dolgrab'].'" title="name" emptyok="true"/><br/>';
echo $divide;
echo $fsize1;
if ($ver == "wml") {
echo $fsize2;
echo '<anchor title="go">Изменить<go href="anket.php?'.$ses.'&mod=rabota&go=rew&ref='.$ref.'" method="post">
<postfield name="stran" value="$(stran)"/>
<postfield name="gorrab" value="$(gorrab)"/>
<postfield name="mestrab" value="$(mestrab)"/>
<postfield name="godna" value="$(godna)"/>
<postfield name="godko" value="$(godko)"/>
<postfield name="dolgrab" value="$(dolgrab)"/>
</go></anchor>';
echo $fsize1;
echo '<br/>';
} else {
echo '<input type="submit" class="ibutton" value="Сохранить" name="enter"><br/>';
}
echo $fsize2;
echo $divide;
echo "<div class = 'd1'><a href="cabinet.php?$ses&ref=$ref">Личный кабинет</a><br/>n
<a href="anket.php?$ses&ref=$ref">Редактировать анкету</a><br/>n
<a href="enter.php?$ses&ref=$ref">Прихожая</a></div>n";
echo $fsize1;
include_once 'foot.php';
exit;
}
if (!empty($godna) and !is_numeric($godna)) {
include_once "obolochka.php";
echo 'Года вводятся цыфрами!';
exit;
}
if (!empty($godko) and !is_numeric($godko)) {
include_once "obolochka.php";
echo 'Года вводятся цыфрами!';
exit;
}
$godna = abs(intval($godna));
$godko = abs(intval($godko));
if ($row["translit"] == 1) {
$stran = trun_to_rus($stran);
$gorrab = trun_to_rus($gorrab);
$mestrab = trun_to_rus($mestrab);
$dolgrab = trun_to_rus($dolgrab);
}
$stran = mysql_real_escape_string(check($stran));
$gorrab = mysql_real_escape_string(check($gorrab));
$mestrab = mysql_real_escape_string(check($mestrab));
$godna = mysql_real_escape_string(check($godna));
$godko = mysql_real_escape_string(check($godko));
$dolgrab = mysql_real_escape_string(check($dolgrab));
if (mysql_query ("Update `users` set stran='".$stran."', gorrab='".$gorrab."', mestrab='".$mestrab."', godna='".$godna."', godko='".$godko."', dolgrab='".$dolgrab."' where `id` ='$id'")) {
$msg = "<b>Изменено!</b>";
} else {
$msg = "<b>Ошибка!</b>";
}
mysql_close($link);
if ($error) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="error" title="Ошибка!" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<do type="prev" label="Back"><prev/></do>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ошибка!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<b>' .$error. '</b>';
echo $fsize2;
include_once 'foot.php';
exit;
}
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="ok" title="OK!" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ок!</title>
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=anket.php?$ses&ref=$ref">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center">";
}
echo $fsize1;
echo '<b>' .$msg. '</b><br/>';
echo $fsize2;
include_once 'foot.php';
break;
#################################
case 'slujba':
if (!isset($err)) $err = "";
if (!isset($go)) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="skujba" title="Военная служба">n
<p>n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Военная служба</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">
<form method="POST" action="anket.php?$ses&mod=slujba&go=rew&ref=$ref" name="auth">n";
}
echo '<div class = "d1"><b>Военная служба</b></div>';
echo $fsize1;
echo '<br/>Страна:<br/>';
echo $fsize2;
echo '<input name="stransl" maxlength="40" value="'.$row['stransl'].'" title="name" emptyok="true"/><br/>';
echo $fsize1;
echo 'Войсковая часть:<br/>';
echo $fsize2;
echo '<input name="voich" maxlength="40" value="'.$row['voich'].'" title="name" emptyok="true"/><br/>';
echo $divide;
echo $fsize1;
if ($ver == "wml") {
echo $fsize2;
echo '<anchor title="go">Изменить<go href="rabota.php?$ses&go=rew&ref=$ref" method="post">
<postfield name="stransl" value="$(stransl)"/>
<postfield name="voich" value="$(voich)"/>
</go></anchor>';
echo $fsize1;
echo '<br/>';
} else {
echo '<input type="submit" class="ibutton" value="Сохранить" name="enter"><br/>';
}
echo $fsize2;
echo $divide;
if ($ver == 'xhtml') {
echo "<div class = 'd1'><a href="cabinet.php?$ses&ref=$ref">Личный кабинет</a><br/>n
<a href="anket.php?$ses&ref=$ref">Редактировать анкету</a><br/>n
<a href="enter.php?$ses&ref=$ref">Прихожая</a></div>n";
} else {
echo "<a href="cabinet.php?$ses&ref=$ref">Личный кабинет</a><br/>n
<a href="anket.php?$ses&ref=$ref">Редактировать анкету</a><br/>n
<a href="enter.php?$ses&ref=$ref">Прихожая</a><br/>n";
}
echo $fsize1;
include_once 'foot.php';
exit;
}
if ($row["translit"] == 1) {
$stransl = trun_to_rus($stransl);
$voich = trun_to_rus($voich);
}
$stransl = mysql_real_escape_string(check($stransl));
$voich = mysql_real_escape_string(check($voich));
if (mysql_query ("Update `users` set stransl='".$stransl."', voich='".$voich."' where `id` ='$id'")) {
$msg = '<b>Изменено!</b>';
} else {
$msg = "<b>Ошибка!</b>";
}
mysql_close($link);
if ($error) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="error" title="Ошибка!" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<do type="prev" label="Back"><prev/></do>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ошибка!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<b>' .$error. '</b>';
echo $fsize2;
include_once 'foot.php';
exit;
}
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="ok" title="OK!" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ок!</title>
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=anket.php?$ses&ref=$ref">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center">";
}
echo $fsize1;
echo '<b>' .$msg. '</b><br/>';
echo $fsize2;
include_once 'foot.php';
break;
#################################
case 'dat':
if (!isset($err)) $err = "";
if (!isset($go)) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>
<card id="profile" title="Анкета">n
<p align="left">
Редактор профиля доступен только в xHTML версии чата.<br/><a href="enter.php?$ses&ver=xhtml&ref=$ref">В прихожую</a><br/>";
echo $fsize2;
include_once 'foot.php';
exit;
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Дата рождения</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">
<form method="POST" action="anket.php?$ses&mod=dat&go=rew&ref=$ref" name="auth">n";
}
echo '<div class = "d1"><b>Дата рождения</b></div>';
@list( $day, $month, $year ) = split( '-', $row["birth"] );
echo $fsize1;
echo $fsize2;
echo '<br/><select name="day" class="input">
<option value="'.$day.'">'.$day.'</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>';
$month1 = $month;
$month1 = str_replace("1","Января",$month1);
$month1 = str_replace("2","Февраля",$month1);
$month1 = str_replace("3","Марта",$month1);
$month1 = str_replace("4","Апреля",$month1);
$month1 = str_replace("5","Мая",$month1);
$month1 = str_replace("6","Июня",$month1);
$month1 = str_replace("7","Июля",$month1);
$month1 = str_replace("8","Августа",$month1);
$month1 = str_replace("9","Сентября",$month1);
$month1 = str_replace("10","Октября",$month1);
$month1 = str_replace("11","Ноября",$month1);
$month1 = str_replace("12","Декабря",$month1);
$month1 = str_replace("0","",$month1);
echo '-<select name="month" class="input">
<option value="'.$month.'">'.$month1.'</option>
<option value="01">Января</option>
<option value="02">Февраля</option>
<option value="03">Марта</option>
<option value="04">Апреля</option>
<option value="05">Мая</option>
<option value="06">Июня</option>
<option value="07">Июля</option>
<option value="08">Августа</option>
<option value="09">Сентября</option>
<option value="10">Октября</option>
<option value="11">Ноября</option>
<option value="12">Декабрь</option>
</select>';
echo '-<input size="4" name="year" value="'.$year.'" maxlength="4" emptyok="false"><br/><br/>';
if ($ver == "wml") {
echo $fsize1;
echo '<anchor title="go">Сохранить<go href="anket.php?'.$ses.'&mod=dat&go=rew&ref='.$ref.'" method="post">
<postfield name="day" value="$(day)"/>
<postfield name="month" value="$(month)"/>
<postfield name="year" value="$(year)"/>
</go></anchor>';
echo $fsize2;
echo '<br/>';
} else {
echo '<input type="submit" class="ibutton" value="Сохранить" name="enter"><br/>';
}
echo $fsize2;
echo $divide;
if ($ver == 'xhtml') {
echo "<div class = 'd1'><a href="cabinet.php?$ses&ref=$ref">Личный кабинет</a><br/>n
<a href="anket.php?$ses&ref=$ref">Редактировать анкету</a><br/>n
<a href="enter.php?$ses&ref=$ref">Прихожая</a></div>n";
} else {
echo "<a href="cabinet.php?$ses&ref=$ref">Личный кабинет</a><br/>n
<a href="anket.php?$ses&ref=$ref">Редактировать анкету</a><br/>n
<a href="enter.php?$ses&ref=$ref">Прихожая</a><br/>n";
}
echo $fsize1;
include_once 'foot.php';
exit;
}
$emp2 = "Неправильный формат данных!";
$emp = "Не заполнены обязательные поля!";
$wrongdate = "Не верно указана дата рождения! 0на должна иметь формат дд-мм-гггг, и быть реальной!";
$god = date("Y")-10;
if ($day == "") {
$msg = $emp;
}
elseif ($month == "") {
$msg = $emp;
}
elseif ($year == "") {
$msg = $emp;
}
elseif ((strlen($year) !== 4) || ($year >= $god) || ($year < 1950))
{
$msg = $wrongdate;
}
$day = mysql_real_escape_string(check($day));
$month = mysql_real_escape_string(check($month));
$year = mysql_real_escape_string(check($year));
if (!preg_match("!^[0-9]+$!i",$day)) {
$error = $emp2;
}
elseif (!preg_match("!^[0-9]+$!i",$month)) {
$error = $emp2;
}
elseif (!preg_match("!^[0-9]+$!i",$year)) {
$error = $emp2;
}
if (mysql_query ("Update `users` set birth='".$day."-".$month."-".$year."' where `id` ='$id'")) {
$msg = '<b>Изменено!</b>';
} else {
$msg = "<b>Ошибка!</b>";
}
mysql_close($link);
if ($error) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="error" title="Ошибка!" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<do type="prev" label="Back"><prev/></do>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ошибка!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<b>' .$error. '</b>';
echo $fsize2;
include_once 'foot.php';
exit;
}
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="ok" title="OK!" ontimer="anket.php?$ses&ref=$ref"><timer value="10"/>n
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ок!</title>
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=anket.php?$ses&ref=$ref">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center">";
}
echo $fsize1;
echo '<b>' .$msg. '</b><br/>';
echo $fsize2;
include_once 'foot.php';
}
?>