/**
  * 
  */
 public function indexAction()
 {
     $grid_type = $this->_getParam('t', sapp_Global::_encrypt('1'));
     $repModel = new Default_Model_Servicerequests();
     $currmonth = $repModel->currentMonthYear();
     $currmonth = $currmonth['thismonth'];
     if ($this->getRequest()->getPost()) {
         $hid_status = $this->_getParam('hid_status', null);
         $currmonth = $this->_getParam('monyy', null);
     }
     $SDcountStr = $SDClosedcountStr = $daysStr = '';
     /**  Opended tickets per day * */
     $sdOpenTickets = $repModel->getSDOpenTickets($currmonth);
     if ($sdOpenTickets) {
         $k = 0;
         for ($i = 0; $i < sizeof($sdOpenTickets); $i++) {
             if ($sdOpenTickets[$i]['cnt'] == 0) {
                 $k++;
             }
             $SDcountStr .= $sdOpenTickets[$i]['cnt'];
             $daysStr .= $sdOpenTickets[$i]['logindate'];
             if ($i < sizeof($sdOpenTickets) - 1) {
                 $SDcountStr .= ',';
                 $daysStr .= ',';
             }
         }
         if ($k == count($sdOpenTickets)) {
             $SDcountStr = $daysStr = "";
         }
     }
     /**  Closed tickets per day * */
     $sdClosedTickets = $repModel->getSDClosedTickets($currmonth);
     if ($sdClosedTickets) {
         $k = 0;
         for ($i = 0; $i < sizeof($sdClosedTickets); $i++) {
             if ($sdClosedTickets[$i]['cnt'] == 0) {
                 $k++;
             }
             $SDClosedcountStr .= $sdClosedTickets[$i]['cnt'];
             if ($i < sizeof($sdOpenTickets) - 1) {
                 $SDClosedcountStr .= ',';
             }
         }
         if ($k == count($SDClosedcountStr)) {
             $SDClosedcountStr = "";
         }
     }
     $this->view->SDOpenCloseGrid = $this->ConvertArrayToGrid("ServiceDesk Open-Closed Tickets", $repModel->getSDOpenClosedTickets($currmonth));
     $this->view->SDMonthYear = $repModel->getSDMonthYear();
     $this->view->currentMonthYear = $currmonth;
     $this->view->SDcountStr = $SDcountStr;
     $this->view->SDClosedcountStr = $SDClosedcountStr;
     $this->view->daysStr = $daysStr;
     $this->view->grid_type = $grid_type;
     $this->view->messages = $this->_helper->flashMessenger->getMessages();
 }