summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/pages/user_shifts.php6
-rw-r--r--public/pic/icons/bin.pngbin0 -> 268 bytes
2 files changed, 6 insertions, 0 deletions
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index 235208b9..7fb8ebe6 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -204,6 +204,12 @@ function user_shifts() {
header("Location: " . page_link_to('user_shifts'));
}
+ // Another shift the user is signed up for collides with this one
+ if(!in_array('user_shifts_admin', $privileges) && sql_num_query("SELECT `Shifts`.`SID` FROM `Shifts` INNER JOIN `ShiftEntry` ON (`Shifts`.`SID` = `ShiftEntry`.`SID` AND `ShiftEntry`.`UID` = " . sql_escape($user['UID']) . ") WHERE `start` < '" . sql_escape($shift['end']) . "' AND `end` > '" . sql_escape($shift['start']) . "'") > 0) {
+ error("Du bist bereits in einer parallelen Schicht eingetragen. Bitte kontaktiere den Schichtkoordinator, um dich eintragen zu lassen.");
+ header("Location: " . page_link_to('user_shifts'));
+ }
+
if (in_array('user_shifts_admin', $privileges))
$type = sql_select("SELECT * FROM `AngelTypes` WHERE `id`=" . sql_escape($type_id) . " LIMIT 1");
else
diff --git a/public/pic/icons/bin.png b/public/pic/icons/bin.png
new file mode 100644
index 00000000..f5b829e3
--- /dev/null
+++ b/public/pic/icons/bin.png
Binary files differ