summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-10-05 18:56:50 +0200
committermsquare <msquare@notrademark.de>2016-10-05 18:56:50 +0200
commit6fff6a6c1a5a4ae6c6977c3aeb4ac532ba09a395 (patch)
treeb32209aa2907e34a7e52d41b6754382fa23d6151 /includes/model
parent27c9650dc4064ec5b40c5041d8291a7ce0e5305e (diff)
begin room view and shifts filter renderer
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/Shifts_model.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php
index 8c251209..6721c30e 100644
--- a/includes/model/Shifts_model.php
+++ b/includes/model/Shifts_model.php
@@ -1,6 +1,14 @@
<?php
use Engelsystem\ShiftsFilter;
+function Shifts_by_room($room) {
+ $result = sql_select("SELECT * FROM `Shifts` WHERE `RID`=" . sql_escape($room['RID']));
+ if ($result === false) {
+ engelsystem_error("Unable to load shifts.");
+ }
+ return $result;
+}
+
function Shifts_by_ShiftsFilter(ShiftsFilter $shiftsFilter, $user) {
$SQL = "SELECT DISTINCT `Shifts`.*, `ShiftTypes`.`name`, `Room`.`Name` as `room_name`, nat2.`special_needs` > 0 AS 'has_special_needs'
FROM `Shifts`