diff options
| author | Carson Fleming <cflems@cflems.net> | 2017-04-12 17:03:36 -0400 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2017-04-12 17:03:36 -0400 |
| commit | e079a930d2797d9e94cc2e1848e4634c43adb6ba (patch) | |
| tree | a49ebbe0a3e6937ca894f3dc1dd9b1f9a4cbc9dd /dash/profile.php | |
| parent | 1e35e053f12f4c4d26ec435f2b314e45cd3f05ea (diff) | |
| download | bulletin-e079a930d2797d9e94cc2e1848e4634c43adb6ba.tar.gz | |
Finished up Reed\'s suggestions
Diffstat (limited to 'dash/profile.php')
| -rw-r--r-- | dash/profile.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/dash/profile.php b/dash/profile.php index 8a448b5..3c63ad4 100644 --- a/dash/profile.php +++ b/dash/profile.php @@ -51,6 +51,30 @@ $phonelink = '+'.preg_replace('/[^0-9]/', '', $user['phone']); <p><a href="#" onclick="bullechat.gui.create('<?=htmlentities($user['email'], ENT_HTML401 | ENT_QUOTES);?>'); return false;">Open a Chat</a></p> </div> </div> + <div id="proreviews"> + <h3>Past Reviews</h3> +<?php +$result = $db->query('SELECT ratings.stars, ratings.comment, users.id AS uid, users.name, users.picture, ads.id AS adid, ads.title FROM ratings INNER JOIN users ON users.id = ratings.rater INNER JOIN ads ON ads.id = ratings.job WHERE ratings.rated = '.$user['id']) or dash_fatal($db->error); +echo ' <p>Based on <strong>'.$result->num_rows.'</strong> jobs completed.'; +if ($result->num_rows < 1) echo ' <p><em>This user has never been reviewed.</em></p>'; +while ($row = $result->fetch_assoc()) { +?> + <div class="review"> + <div class="reviewleft"> + <p class="revname"><a href="profile.php?id=<?=$row['uid'];?>"><?=htmlentities($row['name']);?></a></p> + <p class="revpic"><img src="uimg/<?=is_null($row['picture']) ? 'default.png' : intval($row['picture']).'.png';?>" alt="Profile Picture" /></p> + <p class="revjob">Based on <a href="ads.php?id=<?=$row['adid'];?>"><?=htmlentities($row['title']);?></a></p> + </div> + <div class="reviewright"> + <p class="revstars"><?=rating_format($row['stars'], ' Review');?></p> + <p class="comment"><?=is_null($row['comment']) ? '<em>No comment provided.</em>' : htmlentities($row['comment']);?></p> + </div> + </div> +<?php +} +$result->free(); +?> + </div> </div> <?php } else if (!empty($_POST['chprofile'])) { |
