From c174aab40b9f02be557593fa45acdd53ac991e94 Mon Sep 17 00:00:00 2001 From: azammitdcarf Date: Wed, 27 Jan 2010 00:24:50 +0000 Subject: [PATCH] Added error message when not an operator and trying to add a shift --- admin/addshift.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/admin/addshift.php b/admin/addshift.php index 0c34f3dd..008a894a 100644 --- a/admin/addshift.php +++ b/admin/addshift.php @@ -82,6 +82,14 @@ $woy = $y['y']; $operator_id = get_operator_id(); +if (!$operator_id) +{ + xhtml_head(T_("Add shifts")); + print "

" . T_("You must be an operator (as well as have administrator access) to add/edit shifts") . "

"; + xhtml_foot(); + exit(); +} + if (isset($_POST['submit'])) {