Просмотр файла editpost.php

Размер файла: 1.1Kb
<?php
include 'config.php';
include 'head.php';
include 'functions.php';
if ($pass==$admin_pass){
$_SESSION['rand']='1';
echo '<div class="text">';
$news=$_GET['news'];
$news_id=news_gaga($news);
if (empty($news_id)) {
echo 'Такого сообщения не существует!<br/></div>'; exit($end); }
echo 'Редактор<br/>';
echo '</div><div class="text">';
$file=file('news.dat');
$count=count($file);
for($i=0;$i<$count;$i++)
{
$ex=explode('#/#/#',$file[$i]);
if ($ex[0]==$news)
{
echo 'Время: '.date("H:i:s d.m.y",trim($ex[1])).'<br/>
Новость: '.trim($ex[2]).'<br/>';
echo '<a href="postdel.php?news='.$news.'">Удалить новость</a><br/>';
echo '</div><div class="form">';
echo '<form action="postedit.php" method="post"> 
<input type="hidden" name="news" value="'.$news.'"/>
Изменить сообщение:<br/>
<textarea name="newname" nums="25" rows="5">'.htmlspecialchars(stripslashes(trim($ex[2]))).'</textarea><br/>
<input type="submit" value="Продолжить"/></form>';
echo '</div>';
}
}
}
echo '<p>- <a href="index.php">К новостям</a><br/></p>';
echo $end;
?>