From 9dceece06fbdc98add6f76f0b1aec05891a394c4 Mon Sep 17 00:00:00 2001 From: Markus Warg Date: Mon, 29 Mar 2010 09:54:06 +0200 Subject: remove cacert/ prefix --- pages/advertising/0.php | 100 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 pages/advertising/0.php (limited to 'pages/advertising/0.php') diff --git a/pages/advertising/0.php b/pages/advertising/0.php new file mode 100644 index 0000000..0404a5e --- /dev/null +++ b/pages/advertising/0.php @@ -0,0 +1,100 @@ + + 0 && $_SESSION['profile']['adadmin'] >= 2) + { + $approve = intval($_REQUEST['approve']); + $query = "select * from `advertising` where `id`='$approve' and `expires`='0000-00-00 00:00:00'"; + $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 `expires`='$end', `active`=1, `approvedby`='".$_SESSION['profile']['id']."' where `id`='$approve'"; + mysql_query($query); + echo "

The ad was approved and is now active.

\n"; + } + } + 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'"; + $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 "

The ad was deactivated and is now inactive.

\n"; + } + } + +?> + + + + + + + + + + + +Approve\n"; } +?> + 0 "; + $query .= "order by `id` desc"; + + $res = mysql_query($query); + while($row = mysql_fetch_assoc($res)) + { + if($row['expires'] == "0000-00-00 00:00:00") + $status = "Pending"; + else if($row['active'] == 1 && $row['timeleft'] > 0) + $status = "Active"; + else if($row['timeleft'] <= 0) + $status = "Expired"; + else if($row['active'] != 1) + $status = "Disabled"; + else + $status = "Unknown"; + echo ""; + echo ""; + echo ""; + if($_SESSION['profile']['adadmin'] == 2) + { + if($status == "Pending" && $row['expires'] == "0000-00-00 00:00:00") + echo ""; + else if($status == "Active") + echo ""; + else + echo ""; + } + echo "\n"; + } +?> +
IDLinkStatusExpiresEditDisable
".$row['id']."".$row['title']."$status".$row['expires']."EditDisableApproveDe-ActivateN/A
-- cgit v1.2.1