<?php
$rowi = mysql_fetch_array(mysql_query("SELECT * FROM `".$prefix."stat`"));
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<link rel="stylesheet" href="/style/style_t.css.css" type="text/css" />
<link rel="stylesheet" href="/style/web.css" type="text/css" />
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>ZipVap.Ru | '.$title.'</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
</head><body><div class="h"><div class="h1"><div class="h2_1 p0002" style="position:relative">
<a href="/"><img src="/images/logo.png" alt="ZipVap.Ru" /></a><div class="usmenu"><ul>';
if(!$user_data){
echo'<li><a href="/str/enter.php">вход</a></li>
<li><a href="/str/reg.php">регистрация</a></li>';
}else{
echo'<li><a href="/str/office.php">кабинет</a></li>';}

echo'<li><a href="/reklama.php">реклама</a></li></ul></div></div></div></div>
<div id="main"><div id="sidebar1"><div class="title">Категории</div><div class="m6660">';
$cats = mysql_query("SELECT * FROM `".$prefix."cat` ORDER BY `id`");
while($cat = mysql_fetch_array($cats)){
$count_sites = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait` WHERE `category` = '".$cat['id']."' AND `status` = '1' AND `hosts` > '0'"));
echo '<div class="category"><a href = "/str/cat.php?act=view&id='.$cat['id'].'">'.$cat['name'].' <div class="num">'.$count_sites.'</div></a></div>';}
$news = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."news`"));

echo'</div><div class="title">Дополнительно</div><div class="m6660">
<div class="category"><a href="/news/index.php">Обновления <div class="num">'.$news.'</div></a></div><div class="category">
<a href="/str/statistika.php">Глобальная статистика</a></div><div class="category">
<a href="/help/rules.php">Правила рейтинга</a></div><div class="category">
<a href="/search.php">Поиск площадки</a></div></div></div><div id="content">';

?>