From e079a930d2797d9e94cc2e1848e4634c43adb6ba Mon Sep 17 00:00:00 2001
From: Carson Fleming
Date: Wed, 12 Apr 2017 17:03:36 -0400
Subject: Finished up Reed\'s suggestions
---
dash/ads.php | 40 +++++++++++++++++++-----------------
dash/apply.php | 6 +++---
dash/css/dash.css | 53 ++++++++++++++++++++++++++++++++++++++++++------
dash/css/post.css | 2 +-
dash/css/profile.css | 37 ++++++++++++++++++++++++++++++++-
dash/dash_functions.php | 2 +-
dash/img/0.jpg | Bin 1541956 -> 836481 bytes
dash/profile.php | 24 ++++++++++++++++++++++
8 files changed, 133 insertions(+), 31 deletions(-)
diff --git a/dash/ads.php b/dash/ads.php
index 6878456..7c365ff 100644
--- a/dash/ads.php
+++ b/dash/ads.php
@@ -6,7 +6,7 @@ $adid = intval($_GET['id']);
if ($adid < 1) fatal('No ad ID has been provided. You must have reached this page in error.');
$title = 'Ad / Bulletin';
require('header.php');
-$result = $db->query('SELECT ads.id, ads.uid, 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.' GROUP BY ads.id LIMIT 1') or dash_fatal($db->error);
+$result = $db->query('SELECT ads.id, ads.uid, ads.title, ads.pay, ads.time, ads.location, ads.description, ads.closed, categories.cat_name, 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 LEFT JOIN categories ON categories.id = ads.cat WHERE ads.id = '.$adid.' GROUP BY ads.id 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();
@@ -17,12 +17,7 @@ if ($b_user['type'] == 'EMPLOYER' && $b_user['id'] == $row['uid']) echo '
?>
-
-
=htmlentities($row['description']);?>
+
=is_null($row['cat_name']) ? 'Uncategorized' : htmlentities($row['cat_name']);?>
+
+
Job Description
+
=htmlentities($row['description']);?>
+
+ Apply Now
+
+
query('SELECT id FROM responses WHERE adid = '.$adid.' AND uid = '.$b_user['id'].' LIMIT 1') or dash_fatal($db->error);
+ $result = $db->query('SELECT id FROM responses WHERE adid = '.$adid.' AND (uid = '.$b_user['id'].' OR matched = 1) LIMIT 1') or dash_fatal($db->error);
if ($result->num_rows > 0) {
$result->free();
- dash_fatal('You have already applied to this ad!', $b_config['base_url'].'dash/');
+ dash_fatal('You have already applied to this ad or the provider has already selected someone for the task!', $b_config['base_url'].'dash/');
}
$result->free();
$db->query('INSERT INTO responses (adid, uid, comment) VALUES ('.$adid.', '.$b_user['id'].', \''.$db->escape_string($_POST['comments']).'\')') or dash_fatal($db->error);
@@ -48,7 +48,7 @@ else
diff --git a/dash/css/dash.css b/dash/css/dash.css
index 5af19f1..9d854d1 100644
--- a/dash/css/dash.css
+++ b/dash/css/dash.css
@@ -105,6 +105,7 @@ body {
text-align: center;
font-size: 10pt;
margin: 0.33em 0;
+ color: #eeeeee;
}
.job p, .job h1 {
margin: 0;
@@ -183,11 +184,16 @@ body {
}
#fjheader {
text-align: center;
+ padding-bottom: 1em;
+ border-bottom: 1px solid #eeeeee;
margin-bottom: 1em;
}
#fjheader p, #fjheader h3 {
margin: 0;
}
+#fjhtitle {
+ font-size: 18pt;
+}
h3 a, h4 a {
color: #000000 !important;
text-decoration: none;
@@ -197,7 +203,6 @@ h3 a:hover, h4 a:hover {
text-decoration: none;
}
#fjbody {
- border-top: 1px solid #eeeeee;
border-bottom: 1px solid #eeeeee;
text-align: center;
}
@@ -207,12 +212,15 @@ h3 a:hover, h4 a:hover {
#fjfooter h4 {
margin: 1em 0 0 0;
}
+#fjfleft h4 {
+ text-align: center;
+}
#fjfooter p {
margin: 0;
}
#fjfleft {
float: left;
- margin-right: 0.5em;
+ margin-right: 3em;
}
#fjfleft img {
margin-bottom: 0.5em;
@@ -221,15 +229,20 @@ h3 a:hover, h4 a:hover {
}
#fjfleft p {
margin: 0;
- font-size: 14pt;
text-align: center;
}
+#fjfleft #ename {
+ font-size: 14pt;
+}
#ename a, #ename a:hover {
color: #000000 !important;
font-weight: bold;
}
#fjfright {
- text-align: center;
+ text-align: left;
+}
+#fjfright h4 {
+ font-size: 14pt;
}
#fulljob a, .errbox a {
text-decoration: none;
@@ -249,7 +262,7 @@ h3 a:hover, h4 a:hover {
border-radius: 5px;
}
.fjsettings #fjbody {
- padding: 1em 0 0.75em 0;
+ padding: 0 0 0.75em 0;
}
.fjsettings #fjbody h4 {
margin: 0 auto 0.25em auto;
@@ -292,7 +305,7 @@ h3 a:hover, h4 a:hover {
cursor: pointer;
}
.fjsettings input[type=submit]:hover {
- background-color: #fb7700;
+ box-shadow: 0px 0px 5px rgba(0,0,0,0.75);
}
.fjsettings textarea {
margin: 0.5em auto;
@@ -372,6 +385,9 @@ h3 a:hover, h4 a:hover {
color: #000000;
margin-left: 10px;
}
+#viewform p {
+ color: #eeeeee;
+}
.adtrash {
display: block;
width: 32px;
@@ -407,3 +423,28 @@ h3 a:hover, h4 a:hover {
background-image: url('../img/star_given.png');
background-size: contain;
}
+#eapply {
+ margin: 1.5em 0 0 0;
+}
+#eapply a {
+ background-color: #fb4d00;
+ color: #ffffff;
+ padding: 10px 10px 8px;
+ border-style: none;
+ border-radius: 10px;
+ cursor: pointer;
+ font-size: 12pt;
+}
+#eapply a:hover {
+ color: #ffffff;
+ box-shadow: 0px 0px 5px rgba(0,0,0,0.75);
+}
+#fjdesc {
+ border-top: 1px solid #eeeeee;
+ border-bottom: 1px solid #eeeeee;
+ margin: 1em 0;
+ padding: 1em 0;
+}
+#fjdesc p, #fjdesc h4 {
+ margin: 0;
+}
diff --git a/dash/css/post.css b/dash/css/post.css
index 378c439..fb2a2ce 100644
--- a/dash/css/post.css
+++ b/dash/css/post.css
@@ -25,7 +25,7 @@
cursor: pointer;
}
#postform input[type=submit]:hover, #postform input[type=button]:hover, #postform button:hover {
- background-color: #fb7700;
+ box-shadow: 0px 0px 5px rgba(0,0,0,0.75);
}
#postform textarea {
margin: 0.25em auto;
diff --git a/dash/css/profile.css b/dash/css/profile.css
index 1e55991..36abcbd 100644
--- a/dash/css/profile.css
+++ b/dash/css/profile.css
@@ -33,7 +33,7 @@
cursor: pointer;
}
#profile input[type=submit]:hover, #profile input[type=button]:hover, #profile button:hover {
- background-color: #fb7700;
+ box-shadow: 0px 0px 5px rgba(0,0,0,0.75);
}
#profile textarea {
margin: 0.25em auto;
@@ -94,3 +94,38 @@
#profile a:hover {
color: #fb7700;
}
+#proreviews {
+ text-align: center;
+ border-top: 1px solid #eeeeee;
+ padding-top: 1em;
+}
+.review {
+ text-align: left;
+ margin: 1em;
+}
+#profile .revname a, #profile .revname a:hover {
+ color: #000000;
+ font-weight: bold;
+}
+.revpic img {
+ width: 64px;
+ height: 64px;
+}
+#profile .revjob a, #profile .revjob a:hover {
+ color: #000000;
+ font-style: italic;
+}
+.reviewleft {
+ float: left;
+ clear: both;
+ width: 156px;
+ word-break: break-word;
+ overflow-x: hidden;
+ margin-right: 1em;
+}
+.reviewright {
+ min-height: 108px;
+}
+#proreviews .revstars {
+ margin-bottom: 0.5em;
+}
diff --git a/dash/dash_functions.php b/dash/dash_functions.php
index 7fa9c3e..5497ce9 100644
--- a/dash/dash_functions.php
+++ b/dash/dash_functions.php
@@ -67,7 +67,7 @@ function draw_rate ($row, $review) {
?>
=rating_format($review['stars'], typestr($row['type']));?>
-
+
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()) {
+?>
+
+
+
+
=rating_format($row['stars'], ' Review');?>
+
+
+
+free();
+?>
+