From 3adf151d479a2ac778295181e63d5492aeb830ac Mon Sep 17 00:00:00 2001 From: root Date: Mon, 22 Sep 2008 15:23:49 +0000 Subject: [PATCH] Improved register_globals --- pages/advertising/0.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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";