<?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">';
$config = mysql_fetch_assoc(mysql_query("SELECT * FROM `config` WHERE `id` = '1'"));
if(isset($user))
{
echo '<link rel="stylesheet"
href="/design/theme/'.$config
['style'].'/style.css" type="text/css"/>';
}

else
{
echo '<link rel="stylesheet" href="/design/theme/'.$config['style'].'/style.css" type="text/css" /> ';
}
echo ' <title>'. $title .'</title>
</head>
<body>';
$t = microtime(1);

if(!$user['id']) {
echo '<div class="p_t_v11"> 

<table style="width:100%" cellspacing="0" cellpadding="0"><tbody><tr><td style="vertical-align:top;width:25%;border-right:none !important;"> 

<a class="head"> <a  href="/login.php"><center> <img src="/01.png" alt="" /> <font color="#ffffff"> Авторизация</font></center></a></td> <td style="vertical-align:top;width:20%;">

<a class="head"> <a href="/registr.php"><center> <img src="/02.png" alt="" /> <font color="#ffffff"> Регистрация</font></center></a></td></tr></table></div>';
} else {

$len = mysql_result(mysql_query("SELECT COUNT(id) FROM `lenta` WHERE `komy` = '".$user['id']."' and `readlen` = '0'"),0);
$mes = mysql_result(mysql_query("SELECT COUNT(id) FROM `message` WHERE `komy` = '".$user['id']."' and `readlen` = '0'"),0);

echo '<div class="p_t_v11"><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="/user/cab.php"><center><img src="/images/up_panel/cab.png" alt="*"></center></a></td><td style="vertical-align:top;width:20%;"><a class="head" href="/mes"><center><img src="/images/up_panel/maill.png" alt="*"> '.$mes.' </center></a></td><td style="vertical-align:top;width:20%;"><a class="head" href="/lenta.php"><center><img src="/images/up_panel/lent.png" alt="*"> '.$len.' </center></a></td> <td style="vertical-align:top;width:20%;"><a class="head" href="/exit.php"><center><img src="/images/up_panel/exit.png" alt="*"></center></a></td></tr></table></div>';
echo '';
$rek = mysql_result(mysql_query("SELECT COUNT(id) FROM `ads` WHERE `time_srok` > '".time()."' "),0);
$sql_rek = mysql_query("SELECT * FROM `ads` WHERE `time_srok` > '".time()."' ORDER BY rand() ");

if($rek != 0) {


while($sql = mysql_fetch_assoc($sql_rek))
{
echo '<div class="menudiv"><a href="'.$sql['url'].'" class="k_menu"> '.$sql['name'].'</a></div>';
}
}
echo '';}

?>









