View file admin/edit2.php

File size: 632B
<?php

include("../config.php");
include("../templates/head.php");
echo"<div class=\"a\">";
echo"Админка";
echo"</div>";
echo"<p>";
echo"<div class=\"c\">";
echo"Настройка<p>";
if($_SERVER['QUERY_STRING'] == "login=$admin&pass=$pass")
{

$edit = $_POST['edit'];
$file = "../index.txt";
$write = fopen($file,"w+");
fwrite($write,stripslashes($edit));
fclose($write);
echo"Данные сохранены<p>";
echo"<a href=\"main.php?login=$admin&pass=$pass\">Назад</a></br>";
}
else
{
echo"Ошибка авторизации";
}
echo"</div>";
include("../templates/foot.php");

?>