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.'); ?>

Profile Picture

Bio

No bio included in profile.' : htmlentities($user['bio'])); ?>


Personal Information

Email:

Phone:


Address

Zipcode:


Chat

Open a Chat

Past Reviews

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 '

Based on '.$result->num_rows.' jobs completed.'; if ($result->num_rows < 1) echo '

This user has never been reviewed.

'; while ($row = $result->fetch_assoc()) { ?>

Profile Picture

Based on

No comment provided.' : htmlentities($row['comment']);?>

free(); ?>
escape_string($_POST['bio']).'\''; // Address validation $addr = array_map(trim, array( $_POST['address1'], $_POST['address2'], $_POST['addrcity'], $_POST['addrstate'], )); $addrfull = array_reduce($addr, function ($carry, $item) { return $carry || !empty($item); }, false); if ($addrfull) { if (validate_address($addr)) $addr_q = '\''.$db->escape_string(address_join($addr)).'\''; else dash_fatal('The address you supplied appears to be incomplete or invalid.'); } else { $addr_q = 'NULL'; } $patterns = array( 'email' => '/^.+@.+\..+$/', 'zip' => '/^\d{5}([-\s]\d{4})?$/', 'phone' => '/\+?\d{1,3}\s*\(?\d{3}\)?\s*\d{3}([-\s]*)\d{4}$/', ); $pkeys = array_keys($patterns); foreach ($pkeys as $pkey) { if (!preg_match($patterns[$pkey], $_POST[$pkey])) dash_fatal('Invalid field values have been entered.'); } $deactivate = ''; $usepropic = ''; if ($_POST['email'] != $b_user['email']) { $session = uniqid('ch', true); $deactivate = ', session = \''.bulletin_hash($session).'\', active = 0'; bulletin_mail($_POST['email'], 'Verify Your Bulletin Email', tpl(array( 'activation_vars' => 'uid='.$b_user['id'].'&key='.$session, ), 'changed.tpl')) or dash_fatal('We couldn\'t send mail to your new email address, so your profile has not been updated.'); } if (!empty($_FILES['picture']['tmp_name'])) { $picstr = genpicstr(); $usepropic = ', picture = \''.$db->escape_string($picstr).'\''; $tmpfile = $_FILES['picture']['tmp_name']; if (getimagesize($tmpfile) === false) dash_fatal('Your uploaded file is not an image.'); @$img = imagecreatefromstring(file_get_contents($tmpfile)); @imagepng($img, $picstr) or dash_fatal('Your new profile picture could not be saved to the server.'); @unlink($b_user['picture']); @imagedestroy($img); } $db->query('UPDATE users SET email = \''.$db->escape_string($_POST['email']).'\', zipcode = \''.$db->escape_string($_POST['zip']).'\', phone = \''.$db->escape_string($_POST['phone']).'\', address = '.$addr_q.', bio = '.$bio.$usepropic.$deactivate.' WHERE id = '.$b_user['id']) or dash_fatal($db->error); dash_fatal('Your profile has been updated. If you have changed your email, you will need to verify it before returning to Bulletin.', $b_config['base_url'].'dash/profile.php'); } else { ?>

For safety reasons, you will have to complete your profile before you can access the rest of Bulletin.

'.PHP_EOL; ?>

Profile Picture

Profile Picture

Upload New

Include a Bio

Basic Information