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 +++++++++++++++++++++++++++++++++++++++ pages/advertising/1.php | 38 +++++++++++++++ pages/advertising/CVS/Entries | 3 ++ pages/advertising/CVS/Repository | 1 + pages/advertising/CVS/Root | 1 + 5 files changed, 143 insertions(+) create mode 100644 pages/advertising/0.php create mode 100644 pages/advertising/1.php create mode 100644 pages/advertising/CVS/Entries create mode 100644 pages/advertising/CVS/Repository create mode 100644 pages/advertising/CVS/Root (limited to 'pages/advertising') 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
diff --git a/pages/advertising/1.php b/pages/advertising/1.php new file mode 100644 index 0000000..5de2ad3 --- /dev/null +++ b/pages/advertising/1.php @@ -0,0 +1,38 @@ + +

+
+ + + + + + + + +
Link Title:
URL:
Months:
+ +
diff --git a/pages/advertising/CVS/Entries b/pages/advertising/CVS/Entries new file mode 100644 index 0000000..723e316 --- /dev/null +++ b/pages/advertising/CVS/Entries @@ -0,0 +1,3 @@ +/1.php/1.2/Sun Apr 6 19:45:25 2008// +/0.php/1.5/Sun Sep 28 20:13:12 2008// +D diff --git a/pages/advertising/CVS/Repository b/pages/advertising/CVS/Repository new file mode 100644 index 0000000..44c1913 --- /dev/null +++ b/pages/advertising/CVS/Repository @@ -0,0 +1 @@ +cacert/pages/advertising diff --git a/pages/advertising/CVS/Root b/pages/advertising/CVS/Root new file mode 100644 index 0000000..a363882 --- /dev/null +++ b/pages/advertising/CVS/Root @@ -0,0 +1 @@ +/var/lib/cvs -- cgit v1.2.1