View file system/header.php

File size: 1.22Kb
<?php
// by mides, wmclub.mobi

$config['copy'] = $_SERVER['HTTP_HOST'];
header('Cache-control: no-cache');
if ($title) {
	$title_m = $title.' - '.$config['copy'];
} else {
	$title_m = $config['copy'];
}
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">
<head>
<link rel="shortcut icon" href="http://'.$config['copy'].'/favicon.ico"/>
<link rel="stylesheet" href="http://'.$config['copy'].'/inc/styles/default/style.css" type="text/css"/>
<title>'.$title_m.'</title>
</head>
<body>';

echo '<div class="tp">';
if ($u['id']) {
	echo '<b><a href="http://'.$config['copy'].'/main.php">'.$u['login'].'</a> | <a href="http://'.$config['copy'].'/main.php?act=exit">Выход</a></b>';
} else {
	echo '<b><a href="login.php">Вход</a></b> | <a href="reg.php">Регистрация</a>';
}
echo '</div>';

$ad_r = mysql_query("SELECT * FROM `ad` WHERE `type` = 1 ORDER BY `id`");
if (mysql_num_rows($ad_r)) {
	echo '<div class="s2">';
	while ($ad = mysql_fetch_assoc($ad_r)) {
		echo '<a href="'.$ad['link'].'">'.$ad['name'].'</a><br />';
	}
	echo '</div>';
}

?>