diff options
Diffstat (limited to 'dash/dash_employee.php')
| -rw-r--r-- | dash/dash_employee.php | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/dash/dash_employee.php b/dash/dash_employee.php index 0c7e47c..d4a3df1 100644 --- a/dash/dash_employee.php +++ b/dash/dash_employee.php @@ -3,32 +3,9 @@ if (!defined('HEIRARCHY')) die; $title = 'Dashboard / Bulletin'; require('header.php'); $page = 1; -if (!empty($_GET['p'])) $page = max(1, intval($_GET['p'])); +// 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 ' . $b_config['ads_per_page']*($page-1) . ', '.$b_config['ads_per_page']) 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> -<?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 -} +while ($row = $result->fetch_assoc()) draw_ad($row); $result->free(); require('footer.php'); ?> |
