Файл: view.php
Строк: 27
<?php
require('sistema/header.php');
require('sistema/utilition.php');
require('sistema/databaza.php');
require('sistema/login.php');
require('sistema/config.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;
?>