File size: 995B
<?php
//require('includes/header.php');
header("Content-type: text/vnd.wap.wml");
require('includes/utils.php');
require('includes/db.php');
require('includes/auth.php');
if(!isset($_GET['page']))
$_GET['page'] = 'index.wml';
if(preg_match('/[^\w\.]/', $_GET['page']))
{
echo '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">';
?>
<wml>
<card id="error" title="error" ontimer="main.php?id=<?php echo $id; ?>&p=<?php echo $login; ?>"><timer value="15"/>
<p align="center">
Неправильное имя страницы
</p>
</card>
</wml>
<?php
exit;
}
$contents = join('', file("$login/" . addslashes($_GET['page'])));
$contents = str_replace('</card>', '<p align="center"><br/>*********<br/>
<a href="edit.php?id=' . $id . '&p=' . $login . '&page=' . $_GET['page'] . '">Peдaктop</a></p>' . "\n</card>", $contents);
echo $contents;
?>