Файл: system/wap.php
Строк: 90
<?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/wap.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 '<a href="/" title="Главная">
<img src="/design/style/logo_min_NY.png">
</a>';
if (isset($user['id'])) echo '<a href="/?logout" style="float: right;">Выход</a>';
echo '<div class="base">';
if (!isset($user['id'])) {
echo '<table style="width:100%" cellspacing="0" cellpadding="0"><tbody><tr>
<td style="vertical-align:top;width:50%;">
<a class="head" href="/pages/registration/?menu=login" title="Вход"><span style="color:#FFF">Вход</span></a>
</td>
<td style="vertical-align:top;width:50%;">
<a class="head" href="/pages/registration/" title="Регистрация"><span style="color:#FFF">Регистрация</span></a>
</td>
</tr></tbody></table>';
} 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 '<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.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.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.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.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>';
}
/*
if (isset($user) && $user['time'] <= time()) echo '<div class="err">Ваше время истекло!</div>';
echo '<div class="err">У вас осталось: '. back($user['time']) .'</div>';*/
?>