Finished the implementation of the Deactivate buttons

pull/1/head
root 16 years ago
parent aebeb808bb
commit 0dc89f468d

@ -31,6 +31,21 @@
echo "<p>The ad was approved and is now active.</p>\n";
}
}
if(intval($_REQUEST['deactive']) > 0 && $_SESSION['profile']['adadmin'] >= 2)
{
$deactive = intval($_REQUEST['deactive']);
$query = "select * from `advertising` where `id`='$deactive'";
$res = mysql_query($query);
if(mysql_num_rows($res) > 0)
{
$row = mysql_fetch_assoc($res);
$end = date("Y-m-d H:i:s", mktime(date("H"), date("i"), date("s"), date("m")+$row['months'], date("d"), date("Y")));
$query = "update `advertising` set `active`=0 where `id`='$deactive'";
mysql_query($query);
echo "<p>The ad was deactivated and is now inactive.</p>\n";
}
}
?>
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="500">
<tr>

Loading…
Cancel
Save