Exemple #1
0
                        }
                    }
                    // 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'], "helpdesk", "planning");
        Session::haveRightsOr('planning', array(Planning::READALL, Planning::READMY));
        if (!isset($_GET["date"]) || empty($_GET["date"])) {
            $_GET["date"] = strftime("%Y-%m-%d");
        }
        if (!isset($_GET["type"])) {
            $_GET["type"] = "week";
        }
        $planning = new Planning();
        $planning->display($_GET);
        Html::footer();
    }
}