Файл: sistem/head.php
Строк: 162
<?php # Created By Up
$tolower=strtolower($_SERVER['HTTP_USER_AGENT']);
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((strstr($tolower,'windows') or strstr($tolower,'linux') or strstr($tolower,'macintosh') or strstr($tolower,'unix') or strstr($tolower,'macos') or strstr($tolower,'bsd'))?'Content-type: text/html; charset=UTF-8':'Content-type: application/xhtml+xml; charset=UTF-8');
if($config['gzip']==2)
{
function _gz_GZip($q)
{
return gzencode($q,9);
}
function _gz_Deflate($q)
{
return gzdeflate($q,9);
}
$config['is_gz']!='Off';
if(isset($_SERVER['HTTP_ACCEPT_ENCODING']))
{
if(function_exists('gzencode') and stristr($_SERVER['HTTP_ACCEPT_ENCODING'],'deflate'))
$config['is_gz']='Deflate';
else
if(function_exists('gzdeflate') and stristr($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip'))
$config['is_gz']='GZip';
}
if($config['is_gz']!='Off')
{
Header('Content-Encoding: '.$config['is_gz']);
ob_start('_gz_'.$config['is_gz']);
}
}
ob_start();
// Шапка
print '<?xml version="1.0" encoding="utf-8"?>'."rn";
print '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile10.dtd">'."rn";
print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">'."rn";
print ' <head>'."rn";
print ' <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />'."rn";
print ' <meta name="copyright" content="Created by Up" />'."rn";
//print ' <meta name="author" content="Up" />'."rn";
//print ' <meta name="keywords" content="'.$config['keywords'].'" />'."rn";
print ' <meta name="description" content="'.$config['description'].'" />'."rn";
//print ' <meta name="subject" content="'.$config['keywords'].'" />'."rn";
//print ' <meta name="abstract" content="'.$config['description'].'" />'."rn";
print ' <link rel="stylesheet" href="'.$config['home'].'/style.css" type="text/css" />'."rn";
print ' <title>'.$config['name'].' - '.$config['TITLE'].'</title>'."rn";
print ' </head>'."rn";
print ' <body>'."rn";
if($config['head_isset']==1)
{
print '<div class="rekl">';
$_count=count($config['head_reklam']=explode('|',$config['head_reklam']));
$config['head_kol']=$config['head_kol']<=$_count?$config['head_kol']:$_count;
for($i=0; $i<$config['head_kol']; ++$i)
{
$_is=$config['head_type']==1?$i:array_rand($config['head_reklam']);
$_arr=explode('`',$config['head_reklam'][$_is]);
$_url=$_arr[0];
unset($_arr[0]);
print '<a href="'.$_url.'">'.$_arr[array_rand($_arr)].'</a><br />';
unset($config['head_reklam'][$_is]);
}
print '</div>';
}
// Название страници
print ' <div class="head">'."rn <b>".$config['TITLE'].'</b><br />'."rn".' </div>'."rn";
print ' <div class="menu">'."rn ";
print ($config['link']==1?'<b>Категории</b>':'<a href="'.$config['home'].'">Категории</a>').' | ';
print ($config['link']==2?'<b>Топ сайты</b>':'<a href="'.$config['home'].'/top/host_1.php">Топ сайты</a>').' | ';
print ($config['link']==3?'<b>Поиск</b>':'<a href="'.$config['home'].'/in/search.php">Поиск</a>');
print '<br />'."rn".' </div>'."rn";
// Открываем тег back тут, закрываем в ногах
print ' <div class="back">'."rnrn".' ';
unset($title,$tolower,$config['head_reklam']);
?>