$_GET["gID"] = 0; } if (!isset($_GET["usertype"])) { $_GET["usertype"] = "user"; } switch ($_GET["usertype"]) { case "user": $_GET['gID'] = 0; break; case "group": $_GET['uID'] = 0; break; case "user_group": $_GET['gID'] = "mine"; break; } if (isset($_GET['genical'])) { Planning::generateIcal($_GET["uID"], $_GET["gID"]); } else { commonHeader($LANG['Menu'][29], $_SERVER['PHP_SELF'], "maintain", "planning"); checkSeveralRightsOr(array('show_all_planning' => '1', 'show_planning' => '1')); if (!isset($_GET["date"]) || empty($_GET["date"])) { $_GET["date"] = strftime("%Y-%m-%d"); } if (!isset($_GET["type"])) { $_GET["type"] = "week"; } Planning::showSelectionForm($_GET['type'], $_GET['date'], $_GET["usertype"], $_GET["uID"], $_GET["gID"]); Planning::show($_GET['uID'], $_GET['gID'], $_GET["date"], $_GET["type"]); commonFooter(); }
} } // Else check group if (!$canview && $_GET['gID']) { $group = new Group(); if ($group->getFromDB($_GET['gID'])) { if (in_array($group->getEntityID(), $entities)) { $canview = true; } } } } if ($ismine || $canview) { Planning::generateIcal($_GET["uID"], $_GET["gID"], $_GET["limititemtype"]); } } } } else { Html::header(__('Planning'), $_SERVER['PHP_SELF'], "maintain", "planning"); Session::checkSeveralRightsOr(array('show_all_planning' => '1', 'show_planning' => '1')); if (!isset($_GET["date"]) || empty($_GET["date"])) { $_GET["date"] = strftime("%Y-%m-%d"); } if (!isset($_GET["type"])) { $_GET["type"] = "week"; } $planning = new Planning(); $planning->show($_GET); Html::footer(); } }