Файл: sys/style.php
Строк: 204
<?
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('text','<div class="text">');
define('div','</div>');
}else{
define('copyr','');
define('citata','');
define('footer','');
define('hdrs','');
define('gb','');
define('gbinroom','');
define('links','');
define('menu','');
define('text','');
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 '<script language="JavaScript" src="/snow.js" type="text/javascript"></script><?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="profiwm.ru" />
<Meta name="author" Content="-=DEN=- aka PITBULL">
<Meta name="Reply-to" Content="mobilas91@mail.ru">
<Meta name="description" Content="Архив рабочих скриптов. Учебники, справочники, сервисы для wap мастера!">
<Meta name="keywords" Content="скрипты, рабочие, скачать бесплатно, учебники, справочники, сервисы, форум, PHP коды, Скрипты Пользователей">';
echo '<link rel="stylesheet" type="text/css" href="/style/'.$them.'.css"/>
';
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>';
echo '<div class="hdrs"><spam class="sp">'.$fs1.$head.$fs2.'<div class="main" align="'.$align.'"></div></spam></div>' ;
$b=DB::run()->query("SELECT * FROM `rekl` WHERE `gde`=?",array(2));
if($b->rowCount()!=0 and $_SERVER['PHP_SELF'] == '/index.php'){
echo'<div class="menu">Рекламма</div>';
echo'<div class="text">';
while($r=$b->fetch()){
echo'<img src="/img/rek.png" alt="*"><a href="http://'.$r['url'].'">'.text($r['name']).'</a><br>';
}
echo'</div>';
}
$rekla=DB::run()->query("SELECT * FROM `rekl` WHERE `gde`=?",array(1));
if($rekla->rowCount()!=0 and $_SERVER['PHP_SELF'] !=='/index.php'){
echo'<div class="menu">Рекламма</div>';}
if($rekla->rowCount()!=0){
echo'<div class="text">';
while($rek=$rekla->fetch()){
echo'<img src="/img/rek.png" alt="*"><a href="http://'.$rek['url'].'">'.text($rek['name']).'</a><br>';
}
echo'</div>';
}
if (isset($user)){
$pr_j = DB::run()->querySingle("select count(*) as num from forum_spam where `readin` = ? ",array(0));
if ($pr_j>0 and $user['level']>6) echo menu.'<img src="/img/new.gif" alt="*"/> <b><a href="/admin/jalob">Спам('.$pr_j.')</a></b>'.div;}
if (isset($user)){
$lenta =DB::run()->querySingle("select count(*) as num from lenta where to_id = ? and `readin` = ?",array($user['id'],0));
if ($lenta>0 ) echo menu.'<img src="/img/new.gif" alt="*"/> <b><a href="/my/lenta">Лента('.$lenta.')</a></b>'.div;
}
if (isset($user)){
$odobr = DB::run()->querySingle("select count(*) as num from users where odobr=?",array(1));
if ($odobr>0 and $user['level']>6) echo menu.' <b><a href="/admin/users?mod=access">Одобрить регистрацию('.$odobr.')</a></b>'.div;
}
if (isset($user)){
$pr_n = DB::run()->querySingle("select count(*) as num from privat where to_id = ? and `readin` = ?",array($user['id'],0));
if ($pr_n>0)echo menu.'<img src="/img/new.gif" alt="*"/> <b><a href="/my/mail">Приватное сообщение('.$pr_n.')</a></b>'.div;
}
}
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::run()->querySingle("select count(*) as num from privat where to_id = ? and `readin` = ?",array($user['id'],0));
if ($pr_n>0)echo menu.'<img src="/img/new.gif" alt="*"/> <b><a href="/my/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;
DB::run()->query("UPDATE `users` SET `location` = ?, `location_ref` = ? WHERE `id` = ?",array($title,$_SERVER[PHP_SELF],$user['id']));
$pagesize=round((ob_get_length())/1024,1);
if (isset($user))DB::run()->query ("Update users set alltraf=?, lasttraf=? where id=?",array(($user["alltraf"]+$pagesize),$pagesize,$user['id']));
echo copyr.'<br><spam class="sp">ген['.$debag->endTimer().' сек]<br> Oнлайн:['.DB::run()->querySingle('SELECT COUNT(*) FROM `who`').']</spam>'.div;
echo $fs2;
if ($ver!='wml')echo '</div></body></html>';
else echo '</p></card></wml>';
exit;
ob_end_flush();
}
?>