0; $title = 'Profile / Bulletin'; $extra_head = ' '.PHP_EOL; if (!$public) $extra_head .= ' '.PHP_EOL; require('header.php'); $user = $b_user; if ($public) { $result = $db->query('SELECT users.*, SUM(ratings.stars) / COUNT(ratings.stars) AS rating FROM users LEFT JOIN ratings ON ratings.rated = users.id WHERE users.id = '.intval($_GET['id']).' AND users.active = 1 GROUP BY users.id LIMIT 1') or dash_fatal($db->error); $user = $result->fetch_assoc(); $result->free(); if ($user['id'] < 1) dash_fatal('A user with that ID does not exist. You must have reached this page in error.'); ?>
=rating_format($user['rating'], typestr($user['type']));?>
=(is_null($user['bio']) ? 'No bio included in profile.' : htmlentities($user['bio'])); ?>
Email: =htmlentities($user['email']);?>
Phone: =htmlentities($user['phone']);?>
=(is_null($user['address']) ? 'No address specified.' : htmlentities($user['address']));?>
Zipcode: =htmlentities($user['zipcode']);?>
Based on '.$result->num_rows.' jobs completed.'; if ($result->num_rows < 1) echo '
This user has never been reviewed.
'; while ($row = $result->fetch_assoc()) { ?>=rating_format($row['stars'], ' Review');?>
=is_null($row['comment']) ? 'No comment provided.' : htmlentities($row['comment']);?>
=rating_format($user['rating'], typestr($user['type']));?>