Просмотр файла header.php

Размер файла: 4.05Kb
<?
include ("func/gzip.php");
header("Content-type: text/html; charset=utf-8");
header("Cache-Control: no-cache");
$agent2=$HTTP_ACCEPT;
$agent3=$HTTP_USER_AGENT;
//
function consumer3($agent3)
{
if (ereg("^Mozilla.*",$agent3)) return "oslik";
}
//
$ie=consumer3($agent3);
if (ereg("application\/vnd.wap.xhtml\+xml",$agent2)){
$c_type = "application/vnd.wap.xhtml+xml";
} elseif (ereg("application\/xhtml\+xml",$agent2)) {
$c_type = "application/xhtml+xml";
} elseif (ereg("text\/html",$agent2)) {
$c_type = "text/html";
}else{
$c_type = "text/vnd.wap.wml";
}
if ($ie=="oslik") {
$c_type = "text/html";
}
if ($t=="wml") {
$c_type = "text/vnd.wap.wml";
}
if ($t=="html") {
$c_type = "application/xhtml+xml";
}
//
if (empty($_SESSION['wap'])) {
if ($c_type=="text/vnd.wap.wml")
{
$_SESSION['wap']="wml";
}
else
{
$_SESSION['wap']="xml";
}
}
if (!empty($_GET['wap'])) { $_SESSION['wap']=$_GET['wap']; }
if ($_SESSION['wap']=="xml")
{
echo '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head><title>'.$title.'</title>
<style type="text/css">
body{
font-weight: normal; font-size: small;
color: #e8e8e2;
margin: 0px;
font-family: Verdana;
background-color: #666666;}
a{text-decoration: none;}
a:link {color:#fff;}
a:visited{color:#fff;text-decoration: none;}
a:hover{color:#ffa000; text-decoration: none;}
b{font-weight: bold; }
small{font-size: 9px;}
.b{font-weight: bold; }
.small{font-size: 9px;}
form {margin: 0px 0px 0px 0px;}
ul{margin: 0px 0px 0px 5px;
padding: 2px;
}hr{
color: #ffffff;
background:none;
border:none;
border-bottom: 1px solid #888888;
}li{
margin-bottom: 5px;
}.header{
margin: 0px;
background-color: #606060;
font-size: 10px;
font-family: Verdana;
border-top: 3px solid #808080;
border-bottom: 4px solid #505050;
padding: 2px 5px 5px 2px;
}.title{
margin: 0px;
background-color: #ffa020;
font-size: 10px;
font-family: Garamond;
color: #000;
border: 1px solid #000;
padding: 1px 1px 1px 2px;
}.header_rek{
margin: 0px;
background-color: #663300;
font-size: 10px;
font-family: vernada;
border-top: 0px solid #fff;
border-bottom: 0px solid #fff;
border-left: 0px solid #fff;
border-right: 0px solid #fff;
padding: 3px 1px 3px 4px;
}.end{
margin: 0px;
background-color: #663300;
font-size: 10px;
font-family: Lucida Sans Unicode;
text-align: center;
border-top: 5px solid #808080;
border-bottom: 6px solid #505050;
padding: 1px 3px 3px 1px;
}.contur{
margin: 0px 0px 3px 0px;
border-top: 1px solid #ffffff;
border-bottom: 1px solid #000;
border-left: 1px solid #000;
border-right: 1px solid #000;
}.contur_t{
margin: 0px 0px 3px 0px;
padding: 1px 3px px 3px;
}.contur_rek{
margin: 0px 0px 3px 0px;
border: 1px solid #fff;
}h1{
font-size: 10px;
font-weight: bold;
font-family: Garamond;
color: #000;
margin: 0px 0px 0px 1px;
}.do_button{
color: #663300;
background-color: #e2e2e2;
font-size: 12px;
font-family: Sans-serif;
border-top: 1px solid #ffffff;
border-bottom: 1px solid #000;
border-left: 1px solid #000;
border-right: 1px solid #000;
}.button{
color: #fff;
background-color: #663300;
font-size: 10px;
font-family: Sans-serif;
border-top: 1px solid #fff;
border-bottom: 1px solid #000;
border-left: 1px solid #fff;
border-right: 1px solid #000;
}.count{
color: #ffc000;
background-color: #404040;
font-size: 10px;
margin: 1px;
padding: 1px;
font-family: Sans-serif;
border-top: 1px solid #fff;
border-left: 1px solid #fff;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;}
.grid td {border:1px solid #4b9dcd;text-align:center;}
</style>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
';
print '<div class="contur"><div class="header"><div class="count"><center>';
print $title;
print '</center></div></div></div>';
include ("func/tags.php");
}
else
{
header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Cache-Control: no-cache");
echo '<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="main" title="'.$title.'"><p align="left"><small>';
}
include ("func/ini.php");
?>