diff options
| author | cflem <carson.fl3ming@gmail.com> | 2017-01-01 19:46:20 -0700 |
|---|---|---|
| committer | cflem <carson.fl3ming@gmail.com> | 2017-01-01 19:46:20 -0700 |
| commit | be8e64ca785c9281d09b42aeaa917e8a1673af42 (patch) | |
| tree | 3f0a7c6675d2e1fdf7b9653f9e293c2aa23b72c7 /dash/headless.php | |
| parent | d8543707426d6a4645c270929f999df8209bb587 (diff) | |
| download | bulletin-be8e64ca785c9281d09b42aeaa917e8a1673af42.tar.gz | |
Moved ad displaying to dash_functions.php; finished settings.php
Diffstat (limited to 'dash/headless.php')
| -rw-r--r-- | dash/headless.php | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/dash/headless.php b/dash/headless.php index bc321f2..ca090aa 100644 --- a/dash/headless.php +++ b/dash/headless.php @@ -6,29 +6,7 @@ $db = new bdb(); $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 '.($clicks+$b_config['ads_per_page']).', 1') or die(); if ($result->num_rows) { $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 + draw_ad($row); } $result->free(); $db->close(); |
