summaryrefslogtreecommitdiff
path: root/pages/advertising
diff options
context:
space:
mode:
authorKarl-Heinz Gödderz (GuKKDevel) <Devel@GuKK-Online.de>2018-10-30 22:57:15 +0100
committerKarl-Heinz Gödderz (GuKKDevel) <Devel@GuKK-Online.de>2018-10-30 22:57:15 +0100
commit192f34b4c74a7536727020ebd3d0c8871c2a2c51 (patch)
tree3f77e91d52204cdd987ff8b0aea168d583da7ba2 /pages/advertising
parent000b17a9a909737930d59dee82c40e7eab2fa337 (diff)
downloadcacert-devel-192f34b4c74a7536727020ebd3d0c8871c2a2c51.tar.gz
cacert-devel-192f34b4c74a7536727020ebd3d0c8871c2a2c51.tar.xz
cacert-devel-192f34b4c74a7536727020ebd3d0c8871c2a2c51.zip
All mysql_-statments replaced by their corresponding mysqli_-statements
Diffstat (limited to 'pages/advertising')
-rw-r--r--pages/advertising/0.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/pages/advertising/0.php b/pages/advertising/0.php
index 0404a5e..c780856 100644
--- a/pages/advertising/0.php
+++ b/pages/advertising/0.php
@@ -24,13 +24,13 @@
{
$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)
+ $res = mysqli_query($_SESSION['mconn'], $query);
+ if(mysqli_num_rows($res) > 0)
{
- $row = mysql_fetch_assoc($res);
+ $row = mysqli_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);
+ mysqli_query($_SESSION['mconn'],$query);
echo "<p>The ad was approved and is now active.</p>\n";
}
}
@@ -38,13 +38,13 @@
{
$deactive = intval($_REQUEST['deactive']);
$query = "select * from `advertising` where `id`='$deactive'";
- $res = mysql_query($query);
- if(mysql_num_rows($res) > 0)
+ $res = mysqli_query($_SESSION['mconn'], $query);
+ if(mysqli_num_rows($res) > 0)
{
- $row = mysql_fetch_assoc($res);
+ $row = mysqli_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);
+ mysqli_query($_SESSION['mconn'], $query);
echo "<p>The ad was deactivated and is now inactive.</p>\n";
}
}
@@ -69,8 +69,8 @@
$query .= "and `active`=1 having `timeleft` > 0 ";
$query .= "order by `id` desc";
- $res = mysql_query($query);
- while($row = mysql_fetch_assoc($res))
+ $res = mysqli_query($_SESSION['mconn'], $query);
+ while($row = mysqli_fetch_assoc($res))
{
if($row['expires'] == "0000-00-00 00:00:00")
$status = "Pending";