diff options
| author | Bulletin <bulletin@bulletinalpha.tk> | 2016-12-29 16:42:32 -0500 |
|---|---|---|
| committer | Bulletin <bulletin@bulletinalpha.tk> | 2016-12-29 16:42:32 -0500 |
| commit | 1a7fa60f6cb2ee26843ca19e37bb4ff44104ad55 (patch) | |
| tree | 2fa1fbdea9992ab63ba2a7abbac8bbcd633d13f7 /dash/dash_employee.php | |
| download | bulletin-1a7fa60f6cb2ee26843ca19e37bb4ff44104ad55.tar.gz | |
Added existing progress
Diffstat (limited to 'dash/dash_employee.php')
| -rw-r--r-- | dash/dash_employee.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dash/dash_employee.php b/dash/dash_employee.php new file mode 100644 index 0000000..476ff1f --- /dev/null +++ b/dash/dash_employee.php @@ -0,0 +1,28 @@ +<?php +if (!defined('HEIRARCHY')) die; +$title = 'Dashboard / Bulletin'; +require('header.php'); +$page = 1; +if (!empty($_GET['p'])) $page = max(1, intval($_GET['p'])); +$result = $db->query('SELECT ads.*, categories.cat_name, SUM(ratings.stars) / COUNT(ratings.stars) AS rating FROM ads LEFT JOIN categories ON ads.cat = categories.id LEFT JOIN ratings ON ads.uid = ratings.rated GROUP BY ads.id LIMIT ' . 10*($page-1) . ', 10') or fatal($db->error); +while ($row = $result->fetch_assoc()) { +?> + <div class="job"> + <a href="#" class="jobxbtn"></a> + <p class="jobtitle"><a href="ads.php?id=<?=$row['id'];?>"><?=htmlentities($row['title']);?></a></p> + <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">'.$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 +} +$result->free(); +require('footer.php'); +?> |
