From e079a930d2797d9e94cc2e1848e4634c43adb6ba Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Wed, 12 Apr 2017 17:03:36 -0400 Subject: Finished up Reed\'s suggestions --- dash/ads.php | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'dash/ads.php') diff --git a/dash/ads.php b/dash/ads.php index 6878456..7c365ff 100644 --- a/dash/ads.php +++ b/dash/ads.php @@ -6,7 +6,7 @@ $adid = intval($_GET['id']); if ($adid < 1) fatal('No ad ID has been provided. You must have reached this page in error.'); $title = 'Ad / Bulletin'; require('header.php'); -$result = $db->query('SELECT ads.id, ads.uid, ads.title, ads.pay, ads.time, ads.location, ads.description, users.name, users.email, users.phone, users.picture, users.bio, SUM(ratings.stars) / COUNT(ratings.stars) AS rating FROM ads INNER JOIN users ON users.id = ads.uid LEFT JOIN ratings ON ratings.rated = ads.uid WHERE ads.id = '.$adid.' GROUP BY ads.id LIMIT 1') or dash_fatal($db->error); +$result = $db->query('SELECT ads.id, ads.uid, ads.title, ads.pay, ads.time, ads.location, ads.description, ads.closed, categories.cat_name, users.name, users.email, users.phone, users.picture, users.bio, SUM(ratings.stars) / COUNT(ratings.stars) AS rating FROM ads INNER JOIN users ON users.id = ads.uid LEFT JOIN ratings ON ratings.rated = ads.uid LEFT JOIN categories ON categories.id = ads.cat WHERE ads.id = '.$adid.' GROUP BY ads.id LIMIT 1') or dash_fatal($db->error); if ($result->num_rows < 1) dash_fatal('No ad with this ID has been found.'); $row = $result->fetch_assoc(); $result->free(); @@ -17,12 +17,7 @@ if ($b_user['type'] == 'EMPLOYER' && $b_user['id'] == $row['uid']) echo ' ?>

-

Pays $

-

-

-
-
-

+

@@ -34,18 +29,7 @@ else ?>

-
-
-

No bio included in profile.' : htmlentities($row['bio']));?>

- -

Respond to this Ad

-

Apply Now

- -

Contact the Employer

+

Contact Information

Open a Chat

+
+

Job Details

+

Pays $

+

+

+
+
+
+

Job Description

+

+ +

Apply Now

+ +