View file public_html/rejectpost.php

File size: 867B
<?php
include 'db.php';
include 'functions.php'; 
headtag("$SiteName - Reject Post");
$id=formget("id");
if($_POST["yes"])
{
$user=dump_udata("username");
if(dump_udata("username")=='admin')
{
mysql_query("update forum_question set status='Rejected' where id='".$id."'");

echo "<div class='success'>$id Post Rejected Successfully! <a href='/wallarea'>Continue</a></div>";
}
else
{
echo "<div class='error'>You are not admin or moderator.</div>";
}
}

 echo '<div class="form"><form method="post">
  Do You Really Want To Reject This Post? <br/>
<table><tr><td><input type="submit" name="yes" value="Yes"/></form></td><td><form action="/wallarea" method="post"><input type="submit" value="No"/></form></td></tr></table></div>';
echo '<div class="ad"><img src="/home.png"/> <a href="/">Home</a> | <a href="/user/dashboard">Dashboard</a></div>';
include 'foot.php';
?>