Просмотр файла themes/xhtml/index.php

Размер файла: 2.53Kb
<?php

function htmltoxhtml($skinxhtml) {
$skinxhtml = str_replace('<img src="'.BASEDIR.'images/img/act1.gif','<img src="'.BASEDIR.'themes/xhtml/act1.gif',$skinxhtml);
$skinxhtml = str_replace('<img src="'.BASEDIR.'images/img/act2.gif','<img src="'.BASEDIR.'themes/xhtml/act2.gif',$skinxhtml);
$skinxhtml = str_replace('<img src="'.BASEDIR.'images/img/act3.gif','<img src="'.BASEDIR.'themes/xhtml/act3.gif',$skinxhtml);
$skinxhtml = str_replace('<br>','<br />',$skinxhtml);
$skinxhtml = str_replace('<hr>','<hr />',$skinxhtml);
$skinxhtml = str_replace('<div class=a','<div class="a"',$skinxhtml);
$skinxhtml = str_replace('<div class=b','<div class="b"',$skinxhtml);
$skinxhtml = str_replace('<div class=c','<div class="c"',$skinxhtml);
$skinxhtml = str_replace('alt="">','alt="image" />',$skinxhtml);
$skinxhtml = str_replace('checked>','checked="checked" />',$skinxhtml);
$skinxhtml = str_replace('selected>','selected="selected">',$skinxhtml);
$skinxhtml = preg_replace('#<div align="(.*?)">#si','<div style="text-align:\1">',$skinxhtml);
$skinxhtml = preg_replace('#<font color="(.*?)">#si','<span style="color:\1">', $skinxhtml);
$skinxhtml = str_replace('</font>','</span>',$skinxhtml);

return $skinxhtml; }
ob_start(htmltoxhtml);
if (strtok($_SERVER['HTTP_USER_AGENT'],'/')!="Mozilla") {
header("Content-type:application/vnd.wap.xhtml+xml; charset=utf-8");
}else{
header("Content-type:text/html; charset=utf-8");}
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link rel="stylesheet" href="'.$config_home.'/themes/xhtml/xhtml.css" type="text/css" />';
echo '<link rel="shortcut icon" href="'.$config['home'].'/favicon.ico" />';echo '<link rel="alternate" type="application/rss+xml" title="RSS News" href="'.$config['home'].'/news/rss.php" />';echo '<meta name="keywords" content="%KEYWORDS%" />';echo '<meta name="description" content="%DESCRIPTION%" />';echo '<meta name="generator" content="Wap-Motor '.MOTOR_VERSION.'" />';echo '<title>'.site_title($php_self).'</title>';
echo '<div class="a" id="up"><img src="'.$config['logotip'].'" alt="image" /><br />'.$config['logos'].' </div>';if ($config['rekhead']==1){include_once DATADIR."datamain/reklama_head.dat";}include_once (BASEDIR."includes/isset.php");
echo '<div>';
?>