From 304af8e8f015ac896ad0683c6407a3269e981d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Tue, 11 Oct 2011 19:47:49 +0200 Subject: [PATCH] #27 ical export, beginn --- db/update.sql | 14 +++++++++++++ includes/pages/user_ical.php | 34 ++++++++++++++++++++++++++++++++ includes/pages/user_myshifts.php | 3 ++- public/index.php | 6 +++++- 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 db/update.sql create mode 100644 includes/pages/user_ical.php diff --git a/db/update.sql b/db/update.sql new file mode 100644 index 00000000..c2ebf441 --- /dev/null +++ b/db/update.sql @@ -0,0 +1,14 @@ +/* Update für #27, iCal-Export */ +ALTER TABLE `User` ADD `ical_key` VARCHAR( 32 ) NOT NULL , +ADD UNIQUE ( +`ical_key` +); + +INSERT INTO `engelsystem`.`Privileges` ( +`id` , +`name` , +`desc` +) +VALUES ( +NULL , 'ical', 'iCal Schicht Export' +); \ No newline at end of file diff --git a/includes/pages/user_ical.php b/includes/pages/user_ical.php new file mode 100644 index 00000000..181a7781 --- /dev/null +++ b/includes/pages/user_ical.php @@ -0,0 +1,34 @@ + diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index 4dc4cc81..60c5bba0 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -1,7 +1,7 @@ $shift['end']) diff --git a/public/index.php b/public/index.php index 2a5a273b..1a58852b 100644 --- a/public/index.php +++ b/public/index.php @@ -34,8 +34,12 @@ if (isset ($_REQUEST['p']) && preg_match("/^[a-z0-9_]*$/i", $_REQUEST['p']) && s $title = Get_Text($p); $content = ""; +if ($p == "ical") { + require_once ('includes/pages/user_ical.php'); + user_ical(); +} // Recht dafür vorhanden? -if (in_array($p, $privileges)) { +elseif (in_array($p, $privileges)) { if ($p == "news") { require_once ('includes/pages/user_news.php'); $content = user_news();