Размер файла: 1.53Kb
<?php
include "config.php";
require ('adminka/parser.php');
if (isset($_GET['nom'])) { $nom = $_GET['nom']; } else { $nom = ''; }
if (isset($_GET['pass'])) { $pass = $_GET['pass']; } else { $pass = ''; }
if ($pass != $pas) { die('Доступ запрещён.'); }
else {
$fl = 'db.ml';
$line = $nom;
$file = file($fl);
$count = count($file);
for($i=0;$i<$count;$i++)
{
if($i==$line-1) { list($login, $date, $mesage, $agent, $ip, $answ) = explode('|', $file[$i]); }
}
$login = trim($login);
$date = trim($date);
$mesage = trim($mesage);
$agent = trim($agent);
$ip = trim($ip);
$answ = trim($answ);
$foot = '<div class="navigation">
« <a href="redact.php?pass='.$pas.'">Назад</a><br/>
</div>
<div class="footer">© '.$site.'</div>
</body>
</html>';
include "inc/head.ml";
echo '<div class="body">
<form action="edit.php?nom='.$nom.'&pass='.$pass.'" method="post">
Логин:<br/>
<input name="new_login" type="text" value="'.$login.'"/><br/>
Дата:<br/>
<input name="new_date" type="text" value="'.$date.'"/><br/>
Cообщение:<br/>
<textarea name="new_mesage" cols="15" rows="3">'.$mesage.'</textarea><br/>
Броузер:<br/>
<input name="new_agent" type="text" value="'.$agent.'"/><br/>
Айпи:<br/>
<input name="new_ip" type="text" value="'.$ip.'"/><br/>
Ответ:<br/>
<textarea name="new_answ" cols="15" rows="2">'.$answ.'</textarea><br/>
<input name="send" type="submit" value="Изменить"/><br/><br/>
</form>
</div>';
echo $foot;
}
?>