summaryrefslogtreecommitdiff
path: root/dash/ads.php
diff options
context:
space:
mode:
Diffstat (limited to 'dash/ads.php')
-rw-r--r--dash/ads.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/dash/ads.php b/dash/ads.php
index 24693e9..fa7f715 100644
--- a/dash/ads.php
+++ b/dash/ads.php
@@ -6,8 +6,8 @@ $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.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 fatal($db->error);
-if ($result->num_rows < 1) fatal('No ad with this ID has been found.');
+$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();
?>
<div id="fulljob">
@@ -38,6 +38,8 @@ else
<div id="fjfright">
<p id="ebio"><?=(is_null($row['bio']) ? '<em>No bio included in profile.</em>' : htmlentities($row['bio']));?></p>
<h4>Respond to this Ad</h4>
+ <p id="eapply"><a href="apply.php?id=<?=intval($row['id']);?>">Apply Now</a></p>
+ <h4>Contact the Employer</h4>
<p id="eemail"><a href="mailto:<?=htmlentities($row['email']);?>"><?=htmlentities($row['email']);?></a></p>
<?php
$phonelink = '+'.preg_replace('/[^0-9]/', '', $row['phone']);