File size: 1.74Kb
<?php
// by Mike O. (mides), coolcms.org
header('Cache-control: no-cache');
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="'.HTTPHOME.'/favicon.ico"/>
<link rel="stylesheet" href="'.HTTPHOME.'/styles/'.$config['style'].'/style.css" type="text/css"/>
<title>'.$m_title.'</title>
</head>
<body>
';
echo '<div class="header">';
if (isset($u['id'])) {
echo '<a href="'.HTTPHOME.'"><img src="'.HTTPHOME.'/images/home.png"></a><a href="'.HTTPHOME.'/other/main.php"><img src="'.HTTPHOME.'/images/main.png"></a>';
$priv_count = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `pm_msg` WHERE `id_user` = '$u[id]' and `read` = 0"), 0);
$priv_r = mysql_query("SELECT `id_pm` FROM `pm_msg` WHERE `id_user` = '$u[id]' and `read` = 0 ORDER BY `time`");
$priv = mysql_fetch_assoc($priv_r);
if ($priv['id_pm']) {
echo '<a href="'.HTTPHOME.'/other/main.php?act=pm_view&id='.$priv['id_pm'].'"><img src="'.HTTPHOME.'/images/pm_new.png">'.$priv_count.'</a>';
}
if ($u['access'] > 0) {
echo '<a href="'.HTTPHOME.'/panel/" style="float: right; margin-top: -8px;" ><img src="'.HTTPHOME.'/images/panel.png" /></a>';
}
} else {
echo '<b><a href="'.HTTPHOME.'/other/login.php">'.$lang['login'].'</a></b> | <a href="'.HTTPHOME.'/other/reg.php">'.$lang['signup'].'</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="body">';
while ($ad = mysql_fetch_assoc($ad_r)) {
echo '<a href="'.$ad['link'].'">'.$ad['name'].'</a><br />';
}
echo '</div>';
}
?>