View file pages/menu.php

File size: 3.48Kb
<?php

$title='Личное меню';
require"../system/config.php";
require"../system/func.php";
require"../system/head.php";
require"../system/error.php";
echo'<div class="i">Личное меню<br></div>';
if($vhod==1){
switch($mod){
default:
$newpo=mysql_result(mysql_query("SELECT COUNT(*) FROM `post` WHERE `id_komu`='$id_user' AND `pstatus`='new'"),0);
$photou=mysql_result(mysql_query("SELECT COUNT(*) FROM `photos` WHERE `id_user`='$id_user' AND `type`='file'"),0);

$coustena=mysql_result(mysql_query("SELECT COUNT(*) FROM `stena` WHERE `user_id`='$id_user'"),0);
$coupri=mysql_result(mysql_query("SELECT COUNT(*) FROM `post` WHERE `id_komu`='$id_user'"),0);
echo'<div class="p">
<img src="../design/default/act.gif" alt="-"> <a href="post.php">Личная почта</a> ['.$coupri;
if($newpo!=0){echo'/<font color="red">+'.$newpo.'</font>';} echo']';
$totgrg=mysql_result(mysql_query("SELECT COUNT(*) FROM `groups` WHERE `id_user`='$id_user'"),0);
$totgrd=mysql_result(mysql_query("SELECT COUNT(*) FROM `groups_user` WHERE `id_user`='$id_user'"),0);
$cougr=$totgrd+$totgrg;

echo'<div class="i" align="center">Личные настройки</div>
       [<a href="editanketa.php">Анкету</a>]
[<a href="menu.php?mod=3">Аватар</a>]
[<a href="menu.php?mod=4">Цвет ника</a>]
[<a href="password.php">Пароль</a>]
<div class="i" align="center">Раздел "Мои"</div>
<img src="../design/default/act.gif" alt="-"> <a href="photo.php">Мой фотоальбом</a> ['.$photou.']<br>
<img src="../design/default/act.gif" alt="-"> <a href="stena.php?yid='.$id_user.'">Стена сообщений</a> ['.$coustena.']<br>
<img src="../design/default/act.gif" alt="-"> <a href="/groups/user/'.$id_user.'/">Мои группы</a> ['.$cougr.']<br>
<img src="../design/default/act.gif" alt="-"> <a href="about.php?act=activ&id='.$id_user.'">Моя анкета</a></div>
<div class="p"><img src="../design/default/act.gif" alt="-"> <a href="exit.php">Выход</a> ['.nik_tri($id_user).']<br>
</div>';
break;
case'3':

echo'<div class="i">Смена аватара</div><div class="p"><img src="../design/default/act.gif" alt="-"> <a href="avators.php">Галерея 1</a><br><img src="../design/default/act.gif" alt="-"> <a href="avators2.php">Галерея 2</a>
';
echo'</div><div class="p"><img src="../design/default/act.gif" alt="-"> <a href="menu.php">В меню</a><br></div>';

break;
case'4': echo'<form action="menu.php?mod=5" method="post">Выберите цвет ника:<br><select name="color" class="form"><option value="">Стандартный</option><option value="red">Красный</option><option value="green">Зеленый</option>
<option value="gray">Серый</option><option value="blue">Синий</option><option value="black">Черный</option><option value="yellow">Желтый</option><option value="maroon">Бордовый</option><option value="gold">Золотой</option>
<option value="orange">Оранжевый</option><option value="pink">Розовый</option></select>'; echo'<br><input type="submit" class="but" value="Выбрать"/></form>'; break;
case'5': $color=prov($_POST['color']); mysql_query("UPDATE `users` SET `colornik`='$color' WHERE `id_user`='$id_user'"); echo'Цвет ника,успешно изменен<div class="p"><img src="../design/default/act.gif" alt="-"> <a href="menu.php">
В меню</a><br></div>';
break;
}
}else{
echo'<div class="p">Ошибка! Вы не авторизованы!<br></div>';
}
require"../system/foot.php";
?>