summaryrefslogtreecommitdiff
path: root/dash/dash_functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'dash/dash_functions.php')
-rw-r--r--dash/dash_functions.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/dash/dash_functions.php b/dash/dash_functions.php
index 49664a3..b9fd9db 100644
--- a/dash/dash_functions.php
+++ b/dash/dash_functions.php
@@ -6,4 +6,28 @@ function dash_fatal ($msg = null, $link = null, $label = null) {
require('footer.php');
die;
}
+function draw_ad ($row) {
+?>
+ <div class="job">
+ <a href="#" class="jobxbtn"></a>
+ <p class="jobtitle"><a href="ads.php?id=<?=$row['id'];?>"><?=htmlentities($row['title']);?></a></p>
+<?php
+ if (is_null($row['cat_name']))
+ echo ' <p class="jobcat">Uncategorized</p>'.PHP_EOL;
+ else
+ echo ' <p class="jobcat">'.htmlentities($row['cat_name']).'</p>'.PHP_EOL;
+?>
+ <p class="joblocation"><?=htmlentities($row['location']);?></p>
+<?php
+ if (is_null($row['rating']))
+ echo ' <p class="jobstars">Employer Not Rated</p>'.PHP_EOL;
+ else
+ echo ' <p class="jobstars">'.intval($row['rating']).' Star Employer</p>'.PHP_EOL;
+?>
+ <p class="jobpay">Pays $<?=number_format($row['pay'], 2);?></p>
+ <p class="jobblurb"><?=htmlentities(substr($row['description'], 0, min(strlen($row['description']), 160)));?> <a href="ads.php?id=<?=$row['id'];?>">[...]</a></p>
+ </p>
+ </div>
+<?php
+}
?>