Размер файла: 16.45Kb
<?php
include 'sys/db.php';
include 'sys/conf.php';
include 'sys/start.php';
include 'sys/functions.php';
if(isset($user['login'])){
$config_title_name = "Анкета";
include 'style/head.php';
$user_info = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `login` = '".$_GET['login']."'"));
if (isset($user))$user_info['login']=$user['login'];
if (isset($_GET['login']))$user_info['login']=intval($_GET['login']);
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `login` = '".$_GET['login']."' LIMIT 1"),0)==0){
echo "<div class=content>\n";
echo "Такого юзера не существует!<br></div>\n";
echo "<div class=content><a href='index.php'> Прихожая</a></div>\n";
include 'style/foot.php';
exit();
}
echo "<div class=title>Анкета ".$_GET['login']." ";
$uson = $user_info['time'];
if ($uson>time()-600) {echo "(На сайте)";
}else{echo "(Оффлайн)";}
echo "</div>\n";
echo "<div class=content>";
echo 'Логин: '.$_GET['login'].'<br />';
echo 'Имя: '.$user_info['ank_name'].'<br />';
if ($user_info['id'] != $user['id']){
if ($user_info['id']!=NULL){echo "ID: $user_info[id]<br>\n";}
if ($user_info['ank_mood']==NULL){
if ($user_info['ank_mood']==1)echo "Бодрое<br>\n";
elseif ($user_info['ank_mood']==2)echo "Прекрасное<br>\n";
elseif ($user_info['ank_mood']==3)echo "Весёлое<br>\n";
elseif ($user_info['ank_mood']==4)echo "Ангельское<br>\n";
elseif ($user_info['ank_mood']==5)echo "Агрессивное<br>\n";
elseif ($user_info['ank_mood']==6)echo "Изумлённое <br>\n";
elseif ($user_info['ank_mood']==7)echo "Удивленное <br>\n";
elseif ($user_info['ank_mood']==8)echo "Злое <br>\n";
elseif ($user_info['ank_mood']==9)echo "Сердитое <br>\n";
elseif ($user_info['ank_mood']==10)echo "Сонное <br>\n";
elseif ($user_info['ank_mood']==11)echo "Озлобленное <br>\n";
elseif ($user_info['ank_mood']==12)echo "Скучающее <br>\n";
elseif ($user_info['ank_mood']==13)echo "Оживлённое <br>\n";
elseif ($user_info['ank_mood']==14)echo "Угрюмое <br>\n";
elseif ($user_info['ank_mood']==15)echo "Размышляющее <br>\n";
elseif ($user_info['ank_mood']==16)echo "Занятое <br>\n";
elseif ($user_info['ank_mood']==17)echo "Нахальное <br>\n";
elseif ($user_info['ank_mood']==18)echo "Холодное <br>\n";
elseif ($user_info['ank_mood']==19)echo "Смущённое <br>\n";
elseif ($user_info['ank_mood']==20)echo "Крутое <br>\n";
elseif ($user_info['ank_mood']==21)echo "Дерзкое <br>\n";
elseif ($user_info['ank_mood']==22)echo "Непонятное <br>\n";
elseif ($user_info['ank_mood']==23)echo "Дьявольское <br>\n";
elseif ($user_info['ank_mood']==24)echo "Сварливое <br>\n";
elseif ($user_info['ank_mood']==25)echo "Счастливое <br>\n";
elseif ($user_info['ank_mood']==26)echo "Горячее <br>\n";
elseif ($user_info['ank_mood']==27)echo "Влюблённое <br>\n";
elseif ($user_info['ank_mood']==28)echo "Невинное <br>\n";
elseif ($user_info['ank_mood']==29)echo "Вдохновлённое <br>\n";
elseif ($user_info['ank_mood']==30)echo "Одинокое <br>\n";
elseif ($user_info['ank_mood']==31)echo "Скрытое <br>\n";
elseif ($user_info['ank_mood']==32)echo "Пушистое <br>\n";
elseif ($user_info['ank_mood']==33)echo "Задумчивое <br>\n";
elseif ($user_info['ank_mood']==34)echo "Психоделическое <br>\n";
elseif ($user_info['ank_mood']==35)echo "Расслабленое <br>\n";
elseif ($user_info['ank_mood']==36)echo "Грустное <br>\n";
elseif ($user_info['ank_mood']==37)echo "Испуганное <br>\n";
elseif ($user_info['ank_mood']==38)echo "Шокированное <br>\n";
elseif ($user_info['ank_mood']==39)echo "Потрясенное <br>\n";
elseif ($user_info['ank_mood']==40)echo "Больное <br>\n";
elseif ($user_info['ank_mood']==41)echo "Хитрое <br>\n";
elseif ($user_info['ank_mood']==42)echo "Усталое <br>\n";
elseif ($user_info['ank_mood']==43)echo "Утомленное <br>\n";
elseif ($user_info['ank_mood']==44)echo "Изменчивое <br>\n";
elseif ($user_info['ank_mood']==45)echo "Пофигистическое <br>\n";
}
if ($user_info['gender']==1)if ($user_info['ank_couple_id']!=NULL){echo "Женат на: <a href='anketa.php?id=$user_info[ank_couple_id]'>$user_info[ank_couple_login]</a><br>\n";}
elseif ($user_info['gender']==2)if ($user_info['couple']!=NULL){echo "Замужем за: $user_info[couple]<br>\n";}
if ($user_info['ank_name']!=NULL){echo "Имя: $user_info[ank_name]<br>\n";}
if ($user_info['foto']!=NULL){echo "Фото: <a href='anketa.php?act=photo&id=".$user_info['id']."'><b>Скачать</b></a><br>\n";}
echo "День рождения: ";
if ($user_info['ank_d_r']!=NULL && $user_info['ank_m_r']!=NULL && $user_info['ank_g_r']!=NULL){
if ($user_info['ank_m_r']==1)$user_info['mes']='Января';
elseif ($user_info['ank_m_r']==2)$user_info['mes']='Февраля';
elseif ($user_info['ank_m_r']==3)$user_info['mes']='Марта';
elseif ($user_info['ank_m_r']==4)$user_info['mes']='Апреля';
elseif ($user_info['ank_m_r']==5)$user_info['mes']='Мая';
elseif ($user_info['ank_m_r']==6)$user_info['mes']='Июня';
elseif ($user_info['ank_m_r']==7)$user_info['mes']='Июля';
elseif ($user_info['ank_m_r']==8)$user_info['mes']='Августа';
elseif ($user_info['ank_m_r']==9)$user_info['mes']='Сентября';
elseif ($user_info['ank_m_r']==10)$user_info['mes']='Октября';
elseif ($user_info['ank_m_r']==11)$user_info['mes']='Ноября';
else $user_info['mes']='Декабря';
echo "$user_info[ank_d_r] $user_info[mes] $user_info[ank_g_r]г.<br>\n";
$user_info['ank_age']=date("Y")-$user_info['ank_g_r'];
if (date("n")<$user_info['ank_m_r'])$user_info['ank_age']=$user_info['ank_age']-1;
elseif (date("n")==$user_info['ank_m_r']&& date("j")<$user_info['ank_d_r'])$user_info['ank_age']=$user_info['ank_age']-1;}
elseif($user_info['ank_d_r']!=NULL && $user_info['ank_m_r']!=NULL){
if ($user_info['ank_m_r']==1)$user_info['mes']='Января';
elseif ($user_info['ank_m_r']==2)$user_info['mes']='Февраля';
elseif ($user_info['ank_m_r']==3)$user_info['mes']='Марта';
elseif ($user_info['ank_m_r']==4)$user_info['mes']='Апреля';
elseif ($user_info['ank_m_r']==5)$user_info['mes']='Мая';
elseif ($user_info['ank_m_r']==6)$user_info['mes']='Июня';
elseif ($user_info['ank_m_r']==7)$user_info['mes']='Июля';
elseif ($user_info['ank_m_r']==8)$user_info['mes']='Августа';
elseif ($user_info['ank_m_r']==9)$user_info['mes']='Сентября';
elseif ($user_info['ank_m_r']==10)$user_info['mes']='Октября';
elseif ($user_info['ank_m_r']==11)$user_info['mes']='Ноября';
else $user_info['mes']='Декабря';
echo "$user_info[ank_d_r] $user_info[mes]<br>\n";}
$user_info_status = $user_info[posts];
if ($user_info_status <= 499)$user_info_status="Новичок";
elseif ($user_info_status <= 999)$user_info_status="Пользователь";
elseif ($user_info_status <= 2999)$user_info_status="Продвинутый";
elseif ($user_info_status <= 4999)$user_info_status="Чаттер";
elseif ($user_info_status <= 9999)$user_info_status="Тусовщик";
elseif ($user_info_status >= 10000)$user_info_status="Настоящий чатланин";
echo "Cтатус: $user_info_status<br>\n";
if ($user_info['posts']!=NULL){echo "Посты: $user_info[posts]<br>\n";}
if ($user_info['gender']==1)echo "Пол: Мужской<br>\n";
elseif ($user_info['gender']==2)echo "Пол: Женский<br>\n";
if ($user_info['ank_city']!=NULL){echo "Город: $user_info[ank_city]<br>\n";}
if ($user_info['ank_phone']!=NULL){echo "Номер мобильного: $user_info[ank_phone]<br>\n";}
if ($user_info['ank_icq']!=NULL){echo "ICQ: $user_info[ank_icq]<br>\n";}
if ($user_info['ank_mobile']!=NULL){echo "Телефон: $user_info[ank_mobile]<br>\n";}
if ($user_info['ank_operator']!=NULL){echo "Оператор: $user_info[ank_operator]<br>\n";}
if ($user_info['ank_osebe']!=NULL){echo "Обо мне: $user_info[ank_osebe]<br>\n";}
if ($user_info['ank_interests']!=NULL){echo "Интересы: $user_info[ank_interests]<br>\n";}
if ($user_info['ank_work']!=NULL){echo "Место работы/учебы: $user_info[ank_work]<br>\n";}
echo "</div>\n<div class=content>";
$friendtest = mysql_fetch_array(mysql_query("SELECT * FROM `friends` WHERE `user`='$user[id]' AND `friend`='$user_info[id]'"));
if($friendtest != '0'){
echo "<img src='img/friends.gif' alt=''> <a href='friends.php?act=del&id=".$friendtest['id']."'> Убрать из друзей</a><br>\n";
}else{
echo "<img src='img/friends.gif' alt=''> <a href='friends.php?act=add&id=".$user_info['id']."'> Добавить в друзья</a><br>\n";}
$ignortest = mysql_fetch_array(mysql_query("SELECT * FROM `ignore` WHERE `user`='$user[id]' AND `ignor`='$user_info[id]'"));
if($ignortest != '0'){
echo "<img src='img/ignor.gif' alt=''> <a href='ignore.php?act=del&id=".$ignortest['id']."'> Удалить из игнора</a><br>\n";
}else{
echo "<img src='img/ignor.gif' alt=''> <a href='ignore.php?act=add&id=".$user_info['id']."'> Добавить в игнор</a><br>\n";}
echo "<img src='img/msg.gif' alt=''> <a href='mail.php?add=".$user_info['id']."'> Отправить записку</a>\n";
} else {
if ($user_info['ank_mood']==NULL){
if ($user_info['ank_mood']==1)echo "Бодрое<br>\n";
elseif ($user_info['ank_mood']==2)echo "Прекрасное<br>\n";
elseif ($user_info['ank_mood']==3)echo "Весёлое<br>\n";
elseif ($user_info['ank_mood']==4)echo "Ангельское<br>\n";
elseif ($user_info['ank_mood']==5)echo "Агрессивное<br>\n";
elseif ($user_info['ank_mood']==6)echo "Изумлённое <br>\n";
elseif ($user_info['ank_mood']==7)echo "Удивленное <br>\n";
elseif ($user_info['ank_mood']==8)echo "Злое <br>\n";
elseif ($user_info['ank_mood']==9)echo "Сердитое <br>\n";
elseif ($user_info['ank_mood']==10)echo "Сонное <br>\n";
elseif ($user_info['ank_mood']==11)echo "Озлобленное <br>\n";
elseif ($user_info['ank_mood']==12)echo "Скучающее <br>\n";
elseif ($user_info['ank_mood']==13)echo "Оживлённое <br>\n";
elseif ($user_info['ank_mood']==14)echo "Угрюмое <br>\n";
elseif ($user_info['ank_mood']==15)echo "Размышляющее <br>\n";
elseif ($user_info['ank_mood']==16)echo "Занятое <br>\n";
elseif ($user_info['ank_mood']==17)echo "Нахальное <br>\n";
elseif ($user_info['ank_mood']==18)echo "Холодное <br>\n";
elseif ($user_info['ank_mood']==19)echo "Смущённое <br>\n";
elseif ($user_info['ank_mood']==20)echo "Крутое <br>\n";
elseif ($user_info['ank_mood']==21)echo "Дерзкое <br>\n";
elseif ($user_info['ank_mood']==22)echo "Непонятное <br>\n";
elseif ($user_info['ank_mood']==23)echo "Дьявольское <br>\n";
elseif ($user_info['ank_mood']==24)echo "Сварливое <br>\n";
elseif ($user_info['ank_mood']==25)echo "Счастливое <br>\n";
elseif ($user_info['ank_mood']==26)echo "Горячее <br>\n";
elseif ($user_info['ank_mood']==27)echo "Влюблённое <br>\n";
elseif ($user_info['ank_mood']==28)echo "Невинное <br>\n";
elseif ($user_info['ank_mood']==29)echo "Вдохновлённое <br>\n";
elseif ($user_info['ank_mood']==30)echo "Одинокое <br>\n";
elseif ($user_info['ank_mood']==31)echo "Скрытое <br>\n";
elseif ($user_info['ank_mood']==32)echo "Пушистое <br>\n";
elseif ($user_info['ank_mood']==33)echo "Задумчивое <br>\n";
elseif ($user_info['ank_mood']==34)echo "Психоделическое <br>\n";
elseif ($user_info['ank_mood']==35)echo "Расслабленое <br>\n";
elseif ($user_info['ank_mood']==36)echo "Грустное <br>\n";
elseif ($user_info['ank_mood']==37)echo "Испуганное <br>\n";
elseif ($user_info['ank_mood']==38)echo "Шокированное <br>\n";
elseif ($user_info['ank_mood']==39)echo "Потрясенное <br>\n";
elseif ($user_info['ank_mood']==40)echo "Больное <br>\n";
elseif ($user_info['ank_mood']==41)echo "Хитрое <br>\n";
elseif ($user_info['ank_mood']==42)echo "Усталое <br>\n";
elseif ($user_info['ank_mood']==43)echo "Утомленное <br>\n";
elseif ($user_info['ank_mood']==44)echo "Изменчивое <br>\n";
elseif ($user_info['ank_mood']==45)echo "Пофигистическое <br>\n";
}
if ($user_info['gender']==1)if ($user_info['ank_couple_id']!=NULL){echo "Женат на: <a href='anketa.php?id=$user_info[ank_couple_id]'>$user_info[ank_couple_login]</a><br>\n";}
elseif ($user_info['gender']==2)if ($user_info['couple']!=NULL){echo "Замужем за: $user_info[couple]<br>\n";}
if ($user_info['ank_name']!=NULL){echo "Имя: $user_info[ank_name]<br>\n";}
if ($user_info['foto']!=NULL){echo "Фото: <a href='anketa.php?act=photo&id=".$user_info['id']."'><b>Скачать</b></a><br>\n";}
echo "День рождения: ";
if ($user_info['ank_d_r']!=NULL && $user_info['ank_m_r']!=NULL && $user_info['ank_g_r']!=NULL){
if ($user_info['ank_m_r']==1)$user_info['mes']='Января';
elseif ($user_info['ank_m_r']==2)$user_info['mes']='Февраля';
elseif ($user_info['ank_m_r']==3)$user_info['mes']='Марта';
elseif ($user_info['ank_m_r']==4)$user_info['mes']='Апреля';
elseif ($user_info['ank_m_r']==5)$user_info['mes']='Мая';
elseif ($user_info['ank_m_r']==6)$user_info['mes']='Июня';
elseif ($user_info['ank_m_r']==7)$user_info['mes']='Июля';
elseif ($user_info['ank_m_r']==8)$user_info['mes']='Августа';
elseif ($user_info['ank_m_r']==9)$user_info['mes']='Сентября';
elseif ($user_info['ank_m_r']==10)$user_info['mes']='Октября';
elseif ($user_info['ank_m_r']==11)$user_info['mes']='Ноября';
else $user_info['mes']='Декабря';
echo "$user_info[ank_d_r] $user_info[mes] $user_info[ank_g_r]г.<br>\n";
$user_info['ank_age']=date("Y")-$user_info['ank_g_r'];
if (date("n")<$user_info['ank_m_r'])$user_info['ank_age']=$user_info['ank_age']-1;
elseif (date("n")==$user_info['ank_m_r']&& date("j")<$user_info['ank_d_r'])$user_info['ank_age']=$user_info['ank_age']-1;}
elseif($user_info['ank_d_r']!=NULL && $user_info['ank_m_r']!=NULL){
if ($user_info['ank_m_r']==1)$user_info['mes']='Января';
elseif ($user_info['ank_m_r']==2)$user_info['mes']='Февраля';
elseif ($user_info['ank_m_r']==3)$user_info['mes']='Марта';
elseif ($user_info['ank_m_r']==4)$user_info['mes']='Апреля';
elseif ($user_info['ank_m_r']==5)$user_info['mes']='Мая';
elseif ($user_info['ank_m_r']==6)$user_info['mes']='Июня';
elseif ($user_info['ank_m_r']==7)$user_info['mes']='Июля';
elseif ($user_info['ank_m_r']==8)$user_info['mes']='Августа';
elseif ($user_info['ank_m_r']==9)$user_info['mes']='Сентября';
elseif ($user_info['ank_m_r']==10)$user_info['mes']='Октября';
elseif ($user_info['ank_m_r']==11)$user_info['mes']='Ноября';
else $user_info['mes']='Декабря';
echo "$user_info[ank_d_r] $user_info[mes]<br>\n";}
$user_info_status = $user_info[posts];
if ($user_info_status <= 499)$user_info_status="Новичок";
elseif ($user_info_status <= 999)$user_info_status="Пользователь";
elseif ($user_info_status <= 2999)$user_info_status="Продвинутый";
elseif ($user_info_status <= 4999)$user_info_status="Чаттер";
elseif ($user_info_status <= 9999)$user_info_status="Тусовщик";
elseif ($user_info_status >= 10000)$user_info_status="Настоящий чатланин";
echo "Cтатус: $user_info_status<br>\n";
if ($user_info['posts']!=NULL){echo "Посты: $user_info[posts]<br>\n";}
if ($user_info['gender']==1)echo "Пол: Мужской<br>\n";
elseif ($user_info['gender']==2)echo "Пол: Женский<br>\n";
if ($user_info['ank_city']!=NULL){echo "Город: $user_info[ank_city]<br>\n";}
if ($user_info['ank_phone']!=NULL){echo "Номер мобильного: $user_info[ank_phone]<br>\n";}
if ($user_info['ank_icq']!=NULL){echo "ICQ: $user_info[ank_icq]<br>\n";}
if ($user_info['ank_mobile']!=NULL){echo "Телефон: $user_info[ank_mobile]<br>\n";}
if ($user_info['ank_operator']!=NULL){echo "Оператор: $user_info[ank_operator]<br>\n";}
if ($user_info['ank_osebe']!=NULL){echo "Обо мне: $user_info[ank_osebe]<br>\n";}
if ($user_info['ank_interests']!=NULL){echo "Интересы: $user_info[ank_interests]<br>\n";}
if ($user_info['ank_work']!=NULL){echo "Место работы/учебы: $user_info[ank_work]<br>\n";}
}
}
echo "</div>";
echo "<div class=stat><a href='index.php'>Прихожая</a></div>\n";
include 'style/foot.php';
?>