<?php
class diz{
static public function head($title){
global $_SERVER;
global $user;
if(!file_exists($_SERVER['DOCUMENT_ROOT'].'/design/'.dbde($user['style']).'/style.css')){$Ustyle='default';}else{$Ustyle=dbde($user['style']);}
//header("Content-type: application/vnd.wap.xhtml+xml");
//header("Content-type: application/xhtml+xml");
header("Content-type: text/html");
echo '<?
xml version="1.0" encoding="utf-8"?>';
?><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/%xhtml-mobile10.dtd">
<html xml ns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<meta name="viewport" content="width=device-width">
<title><?php echo $_SERVER['HTTP_HOST']?><?php echo ' | ';?><?echo $title;?></title>
<link rel="shortcut icon" href="/style/favicon.ico" />
<link rel="stylesheet" href="/design/<?php echo $Ustyle;?>/style.css" type="text/css" />
</head>
<body> <?php
//Шапка сайта
if($_SERVER['SCRIPT_NAME']!='/mgr/index.php'){echo '<div class=head><img src="/design/'.$Ustyle.'/logo.png"/></div>';}echo'<div class=title>'.$title.'</div>';
}
static public function foot(){
global $user;
if(!file_exists($_SERVER['DOCUMENT_ROOT'].'/design/'.dbde($user['style']).'/style.css')){$Ustyle='default';}else{$Ustyle=dbde($user['style']);}
global $_SERVER;
$urlf=$_SERVER['SCRIPT_NAME'];
global $TGS;
if($urlf!='/index.php' and $urlf!='/'){echo '<div class=link><a href="/">На главную</a></div>';}
echo'
<div class="ft"><img src="/design/'.$Ustyle.'/ft.png"/></div>';
if($user['admin']=='2'){echo'<center>'. round(microtime(1)-$TGS,4).'sec.</center>';}
}
}
?>