diff options
| author | Carson Fleming <cflems@cflems.net> | 2017-02-16 23:59:34 -0500 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2017-02-16 23:59:34 -0500 |
| commit | 4f12fecebcd3f2a5bc6a0e7cdf9c420af4ed435a (patch) | |
| tree | edd91e33b95d48022bca9ce8c0626a7a7879af93 /dash/ads.php | |
| parent | 5564b3a9cb432f1f7eb76bd325251312904bb893 (diff) | |
| download | bulletin-4f12fecebcd3f2a5bc6a0e7cdf9c420af4ed435a.tar.gz | |
Did the profile
Diffstat (limited to 'dash/ads.php')
| -rw-r--r-- | dash/ads.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/dash/ads.php b/dash/ads.php index fa7f715..97bfa3e 100644 --- a/dash/ads.php +++ b/dash/ads.php @@ -9,6 +9,7 @@ require('header.php'); $result = $db->query('SELECT ads.id, 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.' 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(); ?> <div id="fulljob"> <div id="fjheader"> @@ -28,12 +29,7 @@ else echo ' <img id="propic" src="uimg/'.intval($row['picture']).'.png" alt="Profile Picture" />'.PHP_EOL; ?> <p id="ename"><?=htmlentities($row['name']);?></p> -<?php -if (is_null($row['rating'])) - echo ' <p id="erating">Employer Not Rated</p>'.PHP_EOL; -else - echo ' <p id="erating">'.intval($row['rating']).' Star Employer</p>'.PHP_EOL; -?> + <p id="erating"><?=rating_format($row['rating']);?></p> </div> <div id="fjfright"> <p id="ebio"><?=(is_null($row['bio']) ? '<em>No bio included in profile.</em>' : htmlentities($row['bio']));?></p> @@ -50,6 +46,5 @@ $phonelink = '+'.preg_replace('/[^0-9]/', '', $row['phone']); </div> </div> <?php -$result->free(); require('footer.php'); ?> |
