Файл: vzabave/sys/style.php
Строк: 190
<?
header('Cache-Control: no-store, no-cache, must-revalidate');
// Определение версии
if (isset($_GET['ver']))$_SESSION['ver'] = check($_GET['ver']);
if (isset($user))$ver = check($user['ver']);
else if (isset($_SESSION['ver'])) $ver = check($_SESSION['ver']);
else $ver = check($_GET['ver']);
if (empty($ver)) $ver = 'xhtml';
// Шрифт :)
if($user['fsize'] == 'small') {$fs1 = '<small>';$fs2 = '</small>';}
else if($user['fsize'] == 'big') {$fs1 = '<big>';$fs2 = '</big>';}
else {$fs1 = '';$fs2 = '';}
// Стиль
if (isset($user['style'])) $them = $user['style'];
else if (isset($set['style'])) $them = $set['style'];
else $them = 'go-wap';
ob_start();
// Основные дивы, для удобства :)
if ($ver!='wml'){
define('hdrs','<div class="hdrs">');
define('gb','<div class="gb">');
define('gbinroom','<div class="gbinroom">');
define('links','<div class="links">');
define('menu','<div class="menu">');
define('footer','<div class="footer">');
define('citata','<div class="citata">');
define('copyr','<div class="copy">');
define('div','</div>');
}else{
define('copyr','');
define('citata','');
define('footer','');
define('hdrs','');
define('gb','');
define('gbinroom','');
define('links','');
define('menu','');
define('div','<br />');
}
// Собственно верх
function head ()
{
global $db,$them, $title, $set, $align, $ver, $user, $_GET, $head, $fs1, $fs2;
if (empty($head)) $head = $title;
$title = $set['name'].''.$title;
if ($ver!='wml'){
// Если стиль не WEB
if (!isset($user)||$them != 'WEB'){
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Content-type:text/html; charset=utf-8");
echo '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">
<head><meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>
<link rel="shortcut icon" href="/favicon.ico" />
<meta name="yandex-verification" content="7e87ea897bf77e7e" />
<meta name="copyright" content="VZABAVE.RU" />
<Meta name="author" Content="-=KOT=-">
<Meta name="Reply-to" Content="chatrik@mail.ru">
<Meta name="description" Content="Социальная сеть Забава">
<Meta name="keywords" Content=" Создать блог,анкету,фото,видео,клубы по интересам,общение">';
echo '<link rel="stylesheet" type="text/css" href="/style/'.$them.'.css"/>
<title>'.$title.'</title>';
if (isset($user)){
if (isset($_GET['rm']) && $_GET['rm'] != ''){
$rm = intval($_GET['rm']);
if ($user['avr']==0){ echo "<meta http-equiv="Pragma" content="no-cache"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>";
}else{ echo "<META HTTP-EQUIV="Refresh" CONTENT="".$user['avr']."; URL=".H."room?rm=$rm&".SID."">";}
}else{
echo '<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>';
}
}else{
echo '<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>';
}
echo '</head><body>';
if (isset($user)){
$pr_n = $db->sql_fetchfield($db->sql_query("select count(*) as num from privat where to_id = '".$user['id']."' and `readin` = '0'"),0);
if ($pr_n>0)echo menu.'<img src="/img/new.gif" alt="*"/> <b><a href="/cabinet/privat?mod=in">Приватное сообщение('.$pr_n.')</a></b>'.div;
}
if (isset($user)){echo '<div class="hdrs"><table style="width: 100%;"><tr><td>';
echo '<div class="logohead">
<a href="/"><img src="../style/images/logo2.png" alt="*" /></a></div>' .$fs1. '</td><td><center>' .$head. '</center></td><td>' .$fs2.'</td></tr></table></div><div class="main" align="'.$align.'">';
echo '<div class="logohead">';
#######################################
}else{ echo '<div class="hdrs"><table style="width: 100%;"><tr><td>';
echo '<div class="logohead">
<a href="/"><img src="../style/images/logo22.png" alt="*" /></a></div>' .$fs1. '</td><td><center>' .$head. '</center></td><td>' .$fs2.'</td></tr></table></div><div class="main" align="'.$align.'">';
echo '<div class="logohead">';}
#######################################
}else{
require_once'web.php'; // Подключаем верх WEB стиля
}
echo $fs1;
}else{
header("Content-type: text/vnd.wap.wml; charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"><wml>';
if (isset($user)){
$pr_n = $db->sql_fetchfield($db->sql_query("select count(*) as num from privat where to_id = '".$user['id']."' and `readin` = '0'"),0);
if ($pr_n>0)echo menu.'<img src="/img/new.gif" alt="*"/> <b><a href="/cabinet/privat?mod=in">Приватное сообщение('.$pr_n.')</a></b>'.div;
}
echo "<card id="chat" title="".$title."">";
echo "<p align="".$align."">";
echo $fs1;
}
}
// Низ
function foot()
{
global $db,$them,$title,$set,$align,$ver,$user,$_GET,$Content_Encoding,$theme,$ip,$ua,$starttime,$pagesize,$fs2,$copy,$copir,$debag;
$pagesize=round((ob_get_length())/1024,1);
if (isset($user))$db->sql_query ("Update users set alltraf='".($user["alltraf"]+$pagesize)."', lasttraf='".$pagesize."' where id='".$user['id']."'");
// Подключаем низ WEB стиля
if (isset($user) && $ver!='wml' && $them == 'WEB')
{
require_once'webf.php';
echo $fs2;
if ($ver!='wml')echo '</div></body></html>';
else echo '</p></card></wml>';
}else{
if (isset($user))echo '<form action="'.H.'nav.php" method="post">
<div><select name="adres" style="font-size:x-small">
<option selected="selected">Куда идем?</option>
<option value="who">Кто-где</option>
<option value="chat">Чат</option>
<option value="forum">форум</option>
<option value="fo">Обменник</option>
</select><input type="submit" value="Go!" style="font-size:x- small"/>
</div></form>';
if(!isset($_SESSION['counton']) || $_SESSION['counton']==""){$_SESSION['counton']=0;}
$_SESSION['counton']++;
$counton=$_SESSION['counton'];
echo copyr.'['.$pagesize.' Кб|'.$debag->endTimer().' сек| Перех: '.$counton.']'.div;
echo copyr.'(c)vzabave.ru 2о12г'.div;
echo $fs2;
if ($ver!='wml')echo '</div></body></html>';
else echo '</p></card></wml>';
}
exit;
ob_end_flush();
}
?>