<?php
session_start();
include('../data/config.php');
if (!isset($_SESSION['user_name'])) {
header('Location: signin.php');
exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="../layout/design.css" />
<link rel="shortcut icon" href="../layout/favicon.ico" type="image/x-icon" />
<title>OneForum - Moderators Area</title>
</head>
<body>
<table width="837" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" height="100" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="774"><p><img src="files/logo.png" width="192" height="48" /></p>
<p><?php echo 'Welcome to moderators area'; ?></p></td>
<td width="63"><a href="signout.php"><img src="files/signout.png" width="63" height="63" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"><a href="posts.php"><img src="files/posts.png" width="80" height="80" hspace="20" border="0" /></a><a href="users.php"><img src="files/users.png" width="80" height="80" hspace="20" border="0" /></a><a href="moderators.php"><img src="files/moderators.png" width="80" height="80" hspace="20" border="0" /></a><a href="statistic.php"><img src="files/statistic.png" width="80" height="80" hspace="20" border="0" /></a></td>
</tr>
<tr>
<td><br />
<p><strong><u>Delete Post</u></strong></p>
<p><img src="files/icons/trash.png" /></p>
<p><?php
if(is_numeric($_GET['post_id'])) {
$post_id = mysql_real_escape_string($_GET['post_id']);
$query = "DELETE FROM posts WHERE post_id = '" . $post_id . "'";
$result = mysql_query($query);
if($result) {
echo '<p class="right">Post has been deleted [ <a href="posts.php">Continue</a> ]</p>';
}else{
echo '<p class="false">Post could not be deleted.</p>';
}
}else{
echo '<p class="false">Invalid Post-ID - Choose Post.</p>';
}
?></p><br /></td>
</tr>
<tr>
<td><br /><div id="line"> </div><br /><div align="center"><strong>© by </strong><a href="http://www.onescripts.de/" target="_blank">OneScripts.de</a></div></td>
</tr>
</table>
</body>
</html>