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();