summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorroot <root@www.engelsystem.de>2011-08-13 14:37:54 +0200
committerroot <root@www.engelsystem.de>2011-08-13 14:37:54 +0200
commit28b50acb88292392be2913be9df3e975829bb1dc (patch)
tree7cccf5dc898d840659efc3f8f823f89f0e9fd0bb /includes
parentc3a9e66c323035d989aca0e4ded08df7f86bbd32 (diff)
user_shifts: 15 freie noch kommende schichten anzeigen (und nicht bereits vergangene)
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/user_shifts.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index f4542703..3c05725e 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -89,7 +89,7 @@ function user_shifts() {
$day_timestamp = DateTime :: createFromFormat("Y-m-d-Hi", $day . "-0000")->getTimestamp();
if ($id == 0)
- $shifts = sql_select("SELECT * FROM `Shifts` JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) ORDER BY `start`");
+ $shifts = sql_select("SELECT * FROM `Shifts` JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) WHERE `start` > " . sql_escape(time()) . " ORDER BY `start`");
else
$shifts = sql_select("SELECT * FROM `Shifts` WHERE `RID`=" . sql_escape($id) . " AND `start` >= " . sql_escape($day_timestamp) . " AND `start` < " . sql_escape($day_timestamp +24 * 60 * 60) . " ORDER BY `start`");
@@ -160,4 +160,4 @@ function make_room_select($rooms, $id, $day) {
$html[] = '<a href="' . page_link_to('user_shifts') . '&room_id=0">Next 15 free shifts</a>';
return join(' | ', $html);
}
-?> \ No newline at end of file
+?>