Файл: system/web.php
Строк: 120
<?php
echo '<!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>
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="format-detection" content="telephone=no"/>
<link rel="shortcut icon" href="/design/style/favicon.png">
<link rel="stylesheet" href="/design/style/web.css" type="text/css" />
<title>'. $title .'</title>
</head>
<body>';
$IP = $_SERVER['REMOTE_ADDR'];
$browser = $_SERVER['HTTP_USER_AGENT'];
if (!isset($_SESSION['user_id'])) {
$time = time();
$w = mysql_query("SELECT * FROM `guests` WHERE `ip` = '$IP'");
if (mysql_num_rows($w) == 0) {
mysql_query("INSERT INTO `guests` ( `ip` , `browser` , `time`) VALUES ('$IP', '$browser', '". $time ."')");
} elseif (mysql_num_rows($w) > 0) {
mysql_query("UPDATE `guests` SET `browser` = '$browser', `time` = '". $time ."' WHERE `ip` = '$IP'");
}
} else {
mysql_query("UPDATE `users` SET `agent` = '". $browser ."', `IP` = '". $IP ."' WHERE `id` = '". $user['id'] ."' LIMIT 1");
}
echo '<div class="base">
<div class="page_fixer"></div>
<div class="leftbar">';
echo $_SERVER['PHP_SELF'] != 'index.php' ? '<a class="head logo" href="/">
<img src="/design/style/logo_image_NY.png" title="Spaces">
<img src="/design/style/logo_words_NY.png">
</a> ' : NULL;
if (!isset($user['id'])) {
echo '<a class="left_l" href="/pages/registration/?menu=login"><img src="/design/imgs/login.png" valign="middle"> Вход</a>
<a class="left_l" href="/pages/registration/?menu=registration"><img src="/design/imgs/register.png" valign="middle"> Регистрация</a>';
} else {
$notifications = mysql_result(mysql_query("SELECT COUNT(*) FROM `notifications` WHERE `user_id` = '". $user['id'] ."' AND `read` = '0'"), 0);
$mail = mysql_result(mysql_query("SELECT COUNT(*) FROM `mail_msg` WHERE `user_2` = '". $user['id'] ."' AND `chit` = '0'"), 0);
echo '<a class="left_l" href="/pages/users/user.php?name='. $user['login'] .'">
<table cellpadding="0" cellspacing="0">
<tr>
<td>';
avatar($user['id'], 'b');
echo ' </td>
<td>';
echo online($user['id']);
echo $user['login'];
echo user($user['id']);
echo '</td>
</tr>
</table>
</a>';
echo '<div class="left_r">Разделы сайта</div>
<a class="left_l" href="/pages/news/">Новости</a>
<a class="left_l" href="/pages/diaries/">Дневники</a>
<a class="left_l" href="/pages/mchat/">Мини-чат</a>
<a class="left_l" href="/pages/user.files/?menu=all">Зона обмена</a>
<a class="left_l" href="/pages/forum/">Форум</a>
<a class="left_l" href="/pages/users/">Пользователи</a>
<div class="left_r">Настройка</div>';
if ($user['position'] == 'admin') echo '<a class="left_l" href="/pages/panel/">Админ-панель</a>';
echo '<a class="left_l" href="/pages/personal/?menu=settings">Настройки</a>
<a class="left_l" href="/pages/help.php">Помощь</a>
<a class="left_l" href="/?logout">Выход</a>';
}
echo '</div>
<div class="rightbar">';
if (!isset($user['id'])) {
echo '<table style="width:100%" cellspacing="0" cellpadding="0"><tbody><tr>
<td style="text-align: center;width:50%;">
<a class="link" href="/pages/registration/?menu=login" title="Вход">Вход</a>
</td>
<td style="text-align: center;width:50%;">
<a class="link" href="/pages/registration/" title="Регистрация">Регистрация</a>
</td>
</tr></tbody></table>';
} else {
echo '<table style="width:100%" cellspacing="0" cellpadding="0"><tbody><tr>
<td style="vertical-align:top;width:19%;border-right:none !important;">
<a class="head" href="/pages/personal/" title="Личный кабинет">
<img class="icon" src="/design/imgs/profile_man_b.png" alt="Личный кабинет">
</a>
</td>
<td style="vertical-align:top;width:20%;">
<a class="head" href="/pages/mail/" title="Почта">
<img class="icon" src="/design/imgs/qlt_mailn_b.png" alt="Почта">
'. ($mail > 0 ? '<span style="color:#FFFF00">'. $mail .'</span>' : NULL) .'
</a>
</td>
<td style="vertical-align:top;width:19%;">
<a class="head" href="/pages/notifications/" title="Журнал">
<img class="icon" src="/design/imgs/qlt_journaln_b.png" alt="Жур">
'. ($notifications > 0 ? '<span style="color:#FFFF00">'. $notifications .'</span>' : NULL) .'
</a>
</td>
<td style="vertical-align:top;width:21%;">
<a class="head" href="/pages/help.php" title="Помощь">
<img class="icon" src="/design/imgs/qlt_lenta2n_b.png" alt="Помощь">
</a>
</td>
</tr></tbody></table>';
}
$count = mysql_result(mysql_query("SELECT COUNT(*) FROM `rekl` WHERE `pos` = 'head' AND `time` > '". time() ."'"), 0);
if ($count != 0) {
echo '<div class="rekl">';
$q = mysql_query("SELECT * FROM `rekl` WHERE `pos` = 'head' AND `time` > '". time() ."' ORDER BY `id` ASC");
while ($rekl_h = mysql_fetch_assoc($q)) {
echo '<a href="http://'. $rekl_h['url'] .'">'. $rekl_h['name'] .'</a><br>';
}
echo '</div>';
}
if (isset($user) && $user['activation'] != 1 && $user['email'] != NULL && $_SERVER['PHP_SELF'] != '/pages/registration/index.php') {
echo '<div class="err">Ваш E-mail не подтверждён!<br>
Мы выслали Вам письмо с ссылкой для подвержедния, на E-mail который вы указали. Проверьте почту!</div>';
}
?>