Просмотр файла admin/drop_news.php

Размер файла: 1.09Kb
<?php
include ("../conf.php");
include ("../lock.php");

if ($user == $myrow["user"] && $pass == $myrow["pass"])
{
if($user == $adname){


if (isset($_POST['id']))  {$id = $_POST['id'];}
if (isset($id))
{
$result = mysql_query("DELETE FROM news WHERE id='$id'");

if ($result == 'true') {
include ("../head.php");
echo "<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo "<div class='nav'>";
echo "Новость Удалена!</div>";
echo <<< sss
<div class='nav'>
• <a href=../menu.php?user=$user&pass=$pass>В меню</a>
</div>
sss;
include ("../foot.php");
}
else {
include ("../head.php");
echo "<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo "<div class='nav'>";
echo "Новость не Удалена!";
echo <<< sss
<div class='nav'>
• <a href=../menu.php?user=$user&pass=$pass>В меню</a>
</div>
sss;
include ("../foot.php");
}
}
else
{
echo "<p>Ошибка!!!</p>";
}
}
}
else
{
include ("../head.php");
echo "Ошибка! <br />Неверный <b>Ник</b> или <b>Пароль</b>!<br />";
echo <<<sss
<a href="../index.php">На главную</a>
sss;
include ("../foot.php");
}

?>