Вход Регистрация
Файл: region_clean/cabinet.php
Строк: 273
<?
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################

require_once "start.php";
require_once 
"sid.php";

header("Cache-Control: no-cache");
if (
$ver == "wml"header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else 
header("Content-Type:text/html; charset=UTF-8");

require_once 
"inc.php";
$link connect_db();
list(
$row$id$ps$fsize1$fsize2) = check_login($link);
require_once 
"version.php";

if (isset(
$rm)) $takep2="&amp;rm=$rm&amp;ref=$ref";
else 
$takep2="&amp;ref=$ref";
if (isset(
$rm) and !ctype_digit($rm)) { header('Location: index.php?isset=403'); }
if (
$rm == 10$takep="&amp;pwd=$pwd&amp;ref=$ref";
elseif (!empty(
$mod) and $mod == "privat"$takep="&amp;mod=$mod&amp;ref=$ref";
else 
$takep="&amp;ref=$ref";

if (
$ver == "wml") {
echo 
$xml;
echo 
$dtd;
echo 
"<wml>
      <card id="
cabinet" title="Личный кабинет">
      <p>"
;
} else {
echo 
"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
<html xmlns="http://www.w3.org/1999/xhtml">
      <
head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
      <
title>Личный кабинет</title>
      <
meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
      <
div align="center">n";
}

if (isset(
$_GET['pwd']) && !is_numeric($_GET['pwd']))
{
header('Location: index.php?isset=403');
}

$go = isset($_GET['go']) ? $_GET['go'] : NULL;

switch(
$go) {
default:

$times = getmicrotime();
mysql_query("
Update users set onl='".$times."'room='cabinet' where id ='$id'");

echo 
$fsize1;
echo '<div class = "
c4"><b>Мой кабинет</b></div><br/>';

$filex = file("konkurs/adminlist.dat");
$countx = count($filex);
$switchx = 0;
$wordx = $row['id'];
for (
$ix = 0; $ix < $countx$ix++) {
if (trim(
$filex[$ix]) == $wordx) {
$switchx = 1;

}
if (
$switchx == 1)

echo '<a href="
konkurs/admin.php?'.$ses.$takep.'">Управление конкурсами</a><br/>'; 
}

$filex = file("elections/adminlist.dat");
$countx = count($filex);
$switchx = 0;
$wordx = $row['id'];
for (
$ix = 0; $ix < $countx$ix++) {
if (trim(
$filex[$ix]) == $wordx) {
$switchx = 1;
}
}
if (
$switchx == 1)

echo '<a href="
elections/admin.php?'.$ses.$takep.'">Управление выборами</a><br/>'; 
}

$filex = file("journal/editors.dat");
$countx = count($filex);
$switchx = 0;
$wordx = $row['id'];
for (
$ix = 0; $ix < $countx$ix++) {
if (trim(
$filex[$ix]) == $wordx) {
$switchx = 1;
}
}
if (
$switchx == 1)

echo '<a href="
journal/admin.php?'.$ses.$takep.'">Управление журналом</a><br/>';
}

$r = mysql_query ("select count(readd) as num from zapiski WHERE (idtowhom '$id') and (readd '0') and (ininc '1')");
$a = mysql_fetch_array($r);
$inb = $a['num'];
$r2 = mysql_query ("select count(klu4) as num from zapiski WHERE (idtowhom '$id') and (ininc '1')");
$a2 = mysql_fetch_array($r2);
$inball = $a2['num'];

echo 
$divide;

echo '<a href="
chatmail.php?'.$ses.$takep2.'">Моя почта</a> [' . $inb . '/' . $inball . ']<br/>
      <a href="
cabinet.php?go=foto&amp;'.$ses.$takep2.'"><b>Фото в Анкету</b></a><br/>
      <a href="
addfails.php?'.$ses.$takep2.'">Мои файлы</a><br/>
      <a href="
cabinet.php?go=avatars&amp;'.$ses.$takep2.'">Мой Личный аватар</a><br/>
      <a href="
cabinet.php?go=smiles&amp;'.$ses.$takep2.'">Мой Личный смайл</a><br/>';
echo 
$divide;
$rrr = mysql_fetch_row(mysql_query("SELECT count(`id`) FROM `albumWHERE `type`='r' AND `nick`='$id';"));
$cr = $rrr[0];
$rrrr = mysql_fetch_row(mysql_query("SELECT count(`id`) FROM `albumWHERE `type`='f' AND `nick`='$id';"));
$crr = $rrrr[0];
echo '<a href="
album/index.php?action=myalbum&amp;'.$ses.$takep2.'">Мои фотоальбомы</a> [' . $cr . '/' . $crr . ']<br/>';

$result = mysql_query("SELECT count(`id`) FROM `presentWHERE `type`='s' AND `name`='$id';");
$cntData = mysql_fetch_row($result);
$count_users = $cntData[0];

echo '<a href="
present/index.php?'.$ses.'&amp;action=mypresent'.$takep2.'">Мои подарки</a> [' . $count_users . ']<br/>
      <a href="
nood.php?'.$ses.'&amp;mod=select'.$takep2.'">Моё настроение</a><br/>
      <a href="
emo.php?'.$ses.$takep2.'">Мои эмоции</a><br/>';
echo 
$divide;
echo '<a href="
anket.php?'.$ses.$takep2.'">Редактировать анкету</a><br/>
      <a href="
change.php?'.$ses.$takep2.'"><b>Меню настроек</b></a><br/>
      <a href="
xstatus.php?'.$ses.$takep2.'">Мой X-Статус</a><br/>
      <a href="
color.php?'.$ses.$takep2.'">Мой цвет ника</a><br/>
      <a href="
pers/index.php?'.$ses.$takep2.'">Мой персонаж</a><br/>';
if (
$ver == "xhtml") {
echo '<a href="
faq.php?'.$ses.'&amp;mod=skins&amp;ref='.$ref.'&amp;css='.$css.'">Моя тема</a><br/>';
}
echo 
$divide;
echo '<a href="
buttons.php?'.$ses.$takep2.'">Софт кнопки</a><br/>
      <a href="
bind.php?'.$ses.$takep2.'">Клавиши</a><br/>
      <a href="
trafik.php?'.$ses.$takep2.'">Мой траффик</a><br/>
      <a href="
time.php?'.$ses.$takep2.'">Дата, Время и т.д.</a><br/>';
echo 
$divide;
if (
$ver == "wml") {
echo '<a href="
calls.php?'.$ses.$takep2.'">Звонок из Wap</a><br/>';
}
echo '<a href="
mail.php?'.$ses.$takep2.'">Отправка e-mail</a><br/>
      <a href="
prezent.php?'.$ses.$takep2.'">Перевод постов</a><br/>
      <a href="
perevodkr.php?'.$ses.$takep2.'">Перевод кредитов</a><br/>
      <a href="
fl.php?'.$ses.'&amp;ref='.$ref.'">Флирт</a><br/>';
echo 
$divide;

$stlove = mysql_result(mysql_query("SELECT count(`id`) FROM `stlove`"), 0);

echo '<a href="
stlove.php?'.$ses.'&amp;ref='.$ref.'">Стена Любви</a> [' . $stlove . ']<br/>';

$r3 = mysql_query ("select count(id) as num from golos WHERE user '$id'");
$a3 = mysql_fetch_array($r3);
$golos = $a3['num'];
echo '<a href="
cabinet.php?go=golos&amp;'.$ses.$takep2.'">Голоса за фото</a> [' . $row['votefoto'] . '/' . $golos . ']<br/>';

$druz = mysql_num_rows(mysql_query("SELECT `id`,`usidFROM `friendsWHERE `id`='$id'"));
$myzaj = mysql_result(mysql_query("SELECT count(`zajavka`) FROM `friendsWHERE `whozajavka`!='' AND `usid`='$id'"), 0);

echo '<a href="
friends.php?'.$ses.$takep2.'">Мои контакты</a> [' . $druz . '/' . $myzaj . ']<br/>';

$kol_zak = mysql_num_rows(mysql_query("SELECT FROM `myzaklWHERE `idf`='$id' OR `ida`='$id' OR `idp`='$id' OR `idt`='$id'")); 
echo '<a href="
myzakl.php?'.$ses.$takep2.'">Мои закладки</a> [' . $kol_zak . ']<br/>';

$kol_ignor = mysql_num_rows(mysql_query("SELECT FROM `ignorWHERE `id`='$id'"));
echo '<a href="
ignor.php?'.$ses.$takep2.'">Игнор-лист</a> [' . $kol_ignor . ']<br/>';

$kol_gar = mysql_num_rows(mysql_query("SELECT FROM `garemWHERE `id`='$id'"));
echo '<a href="
garem.php?'.$ses.$takep2.'">Мой гарем</a> [' . $kol_gar . ']<br/>';

################################
if (!empty(
$row['city'])) {
$rcity = 10;
} if (!empty(
$row['name'])) {
$rname = 10;
} if (!empty(
$row['infa'])) {
$rinfa = 10;
} if (!empty(
$row['mail'])) {
$rmail = 5;
} if (!empty(
$row['icq'])) {
$ricq = 5;
} if (!empty(
$row['op'])) {
$rop = 5;
} if (!empty(
$row['mob'])) {
$rmob = 10;
} if (!empty(
$row['img'])) {
$rimg = 20;
} if (!empty(
$row['number'])) {
$rnumber = 10;
} if (!empty(
$row['inter'])) {
$rinter = 5;
} if (!empty(
$row['music'])) {
$rmusic = 5;
} if (!empty(
$row['films'])) {
$rfilms = 5;
} if (!empty(
$row['knig'])) {
$rknig = 5;
} if (!empty(
$row['shou'])) {
$rshou = 5;
} if (!empty(
$row['games'])) {
$rgames = 5;
} if (!empty(
$row['citat'])) {
$rcitat = 5;
} if (!empty(
$row['relig'])) {
$rrelig = 5;
} if (!empty(
$row['polit'])) {
$rpolit = 5;
} if (!empty(
$row['rost'])) {
$rrost = 5;
} if (!empty(
$row['ves'])) {
$rves = 5;
} if (!empty(
$row['family'])) {
$rfamily = 5;
} if (!empty(
$row['otch'])) {
$rotch = 5;
} if (!empty(
$row['vrpr'])) {
$rvrpr = 5;
} if (!empty(
$row['glaz'])) {
$rglaz = 5;
} if (!empty(
$row['sp'])) {
$rsp = 5;
} if (!empty(
$row['cel'])) {
$rcel = 5;
} if (!empty(
$row['ori'])) {
$rori = 5;
} if (!empty(
$row['grup'])) {
$rgrup = 5;
} if (!empty(
$row['stran'])) {
$rstran = 5;
} if (!empty(
$row['gorrab'])) {
$rgorrab = 5;
} if (!empty(
$row['mestrab'])) {
$rmestrab = 5;
} if (!empty(
$row['godna'])) {
$rgodna = 5;
} if (!empty(
$row['godko'])) {
$rgodko = 5;
} if (!empty(
$row['dolgrab'])) {
$rdolgrab = 5;
} if (!empty(
$row['stranobr'])) {
$rstranobr = 5;
} if (!empty(
$row['gorobr'])) {
$rgorobr = 5;
} if (!empty(
$row['shkobr'])) {
$rshkobr = 5;
} if (!empty(
$row['vuzobr'])) {
$rvuzobr = 5;
} if (!empty(
$row['ptuobr'])) {
$rptuobr = 5;
} if (!empty(
$row['stransl'])) {
$rstransl = 5;
} if (!empty(
$row['voich'])) {
$rvoich = 5;
} if (!empty(
$row['vk'])) {
$rvk = 5;
} if (!empty(
$row['alkog'])) {
$ralkog = 5;
} if (!empty(
$row['kuren'])) {
$rkuren = 5;
}

$raiting = $rcity + $rname + $rinfa + $rmail + $ricq + $rimg + $rop + $rmob + $rnumber + $rinter + $rmusic + $rfilms + $rknig + $rshou + $rgames + $rcitat + $rrelig + $rpolit + $rrost + $rves + $rfamily + $rotch + $rvrpr + $rglaz + $rsp + $rcel + $rori + $rgrup + $rstran + $rgorrab + $rmestrab + $rgodna + $rgodko + $rdolgrab + $rstranobr + $rgorobr + $rshkobr + $rvuzobr + $rptuobr + $rvoich + $rvk + $ralkog + $rkuren;
################################
$cena = mysql_fetch_array(mysql_query("SELECT `pop_colFROM `settingWHERE `klu4`='1'"));
$itog = $raiting + $row['pop'];
if (
$itog >= $cena['pop_col'])
{
echo '<b><a href="
pop_menu.php?'.$ses.'">Меню привилегий</a></b><br/>';
}

$invate = mysql_result(mysql_query("select count(id) as num from users WHERE invite '$id'"), 0);
echo '<a href="
invite.php?'.$ses.$takep2.'"><b>Мои рефералы</b></a> [' . $invate . ']<br/>';

$suicide = mysql_fetch_array(mysql_query("SELECT `suicidFROM `settingWHERE `klu4`='1'"));
$suicid = $suicide['suicid'];
if (
$row['level'] < 5 and $suicid == 1) {
echo 
$divide;
echo '<a href = "
suicid.php?'.$ses.'&amp;ref='.$ref.'"><b>Удалить мою анкету</b></a><br/>';
}
echo 
$divide;
break;

case 'inform':
echo 
$fsize1;
echo '<div align="
left"><div class="c4">Жизнь сайта</div><br/>';

echo '&#8226; <a href="
mm.php?'.$ses.'&amp;ref='.$ref.'">Мистер и Мисс</a><br/>';

$cmc = mysql_query ("select count(id) as num from vstrechi WHERE 1;");
$cmac = mysql_fetch_array($cmc);
$cmtot = $cmac['num'];

echo '&#8226; <a href="
vstrechi.php?'.$ses.'&amp;ref='.$ref.'">Встречи</a> (' . $cmtot . ')<br/>';

$result = mysql_query("SELECT count(`id`) FROM `journalWHERE `type`='a';");
$cntData = mysql_fetch_row($result);
$count_users = $cntData[0];

$dates = date("d.m.y");
$resultx = mysql_query("SELECT count(`id`) FROM `journalWHERE `new_date`='".$dates."';");
$cntDatax = mysql_fetch_row($resultx);
$count_usersx = $cntDatax[0];

if (
$count_usersx == 0) 
{
echo '&#8226; <a href="
journal/index.php?'.$ses.'&amp;ref='.$ref.'">Журнал</a> (' . $count_users . ')<br/>';
}
if (
$count_usersx != 0) 
{
echo '&#8226; <a href="
journal/index.php?'.$ses.'&amp;ref='.$ref.'">Журнал</a> (' . $count_users . '/+' . $count_usersx . ')<br/>'; 
}

$filexxx = file("datakonkurslist/list.lst");
$countxxx = count($filexxx);
echo '&#8226; <a href="
konkurs/index.php?'.$ses.'&amp;ref='.$ref.'">Конкурсы</a> (' . $countxxx . ')<br/>';

$filexxx = file("dataelections/list.lst");
$countxxx = count($filexxx);
echo '&#8226; <a href="
elections/index.php?'.$ses.'&amp;ref='.$ref.'">Выборы</a> (' . $countxxx . ')<br/>';

$d = date("d-m-");
$birth = mysql_fetch_array(mysql_query ("Select count(idfrom users where birth LIKE '%$d%'"));
if (
$birth[0] > 0) 
echo '&#8226; <a href="
statistik.php?'.$ses.'&amp;ref='.$ref.'&amp;mod=birthday">Именинники</a> (' . $birth[0] . ')<br/>';

$svadbi = mysql_fetch_array(mysql_query ("select count(id) as num from svadbi"));

if (
$svadbi[0] > 0) 
echo '&#8226; <a href="
svadbi.php?'.$ses.'&amp;ref='.$ref.'">Свадьбы</a> (' . $svadbi[0] . ')<br/>';

$gallery = mysql_query ("select count(id) as num from present where type='p'");
$foto = mysql_fetch_array($gallery);
$kolfoto = $foto['num'];

$count_icq = mysql_result(mysql_query("SELECT count(`uin`) FROM `icq`"),0);
$count_site = mysql_result(mysql_query("SELECT count(`referal`) FROM `usersWHERE `referal`!=''"),0);
echo '&#8226; <a href="
present/index.php?'.$ses.'&amp;ref='.$ref.'">Магазин подарков</a> (' . $kolfoto . ')<br/>
      &#8226; <a href="
mag.php?'.$ses.'&amp;ref='.$ref.'">Личный Магазин</a><br/>
      &#8226; <a href="
icq.php?'.$ses.'&amp;ref='.$ref.'">Магазин ICQ</a> ('.$count_icq.')<br/>
      &#8226; <a href="
bank.php?'.$ses.'&amp;ref='.$ref.'">Банк обмена</a><br/>
      &#8226; <a href="
pop_top.php?'.$ses.'&amp;ref='.$ref.'">ТОП-10 популярных</a><br/>
      &#8226; <a href="
arenda.php?'.$ses.'&amp;ref='.$ref.'">Аренда чата</a><br/>
      &#8226; <a href="
part.php?'.$ses.'&amp;ref='.$ref.'">Партнеры сайта</a> ('.$count_site.')<br/>
      &#8226; <a href="
smil/index.php?'.$ses.'&amp;ref='.$ref.'">Все смайлы</a><br/>
      &#8226; <a href="
faq.php?'.$ses.'&amp;ref='.$ref.'">Информация/FAQ</a><br/>
      &#8226; <a href="
statistik.php?'.$ses.'&amp;ref='.$ref.'">Статистика чата</a><br/>';

echo '<br/><a href="
enter.php?'.$ses.'&amp;ref='.$ref.'">← Назад</a></div>';
echo 
$fsize2;
break;

case 'foto':
echo 
$fsize1;
echo "
<div class='d1'><b>Фото</b></div>
      <
p align='left'>
      &
#8226; <a href="foto.php?$ses&amp;mod=photo$takep2">Загрузка фотки (WAP2.0)</a><br/>";
if ($row["img"] != '') echo "&#8226; <a href="cabinet.php?go=delfoto&amp;$ses$takep2">Удалить фото</a><br/>";
echo 
'</p>';
echo 
$fsize2;
break;

case 
'delfoto':
echo 
$fsize1;
$myfotos $row["img"];
$ras explode("."$myfotos);
$types $ras[1];
if (!
file_exists("photos/".$id.".".$types."")) {
echo 
'У тебя не установлено фото!<br/>';
} else {
if (!
ctype_digit($id)) { header("Location: index.php?isset=403"); die; }
if (
mysql_query ("Update users set img ='' where id ='$id';")) {
unlink ("photos/".$id.".".$types."");
echo 
'Твоё фото успешно удалено.<br/>';
} else {
echo 
'Ошибка удаления фото!<br/>';
}
}
echo 
$fsize2;
break;

case 
'smiles':
echo 
$fsize1;
echo 
"<div class='d1'><b>Личный смайл</b></div>
      <p align='left'>
      &#8226; <a href="
foto.php?$ses&amp;mod=smiles$takep2">Загрузить смайл (WAP2.0)</a><br/>
      &#8226; <a href="
select.php?$ses&amp;mod=smile$takep2">Выбрать из имеющихся</a><br/>";
if (
$row["mysmile"] != '') echo "&#8226; <a href="cabinet.php?go=delsmiles&amp;$ses$takep2">Удалить смайл</a><br/>";
echo 
'</p>';
echo 
$fsize2;
break;

case 
'delsmiles':
echo 
$fsize1;
$mysmile $row["mysmile"];
$ras explode("."$mysmile);
$types $ras[1];
if (!
file_exists("loadsmile/".$id.".".$types."")) {
echo 
'У тебя не установлен Личный смайл!<br/>';
} else {
if (!
ctype_digit($id)) { header("Location: index.php?isset=403"); die; }
if (
mysql_query ("Update users set mysmile ='' where id ='$id';")) {
unlink ("loadsmile/".$id.".".$types."");
echo 
'Твой смайл успешно удалён.<br/>';
} else {
echo 
'Ошибка удаления смайла!<br/>';
}
}
echo 
$fsize2;
break;

case 
'avatars':
echo 
$fsize1;
echo 
"<div class='d1'><b>Личный аватар</b></div>
           <p align='left'>
           &#8226; <a href="
foto.php?$ses&amp;mod=avatars$takep2">Загрузить аватар (WAP2.0)</a><br/>
           &#8226; <a href="
select.php?$ses&amp;mod=avatars$takep2">Выбрать из имеющихся</a><br/>";
if (
$row["myavatar"] != '') echo "&#8226; <a href="cabinet.php?go=delavatars&amp;$ses$takep2">Удалить аватар</a><br/>";
echo 
'</p>';
echo 
$fsize2;
break;

case 
'delavatars':
echo 
$fsize1;
$myavatar $row["myavatar"];
$ras=explode("."$myavatar);
$types=$ras[1];
if (!
file_exists("loadavatars/".$id.".".$types."")) {
echo 
'У тебя не установлен Личный аватар!<br/>';
} else {
if (!
ctype_digit($id)) { header("Location: index.php?isset=403"); die; }
if (
mysql_query ("Update users set myavatar ='' where id ='$id';")) {
unlink ("loadavatars/".$id.".".$types."");
echo 
'Твой аватар успешно удалён.<br/>';
} else {
echo 
'Ошибка удаления аватара!<br/>';
}
}
echo 
$fsize2;
break;

case 
'golos':
echo 
$fsize1;
echo 
'<div class="d1">Кто отдал голос за твоё фото:</div><br/>';
echo 
'<p align="left">';
echo 
$fsize2;
if (empty(
$page)) $page 0;
$query mysql_query("select * from golos where user='$id';");
$num_of_rows mysql_num_rows($query);
$total_mat_number $num_of_rows;
$max 10;
$total_pages ceil($total_mat_number/$max);
$page intval($page);
$max intval($max);
$print mysql_query("select * from golos where user='$id' order by who desc limit ".$page.",".($max).";");
$i $page;
while(
$arr mysql_fetch_assoc($print)) {
$usid $arr["who"];
$whogolos mysql_query("select user from users where id='$usid'");
$idatas mysql_fetch_array($whogolos);
$login $idatas["user"];
echo 
$fsize1;

$who_c mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='$usid'"));

echo (
$i++).") <a href="search.php?go=view&amp;$ses&amp;nick=$usid$takep2">".col_n($login)."</a> <b>".$who_c['colvote']."</b><br/>";
echo 
$fsize2;
}
if (
mysql_affected_rows() < 1) {
echo 
'Пока никто не отдал голос за твоё фото.<br/>';
}
echo 
$fsize1;
echo 
$fsize2;
for (
$num 0$num $total_pages$num++) {
$page_number $num $max;
echo 
$fsize1;
if (
$page_number != $page) {
echo 
"<a href="cabinet.php?go=golos&amp;$ses&amp;page=$page_number$takep2">".($num+1)."</a>|";
} else {
echo (
$num+1)."|";
}
echo 
$fsize2;
}
echo 
'</p>';
echo 
$fsize1;
echo 
"<div class = 'd1'><a href="galery.php?$ses$takep2">В галерею</a></div>";
echo 
$fsize2;
break;
}
echo 
$fsize1;

if (
$go) echo "<div class = 'd1'><a href="cabinet.php?$ses$takep2">Личный кабинет</a></div>n";
if (isset (
$rm)) echo "<a href="chat.php?$ses&amp;rm=$rm$takep">В чат</a><br/>n";
echo 
"<div class = 'd1'><a href="enter.php?$ses&amp;ref=$ref">Прихожая</a></div>n";
echo 
$fsize2;
include_once 
"foot.php";
?>
Онлайн: 0
Реклама