Файл: system/head.php
Строк: 75
<?php
error_reporting (E_ALL);
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>
<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/style.css" type="text/css" />
<title>'. $title .'</title>
</head>
<body>';
// if ($_SERVER['PHP_SELF'] != '/index.php') {
// echo '<center><a href="/" title="На главную"><img src="/design/style/logo.png"></a></center>';
// } else {
// echo '<center><img src="/design/style/logo.png"></center>';
// }
if (!isset($_SESSION['user_id'])) {
echo '<div class="background">';
echo '<div class="header">
<div class="btn"><a class="btn thome" href="/"><i></i></a></div>
<div class="btn"><a class="btn center" href="/reg.php">Регистрация</a></div>
</div>';
} else {
$IP = $_SERVER['REMOTE_ADDR'];
$browser = $_SERVER['HTTP_USER_AGENT'];
mysql_query("UPDATE `users` SET `agent` = '". $browser ."', `IP` = '". $IP ."' WHERE `id` = '". $user['id'] ."' LIMIT 1");
$mail = mysql_result(mysql_query("SELECT COUNT(*) FROM `mail_msg` WHERE `user_2` = '". $user['id'] ."' AND `chit` = '0'"), 0);
if ($mail > 0) {
$inM = $mail;
}else{
$inM = '';
}
echo '<div class="background">';
if ($_SERVER['PHP_SELF'] != '/index.php') {
echo '<div class="header">';
if ($mail > 0) {
echo '<div class="btn"><a class="btn tinbox" href="/pages/mail"><i></i>'.$mail.'</a></div>';
}else{
echo '<div class="btn"><a class="btn tmail" href="/pages/mail"><i></i></a></div>';
}
echo '<div class="btn"><a class="btn tanketa" href="/pages/users/user.php?name='.$user['login'].'"><i></i></a></div>
<div class="btn"><a class="btn center" href="/">На главную</a></div>
</div>';
} else {
echo '<div class="header">
<div class="btn"><a class="btn thome" href="#"><i></i></a></div>
<div class="btn"><a class="btn tanketa" href="/pages/users/user.php?name='.$user['login'].'"><i></i></a></div>
<div class="btn"><a class="btn center" href="/pages/mail/">Сообщения '.$inM.'</a></div>
</div>';
}
}
$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>';
}
?>