View file xzoom_v1.0/admin/news_save.php

File size: 666B
<?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")
{

$name = $_POST['name'];
$news = $_POST['news'];

$file = "../data/data_news.dat";
$write = fopen($file,"w+");
fwrite($write,"$name:::$news");
fclose($write);
echo"Новость сохранена<p>";
echo"<a href=\"main.php?login=$admin&pass=$pass\">Назад</a></br>";
}
else
{
echo"Ошибка авторизации";
}
echo"</div>";
include("../templates/foot.php");

?>