View file gb_dro/edit_form.php

File size: 2Kb
<?php
/* GB By Dro http://kywap.org.ru/ */
require ('inc/sets.php');
if (isset($_GET['nom'])) { $nom = $_GET['nom']; } else { $nom = ''; }
if (isset($_GET['pass'])) { $pass = $_GET['pass']; } else { $pass = ''; }
if ($pass != $adminpass) { die('Доступ запрещён.'); }
else {
	$fl = 'messages.dat';
	$line = $nom;
	$file = file($fl);
	$count = count($file);
	for($i=0;$i<$count;$i++)
	{
	if($i==$line-1) { list($nick, $mail, $site, $date, $mess, $answ) = explode('|', $file[$i]); }
	}
	
	$nick = trim($nick);
	$mail = trim($mail);
	$site = trim($site);
	$date = trim($date);
	$mess = trim($mess);
	$answ = trim($answ);
	
	$head = '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
	<html>
	<head>
	<title>Редактирование | '.$site_name.'</title>
	<meta http-equiv="Pragma" content="no-cache"/>
	<link rel="stylesheet" type="text/css" href="style.css"/>
	</head>
	<body>
	<div class="title">Редактирование</div>';
	$foot = '<div class="navigation">
	&#171; <a href="index.php">Назад</a><br/>
	</div>
	<div class="footer">&#169; '.$site_name.'</div>
	</body>
	</html>';
	
	echo $head;
	echo '<div class="body">
	<form action="edit.php?nom='.$nom.'&amp;pass='.$pass.'" method="post">
	Имя*:<br/>
	<input name="new_nick" type="text" value="'.$nick.'"/><br/>
	E-mail:<br/>
	<input name="new_mail" type="text" value="'.$mail.'"/><br/>
	Сайт:<br/>
	<input name="new_site" type="text" value="'.$site.'"/><br/>
	<input name="new_date" type="hidden" value="'.$date.'"/>
	Сообщение*:<br/>
	<textarea name="new_mess" cols="15" rows="3">'.$mess.'</textarea><br/>
	Ответ:<br/>
	<textarea name="new_answ" cols="15" rows="3">'.$answ.'</textarea><br/>
	<input name="send" type="submit" value="Изменить"/><br/><br/>
	<span style="color: #999999; font-weight: bold;">* Поля, обязательны для заполнения!</span>
	</form>
	</div>';
	echo $foot;
}
?>