Файл: editmsg.php
Строк: 26
<?php
include 'config.php';
include 'head.php';
include 'functions.php';
$_SESSION['rand']='1';
$page=$_GET['page'];
$mes=$_GET['mes'];
$mes_id=mes_gaga($mes);
if (empty($mes_id)) {
echo '<div class="text">';
echo 'Такого сообщения не существует!<br/></div>'; exit($end); }
echo '<div class="text">';
$file=file('msg.dat');
$count=count($file);
for($i=0;$i<$count;$i++)
{
$ex=explode('#/#/#',$file[$i]);
if ($ex[1]==$mes)
{
echo '<b>'.trim($ex[2]).'</b><br/>
Время: '.date("H:i:s d.m.y",trim($ex[3])).'<br/>
Браузер: '.trim($ex[4]).'<br/>
IP: '.trim($ex[5]).'<br/>
Сообщение: '.trim($ex[6]).'<br/>';
echo '<a href="postdelmes.php?mes='.$mes.'&page='.$page.'">Удалить сообщение</a><br/>';
echo '</div><div class="form">';
$text=htmlspecialchars(trim($ex[6]));
echo '<form action="posteditmes.php" method="post">
<input type="hidden" name="page" value="'.$page.'"/>
<input type="hidden" name="mes" value="'.$mes.'"/>
Изменить сообщение:<br/>
<textarea name="newname" nums="25" rows="5">'.$text.'</textarea><br/>
<input type="submit" value="Продолжить"/></form>';
echo '</div>';
}
}
echo '<div class="p">- <a href="index.php">Назад</a><br/></div>';
echo $end;
?>