showCentralCount() static public method

Get tickets count
static public showCentralCount ( $foruser = false )
$foruser boolean : only for current login user as requester (false by default)
Esempio n. 1
0
 /**
  * Show the central global view
  **/
 static function showGlobalView()
 {
     $showticket = haveRight("show_all_ticket", "1");
     echo "<table class='tab_cadre_central'><tr>";
     echo "<td class='top'><br>";
     echo "<table >";
     if ($showticket) {
         echo "<tr><td class='top' width='450px'>";
         Ticket::showCentralCount();
         echo "</td></tr>";
     }
     if (haveRight("contract", "r")) {
         echo "<tr><td class='top' width='450px'>";
         Contract::showCentral();
         echo "</td></tr>";
     }
     echo "</table></td>";
     if (haveRight("logs", "r")) {
         echo "<td class='top' width='450px'>";
         //Show last add events
         Event::showForUser($_SESSION["glpiname"]);
         echo "</td>";
     }
     echo "</tr></table>";
     if ($_SESSION["glpishow_jobs_at_login"] && $showticket) {
         echo "<br>";
         Ticket::showCentralNewList();
     }
 }
Esempio n. 2
0
        }
    }
}
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);
        echo "</td></tr>";
    }
    if (Session::haveRight("reminder_public", READ)) {
        echo "<tr class='noHover'><td class='top'>";
        Reminder::showListForCentral(false);
        echo "</td></tr>";
    }
    if (Session::haveRight("rssfeed_public", READ)) {
        echo "<tr class='noHover'><td class='top'>";
        RSSFeed::showListForCentral(false);
        echo "</td></tr>";
    }
Esempio n. 3
0
 /**
  * Show the central global view
  **/
 static function showGlobalView()
 {
     $showticket = Session::haveRight("ticket", Ticket::READALL);
     $showproblem = Session::haveRight("problem", Problem::READALL);
     echo "<table class='tab_cadre_central'><tr class='noHover'>";
     echo "<td class='top' width='50%'>";
     echo "<table class='central'>";
     echo "<tr class='noHover'><td>";
     if ($showticket) {
         Ticket::showCentralCount();
     }
     if ($showproblem) {
         Problem::showCentralCount();
     }
     if (Contract::canView()) {
         Contract::showCentral();
     }
     echo "</td></tr>";
     echo "</table></td>";
     if (Session::haveRight("logs", READ)) {
         echo "<td class='top'  width='50%'>";
         //Show last add events
         Event::showForUser($_SESSION["glpiname"]);
         echo "</td>";
     }
     echo "</tr></table>";
     if ($_SESSION["glpishow_jobs_at_login"] && $showticket) {
         echo "<br>";
         Ticket::showCentralNewList();
     }
 }