From 3bfe03a6f6136947eb8b9c714306d080ce889af7 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Tue, 28 Feb 2017 16:21:33 -0500 Subject: Omitted uimg uploads from the git repo --- dash/css/dash.css | 2 +- dash/dash_functions.php | 4 +++- dash/settings.php | 15 ++++++++++++--- dash/uimg/1.png | Bin 21047 -> 0 bytes 4 files changed, 16 insertions(+), 5 deletions(-) delete mode 100644 dash/uimg/1.png (limited to 'dash') diff --git a/dash/css/dash.css b/dash/css/dash.css index 4bc22a2..02fed66 100644 --- a/dash/css/dash.css +++ b/dash/css/dash.css @@ -238,7 +238,7 @@ h3 a:hover, h4 a:hover { } #fulljob.fjsettings { margin: 2em auto 0 auto; - height: 455px; + height: 520px; border-radius: 5px; } .fjsettings #fjbody { diff --git a/dash/dash_functions.php b/dash/dash_functions.php index 334d253..2d01973 100644 --- a/dash/dash_functions.php +++ b/dash/dash_functions.php @@ -59,10 +59,12 @@ function draw_ad ($row) { function app_trigger ($responseid) { global $db; - $result = $db->query('SELECT responses.id, responses.uid AS seeker, responses.adid, responses.comment, ads.title, users.name, users.email FROM responses INNER JOIN ads ON responses.adid = ads.id INNER JOIN users ON ads.uid = users.id WHERE responses.id = '.$responseid.' LIMIT 1') or dash_fatal($db->error); + $result = $db->query('SELECT responses.id, responses.uid AS seeker, responses.adid, responses.comment, ads.title, users.name, users.email, users.notify FROM responses INNER JOIN ads ON responses.adid = ads.id INNER JOIN users ON ads.uid = users.id WHERE responses.id = '.$responseid.' LIMIT 1') or dash_fatal($db->error); if ($result->num_rows < 1) dash_fatal('The ad you\'ve tried to apply to no longer exists.'); $appinfo = $result->fetch_assoc(); $result->free(); + if (!$appinfo['notify']) return; + $result = $db->query('SELECT users.name, users.email, SUM(ratings.stars) / COUNT(ratings.stars) AS rating FROM users LEFT JOIN ratings ON ratings.rated = users.id') or dash_fatal($db->error); $uinfo = $result->fetch_assoc(); $result->free(); diff --git a/dash/settings.php b/dash/settings.php index c17a6dd..b27122d 100644 --- a/dash/settings.php +++ b/dash/settings.php @@ -5,7 +5,7 @@ require('dash_common.php'); global $b_config, $b_user; $title = 'Account Settings / Bulletin'; require('header.php'); -if (!empty($_POST['oldpass'])) { +if (!empty($_POST['change'])) { if ($b_user['password'] != hash('sha512', $_POST['oldpass'])) dash_fatal('The password you entered does not match your current password.'); if (!empty($_POST['newpass1'])) { if ($_POST['newpass1'] != $_POST['newpass2']) dash_fatal('Your new passwords do not match.'); @@ -20,12 +20,17 @@ if (!empty($_POST['oldpass'])) { $db->query('UPDATE users SET type = \''.$type.'\' WHERE id = '.$b_user['id']) or dash_fatal($db->error); if ($db->affected_rows < 1) dash_fatal('Your account type could not be changed.'); } - dash_fatal('Account settings successfully updated.'); + + if ($_POST['notif'] != $b_user['notify']) { + $notif = is_null($_POST['notif']) ? '0' : '1'; + $db->query('UPDATE users SET notify = '.$notif.' WHERE id = '.$b_user['id']) or dash_fatal($db->error); + } + dash_fatal('Account settings successfully updated.', $b_config['base_url'].'dash/settings.php'); } ?>
-

Account Settings

+

Account Settings

Adjusting for

@@ -49,6 +54,10 @@ if (!empty($_POST['oldpass'])) {

+
+

Email Notifications

+

/>

+

diff --git a/dash/uimg/1.png b/dash/uimg/1.png deleted file mode 100644 index 0bef227..0000000 Binary files a/dash/uimg/1.png and /dev/null differ -- cgit v1.2.3