Example #1
0
}
// redirect if no create ticket right
if (!Session::haveRight('ticket', CREATE) && !Session::haveRight('reminder_public', READ) && !Session::haveRight("rssfeed_public", READ)) {
    if (Session::haveRight('followup', TicketFollowup::SEEPUBLIC) || Session::haveRight('task', TicketTask::SEEPUBLIC) || Session::haveRightsOr('ticketvalidation', array(TicketValidation::VALIDATEREQUEST, TicketValidation::VALIDATEINCIDENT))) {
        Html::redirect($CFG_GLPI['root_doc'] . "/front/ticket.php");
    } else {
        if (Session::haveRight('reservation', ReservationItem::RESERVEANITEM)) {
            Html::redirect($CFG_GLPI['root_doc'] . "/front/reservationitem.php");
        } else {
            if (Session::haveRight('knowbase', KnowbaseItem::READFAQ)) {
                Html::redirect($CFG_GLPI['root_doc'] . "/front/helpdesk.faq.php");
            }
        }
    }
}
Session::checkHelpdeskAccess();
if (isset($_GET['create_ticket'])) {
    Html::helpHeader(__('New ticket'), $_SERVER['PHP_SELF'], $_SESSION["glpiname"]);
    $ticket = new Ticket();
    $ticket->showFormHelpdesk(Session::getLoginUserID());
} else {
    Html::helpHeader(__('Home'), $_SERVER['PHP_SELF'], $_SESSION["glpiname"]);
    echo "<table class='tab_cadre_postonly'><tr class='noHover'>";
    echo "<td class='top' width='50%'><br>";
    echo "<table class='central'>";
    if (Session::haveRight('ticket', CREATE)) {
        echo "<tr class='noHover'><td class='top'>";
        Ticket::showCentralCount(true);
        echo "</td></tr>";
        echo "<tr class='noHover'><td class='top'>";
        Ticket::showCentralList(0, "survey", false);