Файл: user/head.php
Строк: 351
<?
$set['web']=true;
$spaces=true;
header("Content-type: text/html");
echo '<?xml version="1.0" encoding="utf-8"?>';
?><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<?if (isset($user)){?>
<div class="rega"><?
$p = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id`='$user[id]' LIMIT 1"));
$a = mysql_fetch_array(mysql_query("SELECT * FROM `gallery_foto` WHERE `id_user`='$user[id]' AND `avatar`='1' LIMIT 1"));
if (is_file(H."sys/gallery/50/$a[id].$a[ras]"))
echo "<img src='/foto/foto50/$a[id].$a[ras]' alt='$a[name]' style='margin-top:10px;' width='70' >";
else
echo "<img src='/style/icons/avatar.png' style='margin-top:10px;' width='70' >";
echo '<br/><a href="/info.php" >
Личная страничка
</a><br/><a href="/avatar.php" >
Загрузить фото
</a>
</div>';
}
?>
<div class="reg1a">
</div>
<title><?echo $set['title'];?></title>
<link rel="shortcut icon" href="/style/themes/<?echo $set['set_them'];?>/favicon.ico" />
<link rel="stylesheet" href="/style/themes/<?echo $set['set_them'];?>/style.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="/style/themes/<?echo $set['set_them'];?>/desktop_cache_r793p.css" />
<link rel="stylesheet" type="text/css" href="/style/themes/<?echo $set['set_them'];?>/2056298133_r793p.css" />
</head>
<body>
<?
if (isset($_SESSION['message'])){
echo "<div class='msg'>$_SESSION[message]</div>";
$_SESSION['message']=NULL;
}
$iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$android = strpos($_SERVER['HTTP_USER_AGENT'],"Android");
$palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS");
$berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
$ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod");
$mobile = strpos($_SERVER['HTTP_USER_AGENT'],"Mobile");
$symb = strpos($_SERVER['HTTP_USER_AGENT'],"Symbian");
$operam = strpos($_SERVER['HTTP_USER_AGENT'],"Opera M");
$htc = strpos($_SERVER['HTTP_USER_AGENT'],"HTC_");
$fennec = strpos($_SERVER['HTTP_USER_AGENT'],"Fennec/");
$winphone = strpos($_SERVER['HTTP_USER_AGENT'],"WindowsPhone");
$wp7 = strpos($_SERVER['HTTP_USER_AGENT'],"WP7");
$wp8 = strpos($_SERVER['HTTP_USER_AGENT'],"WP8");
if ($ipad || $iphone || $android || $palmpre || $ipod || $berry || $mobile || $symb || $operam || $htc || $fennec || $winphone || $wp7 || $wp8 === true) {
header('Location: http://upsa.us/?t=wap');
}
/*if(!isset($user)){ header("location: /?t=wap"); exit; } //Закрываем от гостей*/
?>
<script type="text/javascript" src="/style/themes/<?echo $set['set_them'];?>/scroll_page.js?r=793p"></script>
<div id="wrap_all">
<div id="main_shadow">
<div class="page_fixer"></div>
<div class="vert_line"></div>
<div class="vert_line2"></div>
<div id="left_nav_bg"></div>
<div id="sidebarOverlay" onclick="Sidebar.toggle(event);"></div>
<div id="sidebar_wrap">
<div id="left_nav">
<ul>
<div class="hhhh">
<a href="/" class="h-logo" id="main_logo_link"><img src="/style/themes/<?echo $set['set_them'];?>/logo_words.png" alt="" /></a>
<li class="left_nav_stat_item overfl_hid">
<form style='padding:0;' action="/obmen/search.php?go" method="post">
<a href="/obmen/search.php?go" class="left_nav_padding left_nav_search_input_ico" id="main_search_input_ico">
<span class="s_i s_i_search"></span>
</a>
<input type="hidden" name="sid" value="" />
<input type="hidden" name="CK" value="1" />
<input type="hidden" name="link_id" value="0" />
<!-- <input type="text" class="font_medium" style="width: 98%; margin: 0px; padding: 4px 0px; vertical-align: middle;line-height: 100%;border: 1px solid #ccc;" name="q" value="" />
-->
<span id="main_search_form" class="left_nav_padding">
<input type="text" placeholder="Поиск" class="left_nav_search_input medium" name="search" id="main_search_input" />
<input type="submit" class="main_search_input_submit" name="cfms" title="Найти" value="." />
</span>
</form>
</li>
<li class="sep_bl">
<?if (isset($user)){
?><li class="sep_bl"><?
/*$p = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id`='$user[id]' LIMIT 1"));
$a = mysql_fetch_array(mysql_query("SELECT * FROM `gallery_foto` WHERE `id_user`='$user[id]' AND `avatar`='1' LIMIT 1"));
if (is_file(H."sys/gallery/50/$a[id].$a[ras]"))
echo "<div class='mess'><img src='/foto/foto50/$a[id].$a[ras]' alt='$a[name]' style='margin-top:15px;' >";
else
echo "<img src='/style/icons/avatar.png' style='margin-top:-5px;' width='50' >";
echo '<a href="/info.php" >
Личная страничка
</a>
</div>';
*/
}else{
?><li class="sep_bl">
<li class="sep_bl bt0 s_title">
<span class="s_i s_i_titles"></span>
<b class="m">Быстрая регистрация</b>
</li>
<?
echo "<form class='mess' method='post' action='/reg.php?$passgen'>n";
echo "Придумайте ник,пример(Зайка,Zajka)<br /><input type='text' name='nick' maxlength='32' /><br />n";
echo "<input type='submit' value='Продолжить' />n";
echo "</form>";
}
if (user_access('adm_panel_show')) {
?><li class="sep_bl bt0 s_title">
<span class="s_i s_i_titles"></span>
<b class="m">Админ-центр</b>
</li>
<li class=" bt0 ">
<a href="/plugins/admin/spam/"> <img src="/style/icons/spam.gif">
<span class="m">Жалобы </span>
<?include_once H."/plugins/admin/spam/count.php";?>
</a>
</li>
<li>
<a href="/plugins/admin/chat/"> <img src="/style/icons/chat.gif"> <span class="m">Админ чат </span><?include_once H."/plugins/admin/chat/count.php";?></a>
</li>
<li><a href="/adm_panel/"><img src="/style/icons/settings.png"> <span class="m">Админка</span></a>
</li>
<?
}
echo '<li class="sep_bl bt0 s_title">
<span class="s_i s_i_titles"></span>
<b class="m">Разделы сайта</b>
</li>
';
$q_menu=mysql_query("SELECT * FROM `menu` ORDER BY `pos` ASC");
while ($post_menu = mysql_fetch_assoc($q_menu)) {
if (!isset($post_menu['icon']))mysql_query('ALTER TABLE `menu` ADD `icon` VARCHAR( 32 ) NULL DEFAULT NULL');
if (!isset($post_menu['type']))mysql_query("ALTER TABLE `menu` ADD `type` ENUM('link', 'razd') NOT NULL DEFAULT 'link' AFTER `id`");
echo "<li> <a href='$post_menu[url]'> <img src='/style/icons/$post_menu[icon]' alt='*'> <span class='m'>$post_menu[name] ";
if ($post_menu['counter']!=NULL && is_file(H.$post_menu['counter']))
include H.$post_menu['counter'];
echo "</a></li>";
}
?><div class='sosok'>
<div class='iamvip'>
<center><span class="ps"><br/>
<?
$k_lider = mysql_result(mysql_query("SELECT COUNT(*) FROM `liders` WHERE `time` > '$time'"),0); $liders = mysql_fetch_assoc(mysql_query("SELECT * FROM `liders` WHERE `time` > '$time' ORDER BY rand() LIMIT 1")); if ($k_lider > 0){ $lider = get_user($liders['id_user']); echo status($lider['id']); echo ' <a href="/info.php?id=' . $lider['id'] . '">' . $lider['nick'] . '</a> '; }
echo"</span></div><center><div class='pay_button'><a href='/user/liders/'><b>Хочу сюда</b></a></div></div></span></center>";
/*
if (isset($user)){
echo '<li class="sep_bl bt0 s_title">
<span class="s_i s_i_titles"></span>
<b class="m">Мои разделы</b>
</li>
<div class="info1">
<a href="/user/info/settings.php">
Общие настройки
</a>
</div>
<div class="info1">
<a href="/user/money/"> Дополнительные услуги</a>
</div>
<div class="info1"><a href="/plugins/rules/"> Помощь</a>
</div>
<div class="info1">
<a href="/exit.php"> Выход</a>
</div>
';
}else{
//echo '<li class="sep_bl bt0 s_title">
//<b class="m">Доступ ограничен</b>
//</li>
//<div class="info2"><b>
//После авторизации <br/>откроется весь сайт!<br/>Зарегистрируйтесь,<br/>или авторизируйтесь:)</b>
//</div>
//';
}*/
?>
</ul>
</div><!-- #left_nav -->
</div>
<div id="main_content_block">
<div class="content_wrap" id="content_wrap_move">
<div id="wrapper_for_header">
<div id="wrapper_for_header_fix">
<span style="display:none;"><img id="site_logo" src="http://spaces.ru/i/spaces.ru_logo_big.png" alt="" /></span>
<div id="navi" class=" many_events">
<div class="menu_wrap ">
<?
echo '<table style="width:100%" cellspacing="0" cellpadding="0"><tr>
<td style="vertical-align:top;width:19%;" id="home_link_td">';
if (isset($user)){
echo'
<a class="top_menu_link user_color_link h-menu_link" href="/umenu.php" title="Старт" id="home_link" onclick="Sidebar.toggle(event);">
<img class="icon" src="/style/themes/'.$set['set_them'].'/img/qlt_homen_b.png" alt="Старт"/>
</a>
</td>';
$k_new=mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail`
LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]'
WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` IS NULL OR `users_konts`.`type` = 'common' OR `users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0);
$k_notif = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_user` = '$user[id]' AND `read` = '0'"), 0); // Уведомления
$discuss = mysql_result(mysql_query("SELECT COUNT(`count`) FROM `discussions` WHERE `id_user` = '$user[id]' AND `count` > '0' "),0); // Обсуждения
$k_frend = mysql_result(mysql_query("SELECT COUNT(id) FROM `frends_new` WHERE `to` = '$user[id]'"), 0); // Друзья
echo '<td style="vertical-align:top;width:20%;">
<a class="top_menu_link user_color_link h-menu_link" href="/new_mess.php" title="Почта">
<img class="icon" src="/style/themes/'.$set['set_them'].'/img/qlt_mailn_b.png" alt="Почта"/>
';
if($k_new!=0)echo '<span class="newevent">'.$k_new.'</span>';
echo '</a>
</td>
<td style="vertical-align:top;width:19%;">
<a class="top_menu_link user_color_link h-menu_link" href="/user/notification" title="Уведомления">
<img class="icon" src="/style/themes/'.$set['set_them'].'/img/qlt_journaln_b.png" alt="Жур"/>';
if($k_notif!=0)echo '<span class="newevent">'.$k_notif.'</span>';
echo '</a></td>';
if ($lenta > 0)
{
$j2 = 'tape';
}
elseif ($discuss > 0)
{
$j2 = 'discussions';
}
else {
$j2 = 'discussions';
}
echo '<td style="vertical-align:top;width:21%;">
<a class="top_menu_link user_color_link h-menu_link" href="/user/'.$j2.'/" title="Обсуждения">
<img class="icon" src="/style/themes/'.$set['set_them'].'/img/qlt_lenta2n_b.png">';
$k_l = $lenta+$discuss;
if($k_l!=0)echo '<span class="newevent">'.$k_l.'</span>';
echo '
</a>
</td>
<td style="vertical-align:top;width:19%;border-right:none !important;">
<a class="top_menu_link user_color_link h-menu_link" href="/info.php" title="Профиль">
<img class="icon" src="/style/themes/'.$set['set_them'].'/img/profile_man_b.png" alt="Профиль" />
</a>
</td>';
if ($k_frend > 0)
{
echo '<td style="vertical-align:top;width:19%;border-right:none !important;">
<a class="top_menu_link user_color_link h-menu_link" href="/user/frends/new.php" title="Друзья">
<img class="icon" src="/style/panel/friends.png" alt="Друзья" />
<span class="newevent">'.$k_frend.'</span>
</a>
</td>';
}
}
echo '</tr></table>';
if (isset($user)){
}else{
?>
<center><div class="hhhh">
<form class='' method='post' action='/login.php'>
<input type='text' placeholder="Логин" class="left_nav_search_input medium" name='nick' maxlength='32' />
<input type='password' placeholder="Пароль" class="left_nav_search_input medium" name='pass' maxlength='32' />
<input type='submit' value='Войти' /></form><br/>
</div>
</center>
</td>
<?
}
echo '
</div>
</div>
</div>
</div>
<script type="text/javascript" src="/style/themes/'.$set['set_them'].'/Sidebar_PC.js?r=793p"></script>
<div class="main">
<div id="index_page">';
/* Накладка дива на форму */
function form($form){
return preg_replace("#<form #i", '<form class="iform" ', $form);
}
ob_start ("form");
?>