From 4f12fecebcd3f2a5bc6a0e7cdf9c420af4ed435a Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Thu, 16 Feb 2017 23:59:34 -0500 Subject: Did the profile --- dash/ads.php | 9 +--- dash/apply.php | 9 +--- dash/css/dash.css | 2 +- dash/css/profile.css | 93 ++++++++++++++++++++++++++++++++++++ dash/dash_functions.php | 16 ++++++- dash/header.php | 5 +- dash/js/profile.js | 14 ++++++ dash/profile.php | 123 ++++++++++++++++++++++++++++++++++++++++++++++++ dash/uimg/1.png | Bin 0 -> 21047 bytes dash/uimg/default.png | Bin inc/user.php | 2 +- index.php | 2 +- 12 files changed, 256 insertions(+), 19 deletions(-) create mode 100644 dash/css/profile.css create mode 100644 dash/js/profile.js create mode 100644 dash/profile.php create mode 100644 dash/uimg/1.png mode change 100644 => 100755 dash/uimg/default.png diff --git a/dash/ads.php b/dash/ads.php index fa7f715..97bfa3e 100644 --- a/dash/ads.php +++ b/dash/ads.php @@ -9,6 +9,7 @@ require('header.php'); $result = $db->query('SELECT ads.id, ads.title, ads.pay, ads.time, ads.location, ads.description, users.name, users.email, users.phone, users.picture, users.bio, SUM(ratings.stars) / COUNT(ratings.stars) AS rating FROM ads INNER JOIN users ON users.id = ads.uid LEFT JOIN ratings ON ratings.rated = ads.uid WHERE ads.id = '.$adid.' LIMIT 1') or dash_fatal($db->error); if ($result->num_rows < 1) dash_fatal('No ad with this ID has been found.'); $row = $result->fetch_assoc(); +$result->free(); ?>
@@ -28,12 +29,7 @@ else echo ' Profile Picture'.PHP_EOL; ?>

-Employer Not Rated

'.PHP_EOL; -else - echo '

'.intval($row['rating']).' Star Employer

'.PHP_EOL; -?> +

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

@@ -50,6 +46,5 @@ $phonelink = '+'.preg_replace('/[^0-9]/', '', $row['phone']);
free(); require('footer.php'); ?> diff --git a/dash/apply.php b/dash/apply.php index be353ad..ab2652c 100644 --- a/dash/apply.php +++ b/dash/apply.php @@ -19,6 +19,7 @@ if (!empty($_POST['apply'])) { $result = $db->query('SELECT ads.id, ads.title, ads.pay, ads.time, ads.location, ads.description, users.name, SUM(ratings.stars) / COUNT(ratings.stars) AS rating FROM ads INNER JOIN users ON users.id = ads.uid LEFT JOIN ratings ON ratings.rated = ads.uid WHERE ads.id = '.$adid.' LIMIT 1') or dash_fatal($db->error); if ($result->num_rows < 1) dash_fatal('No ad with this ID has been found.'); $row = $result->fetch_assoc(); +$result->free(); ?>
@@ -38,12 +39,7 @@ else echo ' Profile Picture'.PHP_EOL; ?>

-Employer Not Rated

'.PHP_EOL; -else - echo '

'.intval($row['rating']).' Star Employer

'.PHP_EOL; -?> +

@@ -55,6 +51,5 @@ else
free(); require('footer.php'); ?> diff --git a/dash/css/dash.css b/dash/css/dash.css index 86982df..f5df815 100644 --- a/dash/css/dash.css +++ b/dash/css/dash.css @@ -277,7 +277,7 @@ body { } .fjsettings textarea { margin: 0.5em auto; - width: 500px; + width: 450px; height: 150px; resize: none; border: 1px solid #dddddd; diff --git a/dash/css/profile.css b/dash/css/profile.css new file mode 100644 index 0000000..79a908f --- /dev/null +++ b/dash/css/profile.css @@ -0,0 +1,93 @@ +.hidden { + display: none; +} +#profile { + width: 800px; + margin: 2em auto; + background-color: #ffffff; + padding: 1em; + border-radius: 5px; + box-shadow: 0px 0px 5px rgba(0,0,0,0.75); +} +#profile input { + margin-top: 0.35em; + margin-bottom: 0.35em; + font-family: 'Myriad Pro'; + font-size: 12pt; +} +#profile p, #profile h3, #profile h4 { + margin: 0; +} +input[type=text], input[type=password] { + width: 248px; + padding: 6px 12px; + border: 1px solid #dddddd; + border-radius: 5px; +} +input[type=submit], input[type=button], button { + background-color: #fb4d00; + padding: 5px 10px 3px; + border-style: none; + border-radius: 10px; + color: #ffffff; + cursor: pointer; +} +input[type=submit]:hover, input[type=button]:hover, button:hover { + background-color: #fb7700; +} +textarea { + margin: 0.25em auto; + width: 450px; + height: 150px; + resize: none; + border: 1px solid #dddddd; + border-radius: 5px; + padding: 5px; +} +#proheader { + text-align: center; + padding-bottom: 1em; + margin-bottom: 1em; + border-bottom: 1px solid #eeeeee; +} +#proleft { + float: left; + text-align: center; +} +#propic { + margin: 0.5em auto; + cursor: pointer; +} +#propic img { + width: 192px; + height: 192px; +} +#hoverupload { + position: relative; + top: -53px; + text-align: center; + width: 192px; + height: 20px; + background-color: rgba(251,77,0,0.4); + font-size: 20px; + padding: 14px 0; + display: none; +} +#propic:hover #hoverupload { + display: block; +} +#proright { + margin-left: calc(192px + 3em); + margin-bottom: 1em; +} +.public #probody { + margin: 1em 0; +} +a { + text-decoration: none; + color: #fb4d00; + cursor: pointer; +} +a:hover { + color: #fb7700; +} diff --git a/dash/dash_functions.php b/dash/dash_functions.php index 2cc7f8d..c5644ca 100644 --- a/dash/dash_functions.php +++ b/dash/dash_functions.php @@ -6,6 +6,20 @@ function dash_fatal ($msg = null, $link = null, $label = null) { require('footer.php'); die; } +function typestr ($type) { + switch ($type) { + case 'EMPLOYER': + return 'Employer'; + case 'EMPLOYEE': + return 'Employee'; + default: + return 'Team Member'; + } +} +function rating_format ($rating = null, $typestr = 'Employer') { + if (is_null($rating)) return $typestr.' Not Rated'; + return number_format($rating, 1).' Star '.$typestr; +} function draw_noads () { ?>
@@ -32,7 +46,7 @@ function draw_ad ($row) { if (is_null($row['rating'])) echo '

Employer Not Rated

'.PHP_EOL; else - echo '

'.intval($row['rating']).' Star Employer

'.PHP_EOL; + echo '

'.$row['rating'].' Star Employer

'.PHP_EOL; ?>

Pays $

[...]

diff --git a/dash/header.php b/dash/header.php index d854074..08a9bfc 100644 --- a/dash/header.php +++ b/dash/header.php @@ -15,7 +15,10 @@ $db = new bdb(); - + +
-

$5/Ad

+

FREE

Save Some Money

-- cgit v1.2.3