diff --git a/pages/advertising/0.php b/pages/advertising/0.php index ae5dc0c..0404a5e 100644 --- a/pages/advertising/0.php +++ b/pages/advertising/0.php @@ -20,7 +20,7 @@ if($_SESSION['profile']['adadmin'] == 2) $tdcols++; - if(intval($_REQUEST['approve']) > 0 && $_SESSION['profile']['adadmin'] >= 2) + if(array_key_exists('approve',$_REQUEST) && intval($_REQUEST['approve']) > 0 && $_SESSION['profile']['adadmin'] >= 2) { $approve = intval($_REQUEST['approve']); $query = "select * from `advertising` where `id`='$approve' and `expires`='0000-00-00 00:00:00'"; @@ -34,7 +34,7 @@ echo "

The ad was approved and is now active.

\n"; } } - if(intval($_REQUEST['deactive']) > 0 && $_SESSION['profile']['adadmin'] >= 2) + if(array_key_exists('deactive',$_REQUEST) && intval($_REQUEST['deactive']) > 0 && $_SESSION['profile']['adadmin'] >= 2) { $deactive = intval($_REQUEST['deactive']); $query = "select * from `advertising` where `id`='$deactive'"; @@ -65,7 +65,7 @@ ?> 0 "; $query .= "order by `id` desc";