Файл: user/profile/edit.php
Строк: 1191
<?php
define("H", $_SERVER["DOCUMENT_ROOT"].'/');
include_once H.'sys/inc/includes.php';
if (!isset($user) && !isset($_GET['id'])){header("Location: /index.php?".SID);exit;}
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$ank[id]' LIMIT 1"),0)==0){header("Location: /index.php?".SID);exit;}
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $ank[id] LIMIT 1"));
if ($user['group_access']>$ank['group_access'] || $user['id']==$ank['id']){
if (isset($_GET['admin']) && $user['group_access']>$ank['group_access'] && $user['id']!=$ank['id']){
$set['title']="Изменение профайла $ank[nick] - Администрирование";
include_once H.'sys/inc/thead.php';
title();
aut();
if (isset($_POST['ok'])){
if (isset($_POST['ank_mail']) && (preg_match('#^[^@]*@[^@]*.[^@]*$#i',$_POST['ank_mail']) || $_POST['ank_mail']==NULL)){
$ank['ank_mail']=esc($_POST['ank_mail']);
mysql_query("UPDATE `user` SET `ank_mail` = '".my_esc($ank['ank_mail'])."' WHERE `id` = '$ank[id]' LIMIT 1");
}
else $err[]="Неверный E-mail";
if (user_access('user_change_group') && isset($_POST['group_access'])){
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user_group` WHERE `id` = '".intval($_POST['group_access'])."' AND `level` < '$user[level]'"),0)==1){
if ($ank['group_access']!=intval($_POST['group_access'])){
mysql_query("INSERT INTO `private` (`id_user`, `time`, `msg`) values('0', '$time', '[url=/id".$user['id']."]".$user['nick']."[/url] Изменение должности Пользователю $ank[nick]')");
$ank['group_access']=intval($_POST['group_access']);
mysql_query("UPDATE `user` SET `group_access` = '$ank[group_access]' WHERE `id` = '$ank[id]' LIMIT 1");
}
}
}
if (isset($_POST['nick']) && $_POST['nick']!=$ank['nick']){
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `nick` = '".my_esc($_POST['nick'])."'"),0)==1)$err[]="Ник ".htmlspecialchars($_POST['nick'])." уже занят";
elseif (user_access('user_change_nick')){
$nick=my_esc($_POST['nick']);
if(!preg_match("#^([A-z0-9-_ ])+$#ui", $nick))$err[]="В нике присутствуют запрещенные символы";
if (strlen2($nick)<3)$err[]="Короткий ник";
if (strlen2($nick)>32)$err[]="Длина ника превышает 32 символа";
if (!isset($err)){
$ank['nick']=$nick;
mysql_query("UPDATE `user` SET `nick` = '".my_esc($nick)."' WHERE `id` = '$ank[id]' LIMIT 1");
mysql_query("INSERT INTO `private` (`id_user`, `time`, `msg`) values('0', '$time', '[url=/id".$user['id']."]".$user['nick']."[/url] изменение ника $ank[nick] на $nick')");
}
}
else $err[]="У Вас нет привилегий на изменение ника пользователя";
}
if (($user['level']>=3 || $ank['id']==$user['id']) && isset($_POST['balls']) && is_numeric($_POST['balls'])){
$ank['balls']=intval($_POST['balls']);
mysql_query("UPDATE `user` SET `balls` = '$ank[balls]' WHERE `id` = '$ank[id]' LIMIT 1");}
if (($user['level']>=3 || $ank['id']==$user['id']) && isset($_POST['evro']) && is_numeric($_POST['evro'])){
$ank['evro']=intval($_POST['evro']);
mysql_query("UPDATE `user` SET `evro` = '$ank[evro]' WHERE `id` = '$ank[id]' LIMIT 1");}
if (isset($_POST['new_pass']) && strlen2($_POST['new_pass'])>5){
include H.'sys/inc/shif.php';
mysql_query("UPDATE `user` SET `pass` = '".shif($_POST['new_pass'])."' WHERE `id` = '$ank[id]' LIMIT 1");
mysql_query("INSERT INTO `private` (`id_user`, `time`, `msg`) values('0', '$time', '[url=/id".$user['id']."]".$user['nick']."[/url] смена пароля пользователю $ank[nick]')");
}
if (!isset($err)){
mysql_query("INSERT INTO `private` (`id_user`, `time`, `msg`) values('0', '$time', '[url=/id".$user['id']."]".$user['nick']."[/url] изменения профиля пользователя $ank[nick]')");
header("location:index.php?id=$ank[id]");
}
err();
}
echo "<div class='forum2'><a href='?id=$ank[id]'>Основное</a> | <a href='?id=$ank[id]&interes'>Интересы</a> | <a href='?id=$ank[id]&love'>Для знакомства</a> | <a href='?id=$ank[id]&type'>Типаж</a> | <a href='?id=$ank[id]&other'>Прочее</a>".($user['group_access']>$ank['group_access'] && $user['id']!=$ank['id']?" | <b>Администрирование</b>":"")."</div>";
echo "<form method='post' action='?id=$ank[id]&admin&$passgen'>
<b>Ник:</b><br/><input type='text' name='nick' value='".htmlspecialchars($ank['nick'])."' style='width:95%'><br/>
<b>E-mail:</b><br/><input type='text' name='ank_mail' value='".htmlspecialchars($ank['ank_mail'])."' style='width:95%'><br/>
<b>Группа:</b><br /><select style='width:97%' name='group_access'".(user_access('user_change_group')?null:' disabled="disabled"')."><br />n";
$q=mysql_query("SELECT * FROM `user_group` ORDER BY `level`,`id` ASC");
while ($post = mysql_fetch_assoc($q)){
echo "<option value='$post[id]'".($post['level']>=$user['level']?" disabled='disabled'":null)."".($post['id']==$ank['group_access']?" selected='selected'":null).">".$post['name']."</option>n";
}
echo "</select><br />";
if ($user['id']==1 || $user['id']==230){
echo "<b>€врики:</b><br/><input type='text' name='evro' value='$ank[evro]' style='width:95%'><br/>
<b>Баллы:</b><br/><input type='text' name='balls' value='$ank[balls]' style='width:95%'><br/>";
}
echo "<b>Новый пароль:</b><br/><input type='text' name='new_pass' value='' style='width:95%'><br/>
<input type='submit' name='ok' value='Сохранить' style='width:97%'></form>";
echo "<a href='/user/profile/?id=$ank[id]'><div class='gmenu'><img src='/style/icons/str2.gif' alt=''> В анкету $ank[nick]</div></a>";
include_once H.'sys/inc/tfoot.php';
}
if (isset($_GET['other'])){
$set['title']="Изменение профайла $ank[nick] - Прочее";
include_once H.'sys/inc/thead.php';
title();
aut();
if (isset($_POST['ok'])){
mysql_query("UPDATE `user` SET `robota` = '".my_esc($_POST['robota'])."', `ucheba` = '".my_esc($_POST['ucheba'])."', `icq` = '".intval($_POST['icq'])."', `mobile` = '".intval($_POST['mobile'])."', `idvk` = '".my_esc($_POST['idvk'])."' WHERE `id` = '$ank[id]'");
header("location:index.php?id=$ank[id]");
}
echo "<div class='forum2'><a href='?id=$ank[id]'>Основное</a> | <a href='?id=$ank[id]&interes'>Интересы</a> | <a href='?id=$ank[id]&love'>Для знакомства</a> | <a href='?id=$ank[id]&type'>Типаж</a> | <b>Прочее</b>".($user['group_access']>$ank['group_access'] && $user['id']!=$ank['id']?" | <a href='?id=$ank[id]&admin'>Администрирование</a>":"")."</div>";
echo "<form method='post' action='?id=$ank[id]&other&$passgen'>
<b>Место работы:</b><br/><input type='text' name='robota' value='".htmlspecialchars($ank['robota'])."' style='width:95%'><br/>
<b>Место учебы:</b><br/><input type='text' name='ucheba' value='".htmlspecialchars($ank['ucheba'])."' style='width:95%'><br/>
<b>Номер мобильного:</b><br/><input type='text' name='mobile' value='$ank[mobile]' style='width:95%'><br/>
<b>id Вконтакте:</b><br/><input type='text' name='idvk' value='$ank[idvk]' style='width:95%'><br/>
<b>ICQ:</b><br/><input type='text' name='icq' value='$ank[icq]' style='width:95%'><br/>
<input type='submit' name='ok' value='Сохранить' style='width:97%'></form>";
echo "<a href='/user/profile/?id=$ank[id]'><div class='gmenu'><img src='/style/icons/str2.gif' alt=''> В анкету $ank[nick]</div></a>";
include_once H.'sys/inc/tfoot.php';
}
if (isset($_GET['type'])){
$set['title']="Изменение профайла $ank[nick] - Типаж";
include_once H.'sys/inc/thead.php';
title();
aut();
if (isset($_POST['ok'])){
mysql_query("UPDATE `user` SET `glaz` = '".my_esc($_POST['glaz'])."', `volos` = '".my_esc($_POST['volos'])."', `rost` = '".intval($_POST['rost'])."', `ves` = '".intval($_POST['ves'])."', `telo` = '".intval($_POST['telo'])."', `natele` = '".intval($_POST['natele'])."' WHERE `id` = '$ank[id]'");
header("location:index.php?id=$ank[id]");
}
echo "<div class='forum2'><a href='?id=$ank[id]'>Основное</a> | <a href='?id=$ank[id]&interes'>Интересы</a> | <a href='?id=$ank[id]&love'>Для знакомства</a> | <b>Типаж</b> | <a href='?id=$ank[id]&other'>Прочее</a>".($user['group_access']>$ank['group_access'] && $user['id']!=$ank['id']?" | <a href='?id=$ank[id]&admin'>Администрирование</a>":"")."</div>";
echo "<form method='post' action='?id=$ank[id]&type&$passgen'>
<b>Рост (см.):</b><br/><input type='text' name='rost' value='$ank[rost]' style='width:95%'><br/>
<b>Вес (кг.):</b><br/><input type='text' name='ves' value='$ank[ves]' style='width:95%'><br/>
<b>Цвет глаз:</b><br/><input type='text' name='glaz' value='".htmlspecialchars($ank['glaz'])."' style='width:95%'><br/>
<b>Цвет волос:</b><br/><input type='text' name='volos' value='".htmlspecialchars($ank['volos'])."' style='width:95%'><br/>
<b>Телосложение:</b><select name='telo' style='width:97%'>
<option value='0'".($ank['telo']==0?" selected='selected'":null).">Выбрать</option>
<option value='1'".($ank['telo']==1?" selected='selected'":null).">Обычное</option>
<option value='2'".($ank['telo']==2?" selected='selected'":null).">Худощавое</option>
<option value='3'".($ank['telo']==3?" selected='selected'":null).">Спортивное</option>
<option value='4'".($ank['telo']==4?" selected='selected'":null).">Плотное</option>
</select><br/>
<b>На теле есть :</b><select name='natele' style='width:97%'>
<option value='0'".($ank['natele']==0?" selected='selected'":null).">Выбрать</option>
<option value='1'".($ank['natele']==1?" selected='selected'":null).">Пирсинг</option>
<option value='2'".($ank['natele']==2?" selected='selected'":null).">Тату/Татуировки</option>
<option value='3'".($ank['natele']==3?" selected='selected'":null).">Шрамы/Шрамирование</option>
</select><br/>
<input type='submit' name='ok' value='Сохранить' style='width:97%'></form>";
echo "<a href='/user/profile/?id=$ank[id]'><div class='gmenu'><img src='/style/icons/str2.gif' alt=''> В анкету $ank[nick]</div></a>";
include_once H.'sys/inc/tfoot.php';
}
if (isset($_GET['love'])){
$set['title']="Изменение профайла $ank[nick] - Для знакомства";
include_once H.'sys/inc/thead.php';
title();
aut();
if (isset($_POST['ok'])){
mysql_query("UPDATE `user` SET `orient` = '".intval($_POST['orient'])."', `cel` = '".intval($_POST['cel'])."', `sp` = '".intval($_POST['sp'])."', `partner` = '".my_esc($_POST['partner'])."' WHERE `id` = '$ank[id]'");
header("location:index.php?id=$ank[id]");
}
echo "<div class='forum2'><a href='?id=$ank[id]'>Основное</a> | <a href='?id=$ank[id]&interes'>Интересы</a> | <b>Для знакомства</b> | <a href='?id=$ank[id]&type'>Типаж</a> | <a href='?id=$ank[id]&other'>Прочее</a>".($user['group_access']>$ank['group_access'] && $user['id']!=$ank['id']?" | <a href='?id=$ank[id]&admin'>Администрирование</a>":"")."</div>";
echo "<form method='post' action='?id=$ank[id]&love&$passgen'>
<b>Ориентация:</b><select name='orient' style='width:97%'><option value='0'".($ank['orient']==0?" selected='selected'":null).">Выбрать</option>
<option value='1'".($ank['orient']==1?" selected='selected'":null).">Гетеро</option>
<option value='2'".($ank['orient']==2?" selected='selected'":null).">Гей/Лезби</option>
<option value='3'".($ank['orient']==3?" selected='selected'":null).">Би</option>
</select><br/>
<b>Цель знакомства:</b><select name='cel' style='width:97%'><option value='0'".($ank['cel']==0?" selected='selected'":null).">Выбрать</option>
<option value='1'".($ank['cel']==1?" selected='selected'":null).">Дружба и общение</option>
<option value='2'".($ank['cel']==2?" selected='selected'":null).">Флирт/Смс переписка</option>
<option value='3'".($ank['cel']==3?" selected='selected'":null).">Любовь/Отношения</option>
<option value='4'".($ank['cel']==4?" selected='selected'":null).">Брак/Создание семьи</option>
<option value='5'".($ank['cel']==5?" selected='selected'":null).">Виртуальный секс/Секс в реале</option>
</select><br/>
<b>Семейное положение:</b><select name='sp' style='width:97%'>
<option value='0'".($ank['sp']==0?" selected='selected'":null).">Выбрать</option>
<option value='1'".($ank['sp']==1?" selected='selected'":null).">В активном поиске</option>
<option value='2'".($ank['sp']==2?" selected='selected'":null).">".($ank['pol']==1?"Влюблен":"Влюблена")."</option>
<option value='3'".($ank['sp']==3?" selected='selected'":null).">Встречаюсь</option>
<option value='4'".($ank['sp']==4?" selected='selected'":null).">".($ank['pol']==1?"Помолвлен":"Помолвлена")."</option>
<option value='5'".($ank['sp']==5?" selected='selected'":null).">".($ank['pol']==1?"Женат":"Замужем")."</option>
</select><br/>
<b>О партнере:</b><br/><textarea name='partner' style='width:95%'>".htmlspecialchars($ank['partner'])."</textarea><br/>
<input type='submit' name='ok' value='Сохранить' style='width:97%'></form>";
echo "<a href='/user/profile/?id=$ank[id]'><div class='gmenu'><img src='/style/icons/str2.gif' alt=''> В анкету $ank[nick]</div></a>";
include_once H.'sys/inc/tfoot.php';
}
if (isset($_GET['interes'])){
$set['title']="Изменение профайла $ank[nick] - Интересы";
include_once H.'sys/inc/thead.php';
title();
aut();
if (isset($_POST['ok'])){
mysql_query("UPDATE `user` SET `ank_o_sebe` = '".my_esc($_POST['ank_o_sebe'])."', `interes` = '".my_esc($_POST['interes'])."', `film` = '".my_esc($_POST['film'])."', `music` = '".my_esc($_POST['music'])."' WHERE `id` = '$ank[id]'");
header("location:index.php?id=$ank[id]");
}
echo "<div class='forum2'><a href='?id=$ank[id]'>Основное</a> | <b>Интересы</b> | <a href='?id=$ank[id]&love'>Для знакомства</a> | <a href='?id=$ank[id]&type'>Типаж</a> | <a href='?id=$ank[id]&other'>Прочее</a>".($user['group_access']>$ank['group_access'] && $user['id']!=$ank['id']?" | <a href='?id=$ank[id]&admin'>Администрирование</a>":"")."</div>";
echo "<form method='post' action='?id=$ank[id]&interes&$passgen'>
<b>О себе:</b><br/><textarea name='ank_o_sebe' style='width:95%'>".htmlspecialchars($ank['ank_o_sebe'])."</textarea><br/>
<b>Интересы:</b><br/><textarea name='interes' style='width:95%'>".htmlspecialchars($ank['interes'])."</textarea><br/>
<b>Любимые фильмы:</b><br/><textarea name='film' style='width:95%'>".htmlspecialchars($ank['film'])."</textarea><br/>
<b>Любимая музыка:</b><br/><textarea name='music' style='width:95%'>".htmlspecialchars($ank['music'])."</textarea><br/>
<input type='submit' name='ok' value='Сохранить' style='width:97%'></form>";
echo "<a href='/user/profile/?id=$ank[id]'><div class='gmenu'><img src='/style/icons/str2.gif' alt=''> В анкету $ank[nick]</div></a>";
include_once H.'sys/inc/tfoot.php';
}
$set['title']='Изменение профайла '.$ank['nick'].' - Основное';
include_once H.'sys/inc/thead.php';
title();
if (isset($_POST['ok'])){
if ($ank['nick_name']==1){
if ($_POST['ank_name']==NULL || $_POST['familiya']==NULL)$err[]="Имя и фамилия должны быть заполнены так как они выбраны в настройках отображения!";
}
if (!isset($err)){
mysql_query("UPDATE `user` SET `ank_name` = '".my_esc($_POST['ank_name'])."', `familiya` = '".my_esc($_POST['familiya'])."', `ank_city` = '".my_esc($_POST['ank_city'])."', `strana` = '".intval($_POST['strana'])."', `pol` = '".intval($_POST['pol'])."', `ank_d_r` = '".intval($_POST['ank_d_r'])."', `ank_m_r` = '".intval($_POST['ank_m_r'])."', `ank_g_r` = '".intval($_POST['ank_g_r'])."' WHERE `id` = '$ank[id]'");
header("location:index.php?id=$ank[id]");
}
err();
}
echo "<div class='forum2'><b>Основное</b> | <a href='?id=$ank[id]&interes'>Интересы</a> | <a href='?id=$ank[id]&love'>Для знакомства</a> | <a href='?id=$ank[id]&type'>Типаж</a> | <a href='?id=$ank[id]&other'>Прочее</a>".($user['group_access']>$ank['group_access'] && $user['id']!=$ank['id']?" | <a href='?id=$ank[id]&admin'>Администрирование</a>":"")."</div>";
echo "<form method='post' action='?id=$ank[id]&$passgen'>
<b>Имя:</b><br/><input type='text' name='ank_name' value='".htmlspecialchars($ank['ank_name'])."' style='width:95%'><br/>
<b>Фамилия:</b><br/><input type='text' name='familiya' value='".htmlspecialchars($ank['familiya'])."' style='width:95%'><br/>
<b>Пол:</b><select name='pol' style='width:97%'><option value='0'".($ank['pol']==0?" selected='selected'":null).">Девушка</option><option value='1'".($ank['pol']==1?" selected='selected'":null).">Парень</option></select><br/>
<b>Дата рождения:</b><br/><select name='ank_d_r' style='width:34%'><option value='0'".($ank['amk_d_r']==0?" selected='selected'":null).">День</option>
<option value='1'".($ank['ank_d_r']==1?" selected='selected'":null).">1</option>
<option value='2'".($ank['ank_d_r']==2?" selected='selected'":null).">2</option>
<option value='3'".($ank['ank_d_r']==3?" selected='selected'":null).">3</option>
<option value='4'".($ank['ank_d_r']==4?" selected='selected'":null).">4</option>
<option value='5'".($ank['ank_d_r']==5?" selected='selected'":null).">5</option>
<option value='6'".($ank['ank_d_r']==6?" selected='selected'":null).">6</option>
<option value='7'".($ank['ank_d_r']==7?" selected='selected'":null).">7</option>
<option value='8'".($ank['ank_d_r']==8?" selected='selected'":null).">8</option>
<option value='9'".($ank['ank_d_r']==9?" selected='selected'":null).">9</option>
<option value='10'".($ank['ank_d_r']==10?" selected='selected'":null).">10</option>
<option value='11'".($ank['ank_d_r']==11?" selected='selected'":null).">11</option>
<option value='12'".($ank['ank_d_r']==12?" selected='selected'":null).">12</option>
<option value='13'".($ank['ank_d_r']==13?" selected='selected'":null).">13</option>
<option value='14'".($ank['ank_d_r']==14?" selected='selected'":null).">14</option>
<option value='15'".($ank['ank_d_r']==15?" selected='selected'":null).">15</option>
<option value='16'".($ank['ank_d_r']==16?" selected='selected'":null).">16</option>
<option value='17'".($ank['ank_d_r']==17?" selected='selected'":null).">17</option>
<option value='18'".($ank['ank_d_r']==18?" selected='selected'":null).">18</option>
<option value='19'".($ank['ank_d_r']==19?" selected='selected'":null).">19</option>
<option value='20'".($ank['ank_d_r']==20?" selected='selected'":null).">20</option>
<option value='21'".($ank['ank_d_r']==21?" selected='selected'":null).">21</option>
<option value='22'".($ank['ank_d_r']==22?" selected='selected'":null).">22</option>
<option value='23'".($ank['ank_d_r']==23?" selected='selected'":null).">23</option>
<option value='24'".($ank['ank_d_r']==24?" selected='selected'":null).">24</option>
<option value='25'".($ank['ank_d_r']==25?" selected='selected'":null).">25</option>
<option value='26'".($ank['ank_d_r']==26?" selected='selected'":null).">26</option>
<option value='27'".($ank['ank_d_r']==27?" selected='selected'":null).">27</option>
<option value='28'".($ank['ank_d_r']==28?" selected='selected'":null).">28</option>
<option value='29'".($ank['ank_d_r']==29?" selected='selected'":null).">29</option>
<option value='30'".($ank['ank_d_r']==30?" selected='selected'":null).">30</option>
<option value='31'".($ank['ank_d_r']==31?" selected='selected'":null).">31</option>
</select>
<select name='ank_m_r' style='width:30%'>
<option value='0'".($ank['ank_m_r']==0?" selected='selected'":null).">Месяц</option>
<option value='1'".($ank['ank_m_r']==1?" selected='selected'":null).">Январь</option>
<option value='2'".($ank['ank_m_r']==2?" selected='selected'":null).">Февраль</option>
<option value='3'".($ank['ank_m_r']==3?" selected='selected'":null).">Март</option>
<option value='4'".($ank['ank_m_r']==4?" selected='selected'":null).">Апрель</option>
<option value='5'".($ank['ank_m_r']==5?" selected='selected'":null).">Май</option>
<option value='6'".($ank['ank_m_r']==6?" selected='selected'":null).">Июнь</option>
<option value='7'".($ank['ank_m_r']==7?" selected='selected'":null).">Июль</option>
<option value='8'".($ank['ank_m_r']==8?" selected='selected'":null).">Август</option>
<option value='9'".($ank['ank_m_r']==9?" selected='selected'":null).">Сентябрь</option>
<option value='10'".($ank['ank_m_r']==10?" selected='selected'":null).">Октябрь</option>
<option value='11'".($ank['ank_m_r']==11?" selected='selected'":null).">Ноябрь</option>
<option value='12'".($ank['ank_m_r']==12?" selected='selected'":null).">Декабрь</option>
</select><select name='ank_g_r' style='width:30%'>
<option value='0'".($ank['ank_g_r']==0?" selected='selected'":null).">Год</option>
<option value='2013'".($ank['ank_g_r']==2013?" selected='selected'":null).">2013</option>
<option value='2012'".($ank['ank_g_r']==2012?" selected='selected'":null).">2012</option>
<option value='2011'".($ank['ank_g_r']==2011?" selected='selected'":null).">2011</option>
<option value='2010'".($ank['ank_g_r']==2010?" selected='selected'":null).">2010</option>
<option value='2009'".($ank['ank_g_r']==2009?" selected='selected'":null).">2009</option>
<option value='2008'".($ank['ank_g_r']==2008?" selected='selected'":null).">2008</option>
<option value='2007'".($ank['ank_g_r']==2007?" selected='selected'":null).">2007</option>
<option value='2006'".($ank['ank_g_r']==2006?" selected='selected'":null).">2006</option>
<option value='2005'".($ank['ank_g_r']==2005?" selected='selected'":null).">2005</option>
<option value='2004'".($ank['ank_g_r']==2004?" selected='selected'":null).">2004</option>
<option value='2003'".($ank['ank_g_r']==2003?" selected='selected'":null).">2003</option>
<option value='2002'".($ank['ank_g_r']==2002?" selected='selected'":null).">2002</option>
<option value='2001'".($ank['ank_g_r']==2001?" selected='selected'":null).">2001</option>
<option value='2000'".($ank['ank_g_r']==2000?" selected='selected'":null).">2000</option>
<option value='1999'".($ank['ank_g_r']==1999?" selected='selected'":null).">1999</option>
<option value='1998'".($ank['ank_g_r']==1998?" selected='selected'":null).">1998</option>
<option value='1997'".($ank['ank_g_r']==1997?" selected='selected'":null).">1997</option>
<option value='1996'".($ank['ank_g_r']==1996?" selected='selected'":null).">1996</option>
<option value='1995'".($ank['ank_g_r']==1995?" selected='selected'":null).">1995</option>
<option value='1994'".($ank['ank_g_r']==1994?" selected='selected'":null).">1994</option>
<option value='1993'".($ank['ank_g_r']==1993?" selected='selected'":null).">1993</option>
<option value='1992'".($ank['ank_g_r']==1992?" selected='selected'":null).">1992</option>
<option value='1991'".($ank['ank_g_r']==1991?" selected='selected'":null).">1991</option>
<option value='1990'".($ank['ank_g_r']==1990?" selected='selected'":null).">1990</option>
<option value='1989'".($ank['ank_g_r']==1989?" selected='selected'":null).">1989</option>
<option value='1988'".($ank['ank_g_r']==1988?" selected='selected'":null).">1988</option>
<option value='1987'".($ank['ank_g_r']==1987?" selected='selected'":null).">1987</option>
<option value='1986'".($ank['ank_g_r']==1986?" selected='selected'":null).">1986</option>
<option value='1985'".($ank['ank_g_r']==1985?" selected='selected'":null).">1985</option>
<option value='1984'".($ank['ank_g_r']==1984?" selected='selected'":null).">1984</option>
<option value='1983'".($ank['ank_g_r']==1983?" selected='selected'":null).">1983</option>
<option value='1982'".($ank['ank_g_r']==1982?" selected='selected'":null).">1982</option>
<option value='1981'".($ank['ank_g_r']==1981?" selected='selected'":null).">1981</option>
<option value='1980'".($ank['ank_g_r']==1980?" selected='selected'":null).">1980</option>
<option value='1979'".($ank['ank_g_r']==1979?" selected='selected'":null).">1979</option>
<option value='1978'".($ank['ank_g_r']==1978?" selected='selected'":null).">1978</option>
<option value='1977'".($ank['ank_g_r']==1977?" selected='selected'":null).">1977</option>
<option value='1976'".($ank['ank_g_r']==1976?" selected='selected'":null).">1976</option>
<option value='1975'".($ank['ank_g_r']==1975?" selected='selected'":null).">1975</option>
<option value='1974'".($ank['ank_g_r']==1974?" selected='selected'":null).">1974</option>
<option value='1973'".($ank['ank_g_r']==1973?" selected='selected'":null).">1973</option>
<option value='1972'".($ank['ank_g_r']==1972?" selected='selected'":null).">1972</option>
<option value='1971'".($ank['ank_g_r']==1971?" selected='selected'":null).">1971</option>
<option value='1970'".($ank['ank_g_r']==1970?" selected='selected'":null).">1970</option>
</select><br/>
<b>Страна:</b><br/><select name='strana' style='width:97%'>
<option value='1'".($ank['strana']==1?" selected='selected'":null).">Абхазия</option>
<option value='2'".($ank['strana']==2?" selected='selected'":null).">Австралия</option>
<option value='3'".($ank['strana']==3?" selected='selected'":null).">Австрия</option>
<option value='4'".($ank['strana']==4?" selected='selected'":null).">Азербайджан</option>
<option value='5'".($ank['strana']==5?" selected='selected'":null).">Армения</option>
<option value='6'".($ank['strana']==6?" selected='selected'":null).">Афганистан</option>
<option value='7'".($ank['strana']==7?" selected='selected'":null).">Беларусь</option>
<option value='8'".($ank['strana']==8?" selected='selected'":null).">Бельгия</option>
<option value='9'".($ank['strana']==9?" selected='selected'":null).">Болгария</option>
<option value='10'".($ank['strana']==10?" selected='selected'":null).">Боливия</option>
<option value='11'".($ank['strana']==11?" selected='selected'":null).">Бразилия</option>
<option value='12'".($ank['strana']==12?" selected='selected'":null).">Великобритания</option>
<option value='13'".($ank['strana']==13?" selected='selected'":null).">Венгрия</option>
<option value='14'".($ank['strana']==14?" selected='selected'":null).">Германия</option>
<option value='15'".($ank['strana']==15?" selected='selected'":null).">Гонконг</option>
<option value='16'".($ank['strana']==16?" selected='selected'":null).">Грузия</option>
<option value='17'".($ank['strana']==17?" selected='selected'":null).">Израиль</option>
<option value='18'".($ank['strana']==18?" selected='selected'":null).">Индия</option>
<option value='19'".($ank['strana']==19?" selected='selected'":null).">Ирак</option>
<option value='20'".($ank['strana']==20?" selected='selected'":null).">Иран</option>
<option value='21'".($ank['strana']==21?" selected='selected'":null).">Казахстан</option>
<option value='22'".($ank['strana']==22?" selected='selected'":null).">Киргизия</option>
<option value='23'".($ank['strana']==23?" selected='selected'":null).">Корея</option>
<option value='24'".($ank['strana']==24?" selected='selected'":null).">Латвия</option>
<option value='25'".($ank['strana']==25?" selected='selected'":null).">Листва</option>
<option value='26'".($ank['strana']==26?" selected='selected'":null).">Молдовию</option>
<option value='27'".($ank['strana']==27?" selected='selected'":null).">Объединенные Арабские Эмираты</option>
<option value='28'".($ank['strana']==28?" selected='selected'":null).">Польша</option>
<option value='29'".($ank['strana']==29?" selected='selected'":null).">Россия</option>
<option value='30'".($ank['strana']==30?" selected='selected'":null).">Румыния</option>
<option value='31'".($ank['strana']==31?" selected='selected'":null).">Сербия</option>
<option value='32'".($ank['strana']==32?" selected='selected'":null).">Словакия</option>
<option value='33'".($ank['strana']==33?" selected='selected'":null).">Словения</option>
<option value='34'".($ank['strana']==34?" selected='selected'":null).">США</option>
<option value='35'".($ank['strana']==35?" selected='selected'":null).">Таджикистан</option>
<option value='36'".($ank['strana']==36?" selected='selected'":null).">Узбекистан</option>
<option value='37'".($ank['strana']==37?" selected='selected'":null).">Украина</option>
<option value='38'".($ank['strana']==38?" selected='selected'":null).">Чехия</option>
<option value='39'".($ank['strana']==39?" selected='selected'":null).">Швеция</option>
</select><br/>
<b>Город:</b><br/><input type='text' name='ank_city' value='".htmlspecialchars($ank['ank_city'])."' style='width:95%'><br/>
<input type='submit' name='ok' value='Сохранить' style='width:97%'></form>";
echo "<a href='/user/profile/?id=$ank[id]'><div class='gmenu'><img src='/style/icons/str2.gif' alt=''> В анкету $ank[nick]</div></a>";
} else header("location:index.php");
include_once H.'sys/inc/tfoot.php';
?>