View file admin/edit.php

File size: 851B
<?php

include("../config.php");
include("../templates/head.php");
include("../data/data_links.dat");
echo"<div class=\"a\">";
echo"Админка";
echo"</div>";
echo"<p>";
echo"<div class=\"c\">";
echo"Редактирование index.txt<p>";
if($_SERVER['QUERY_STRING'] == "login=$admin&pass=$pass")
{
$file = "../index.txt";
$edit = fopen("$file","r+");
$dat = fread($edit,filesize($file));
echo"<form action=edit2.php?login=$admin&pass=$pass method=POST>
<textarea cols=30 rows=10 name=edit maxlength=\"1000000000\">$dat</textarea></br><p>";
echo"<input type=submit name=submit class=buttom value=\"Сохранить\"><p>
</form>";
echo"<a href=\"main.php?login=$admin&pass=$pass\">Назад</a></br>";
}
else
{
echo"Ошибка авторизации";
}
echo"</div>";
include("../templates/foot.php");

?>