Размер файла: 1.27Kb
<?
if ($nsauth == ok) {
include("configure.php");
include("user.php");
$table_name5 = "ns_news";
$connection5 = @mysql_connect("$db_server", "$db_name", "$db_password") or die("Couldn't connect.");
$db5 = @mysql_select_db($db_database, $connection5) or die("Couldn't select database.");
$sql5 = "SELECT title, postby, hldate, id
FROM $table_name5
ORDER BY title
";
$result5 = @mysql_query($sql5, $connection5) or die("Couldn't execute query.");
while ($row5 = mysql_fetch_array($result5)) {
$title = $row5['title'];
$postby = $row5['postby'];
$hldate = $row5['hldate'];
$delown5 = $row5['delown'];
$id = $row5['id'];
$listnews .= "<option value=\"$id\">
$title by $postby on $hldate </option> <br>";
}
if ($delown9 == yes) {
$display = "
<font size=4>
<p>
<form action=delnewsown_2.php method=post>
<select name=deletenews>
$listnews
</select>
<br>
<Br>
<input type=hidden name=title value=$title>
<input type=submit value=\"Delete/Edit\">
</form>
</p>
<p>
<a href=\"admin.php\">Admin Center</a>
</p>
";
} else {
$display = "You do not have access to this page.";
}
} else {
header("location: login_admin.php");
}
?>
<body bgcolor=#D1E7FE>
<title>Admin / Delete News</title>
<? echo $display; ?>
</font>