<?php
/*
-----------------------------------------
Автор: -=КотЭ=-(-=MTV=-) и Shot(Robber)
Бесплатный WAP движок: Strongcms
Контакты: 0664452670(МТС) ибо ICQ(7296000)
Файл: x-status.php
-------------------------------------------
*/
//-----Создаем титл страницы-----//
$title = 'X-статус';
//----- Подключаем require_once (он же include_once)-----//
require_once ('../system/function.php');
require_once ('../system/header.php');

if(!$user['id']) {
header('Location: '.$HOME);
exit();
}

echo '<div class="title"><a href="'.$HOME.'/user/cab.php">Личный кабинет</a> | X-статус</div>';

if(isset($_REQUEST['standart'])) {
mysql_query('UPDATE `users` SET `xstatus` = "0" WHERE `id` = "'.$user['id'].'"');
header('Location: '.$HOME.'/user/x-status.php');
exit();
}

if(isset($_REQUEST['ok'])) {

$xstatus = strong($_POST['xstatus']);

mysql_query('UPDATE `users` SET `xstatus` = "'.$xstatus.'" WHERE `id` = "'.$user['id'].'"');
echo '<div class="podmenu"><center>Вы успешно изменили Х-статус на <img src="'.$HOME.'/images/x-status/'.$xstatus.'.png" alt="8" /></center></div>
<div class="menudiv"><a href="'.$HOME.'/user/x-status.php" class="k_menu">Назад в Х-статус</div></a>';
require_once ('../system/footer.php');
exit();
}

echo '<div class="menudiv"><a href="'.$HOME.'/user/x-status.php?standart" class="k_menu">Убрать статус</a></div>
<div class="podmenu"><form action="" method="post">
<input type="radio" name="xstatus" value="5" /><img src="'.$HOME.'/images/x-status/5.png" alt="8" /> Готов болтать<br/>
<input type="radio" name="xstatus" value="17" /><img src="'.$HOME.'/images/x-status/17.png" alt="8" /> Не беспокоить<br/>
<input type="radio" name="xstatus" value="2" /><img src="'.$HOME.'/images/x-status/2.png" alt="8" /> Болею<br/>
<input type="radio" name="xstatus" value="3" /><img src="'.$HOME.'/images/x-status/3.png" alt="8" /> Депрессия<br/>
<input type="radio" name="xstatus" value="4" /><img src="'.$HOME.'/images/x-status/4.png" alt="8" /> Думаю<br/>
<input type="radio" name="xstatus" value="7" /><img src="'.$HOME.'/images/x-status/7.png" alt="8" /> Курю<br/>
<input type="radio" name="xstatus" value="8" /><img src="'.$HOME.'/images/x-status/8.png" alt="8" /> Кушаю<br/>
<input type="radio" name="xstatus" value="9" /><img src="'.$HOME.'/images/x-status/9.png" alt="8" /> Люблю<br/>
<input type="radio" name="xstatus" value="15" /><img src="'.$HOME.'/images/x-status/15.png" alt="8" /> Смотрю тв<br/>
<input type="radio" name="xstatus" value="10" /><img src="'.$HOME.'/images/x-status/10.png" alt="8" /> Слушаю музыку<br/>
<input type="radio" name="xstatus" value="16" /><img src="'.$HOME.'/images/x-status/16.png" alt="8" /> В ванной<br/>
<input type="radio" name="xstatus" value="14" /><img src="'.$HOME.'/images/x-status/14.png" alt="8" /> В туалете<br />
<input type="radio" name="xstatus" value="12" /><img src="'.$HOME.'/images/x-status/12.png" alt="8" /> Занимаюсь сексом<br />
<input type="radio" name="xstatus" value="6" /><img src="'.$HOME.'/images/x-status/6.png" alt="8" /> Играю<br />
<input type="radio" name="xstatus" value="11" /><img src="'.$HOME.'/images/x-status/11.png" alt="8" /> Пью пиво<br />
<input type="radio" name="xstatus" value="13" /><img src="'.$HOME.'/images/x-status/13.png" alt="8" /> Сонный<br />
<input type="radio" name="xstatus" value="1" /><img src="'.$HOME.'/images/x-status/1.png" alt="8" /> Безумный<br />
<input type="submit" value="Изменить" name="ok"/></form>
</div>';

//для админов
if(isset($_REQUEST['standart'])) {
mysql_query('UPDATE `users` SET `xstatus` = "0" WHERE `id` = "'.$user['id'].'"');
header('Location: '.$HOME.'/user/x-status.php');
exit();
}

if(isset($_REQUEST['ok'])) {

$xstatus = strong($_POST['xstatus']);

mysql_query('UPDATE `users` SET `xstatus` = "'.$xstatus.'" WHERE `id` = "'.$user['id'].'"');
echo '<div class="podmenu"><center>Вы успешно изменили Х-статус на <img src="'.$HOME.'/images/x-status/adm/man/'.$xstatus.'.png" alt="8" /></center></div>
<div class="menudiv"><a href="'.$HOME.'/user/x-status.php" class="k_menu">Назад в Х-статус</div></a>';
require_once ('../system/footer.php');
exit();
}

if($user['level'] >0) {
if($user['sex'] ==1 ){
echo '<div class="podmenu"><form action="" method="post">';
echo '<b>Для Администратора:</b></br>
<input type="radio" name="xstatus" value="18" /><img src="'.$HOME.'/images/x-status/18.png" alt="8" /> 1<br/>
<input type="radio" name="xstatus" value="19" /><img src="'.$HOME.'/images/x-status/19.png" alt="8" /> 2<br/>
<input type="radio" name="xstatus" value="20" /><img src="'.$HOME.'/images/x-status/20.png" alt="8" /> 3<br/>
<input type="submit" value="Изменить" name="ok"/></form>';

}else{
echo '<div class="podmenu"><form action="" method="post">';
echo '<b>Для Администраторши:</b></br>
<input type="radio" name="xstatus" value="21" /><img src="'.$HOME.'/images/x-status/21.png" alt="8" /> 1<br/>
<input type="radio" name="xstatus" value="22" /><img src="'.$HOME.'/images/x-status/22.png" alt="8" /> 2<br/>
<input type="radio" name="xstatus" value="23" /><img src="'.$HOME.'/images/x-status/23.png" alt="8" /> 3<br/>
<input type="submit" value="Изменить" name="ok"/></form>';
}
echo '<b>Данный раздел предназначен только для администраторов сайта</b></div>';

}

echo '<div class="menudiv"><a href="'.$HOME.'/user/cab.php" class="k_menu">Назад в кабинет</div></a>';

//-----Подключаем низ-----//
require_once ('../system/footer.php');
?>