<?
include_once 'sys/inc/start.php';
include_once 'sys/inc/compress.php';
include_once 'sys/inc/sess.php';
include_once 'sys/inc/home.php';
include_once 'sys/inc/settings.php';
include_once 'sys/inc/db_connect.php';
include_once 'sys/inc/ipua.php';
include_once 'sys/inc/fnc.php';
include_once 'sys/inc/user.php';
$set['title']='Ваш статус'; // заголовок страницы
include_once 'sys/inc/thead.php';
title();
if (isset($_GET['set']))
{
mysql_query("UPDATE `user` SET `status` = '".mysql_escape_string($_GET['st'])."' WHERE `id` = '$user[id]' LIMIT 1");
$q = mysql_query("SELECT * FROM `fanat` WHERE `user` = '$user[id]' AND `i` = '1'");
while ($f = mysql_fetch_array($q))
{
$a = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$f[frend]' LIMIT 1"));

$msg_lenta="Изменил свой онлайн статус!";

mysql_query("INSERT INTO `lenta` (`id_user`, `id_kont`, `msg`, `time`) values('$user[id]', '$a[id]', '$msg_lenta', '$time')"); 
}
if (!isset($err))msg('Ваш статус изменен');
}

err();

if (isset($user))
{
echo "<div class='rowup'>";
echo "Ваш текущий статус: \n";


echo "".online($user['id'])." \n";
if ($user['status']==0)echo "Онлайн<br/>\n";
else if ($user['status']==1)echo "Готов болтать<br/>\n";
else if ($user['status']==2)echo "Не беспокоить<br/>\n";
else if ($user['status']==3)echo "Болею<br/>\n";
else if ($user['status']==4)echo "Депрессия<br/>\n";
else if ($user['status']==5)echo "Думаю<br/>\n";
else if ($user['status']==6)echo "Курю<br/>\n";
else if ($user['status']==7)echo "Кушаю<br/>\n";
else if ($user['status']==8)echo "Люблю<br/>\n";
else if ($user['status']==9)echo "Смотрю тв<br/>\n";
else if ($user['status']==10)echo "Слушаю музыку<br/>\n";
else if ($user['status']==11)echo "В ванной<br/>\n";
else if ($user['status']==12)echo "В туалете<br/>\n";
else if ($user['status']==13)echo "Занимаюсь сексом<br/>\n";
else if ($user['status']==14)echo "Играю в игру<br/>\n";
else if ($user['status']==15)echo "Пью пиво<br/>\n";
else if ($user['status']==16)echo "Сонный<br/>\n";
else if ($user['status']==17)echo "В сети<br/>\n";
else if ($user['status']==18)echo "На учебе<br/>\n";
else if ($user['status']==19)echo "Вопрос<br/>\n";
else if ($user['status']==20)echo "В Пути<br/>\n";
else if ($user['status']==21)echo "На работе<br/>\n";
else if ($user['status']==22)echo "С друзьями<br/>\n";
else if ($user['status']==23)echo "Сплю<br/>\n";
else if ($user['status']==24)echo "В телефоне<br/>\n";
echo "</div>\n";
echo "<div class='anput2'>";
if ($user['status']>=0) echo "<a href='?p=status&amp;st=0&amp;set'>Стандарт</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/gotov_boltat.png' alt='' class='icon'/> <a href='?p=status&amp;st=1&amp;set'>Готов болтать</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/zaniat.png' alt='' class='icon'/> <a href='?p=status&amp;st=2&amp;set'>Не беспокоить</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/boleu.png' alt='' class='icon'/> <a href='?p=status&amp;st=3&amp;set'>Болею</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/depressia.png' alt='' class='icon'/> <a href='?p=status&amp;st=4&amp;set'>Депрессия</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/dumau.png' alt='' class='icon'/> <a href='?p=status&amp;st=5&amp;set'>Думаю</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/kuru.png' alt='' class='icon'/> <a href='?p=status&amp;st=6&amp;set'>Курю</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/kushau.png' alt='' class='icon'/> <a href='?p=status&amp;st=7&amp;set'>Кушаю</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/love.png' alt='' class='icon'/> <a href='?p=status&amp;st=8&amp;set'>Люблю</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/tv.png' alt='' class='icon'/> <a href='?p=status&amp;st=9&amp;set'>Смотрю тв</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/music.png' alt='' class='icon'/> <a href='?p=status&amp;st=10&amp;set'>Слушаю музыку</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/vanna.png' alt='' class='icon'/> <a href='?p=status&amp;st=11&amp;set'>В ванной</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/tualet.png' alt='' class='icon'/> <a href='?p=status&amp;st=12&amp;set'>В туалете</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/sex.png' alt='' class='icon'/> <a href='?p=status&amp;st=13&amp;set'>Занимаюсь сексом</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/igrau.png' alt='' class='icon'/> <a href='?p=status&amp;st=14&amp;set'>Играю в игру</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/pivo.png' alt='' class='icon'/> <a href='?p=status&amp;st=15&amp;set'>Пью пиво</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/sonni.png' alt='' class='icon'/> <a href='?p=status&amp;st=16&amp;set'>Сонный</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/1.png' alt='' class='icon'/> <a href='?p=status&amp;st=17&amp;set'>В сети</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/12.png' alt='' class='icon'/> <a href='?p=status&amp;st=18&amp;set'>На учебе</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/13.png' alt='' class='icon'/> <a href='?p=status&amp;st=19&amp;set'>Вопрос</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/14.png' alt='' class='icon'/> <a href='?p=status&amp;st=20&amp;set'>В Пути</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/18.png' alt='' class='icon'/> <a href='?p=status&amp;st=21&amp;set'>На работе</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/19.png' alt='' class='icon'/> <a href='?p=status&amp;st=22&amp;set'>С друзьями</a><br />\n";
echo "</div>\n";
echo "<div class='anput1'>";
echo "<img src='/style/status/31.png' alt='' class='icon'/> <a href='?p=status&amp;st=23&amp;set'>Сплю</a><br />\n";
echo "</div>\n";
echo "<div class='anput2'>";
echo "<img src='/style/status/7.png' alt='' class='icon'/> <a href='?p=status&amp;st=24&amp;set'>В телефоне</a><br />\n";}

else
{
echo "Только для пользователей сайта";
}
echo "</div>\n";

include_once 'sys/inc/tfoot.php';
?>
