コード例 #1
0
 public function viewpopupAction()
 {
     Zend_Layout::getMvcInstance()->setLayoutPath(APPLICATION_PATH . "/layouts/scripts/popup/");
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $this->getRequest()->getParam('id');
     $idData = $this->getRequest()->getParam('unitId');
     $idArr = array();
     $idArr = explode('-', $idData);
     $specimen_id = $idArr[0];
     $userflag = $idArr[1];
     $statusFlag = '';
     $useridsArr = array();
     $usernamesArr = array();
     $usernames = '';
     $processesform = new Default_Form_processes();
     $processesmodel = new Default_Model_Processes();
     $commentsModel = new Default_Model_Comments();
     $commentsData = $commentsModel->getComments($id);
     $j = 0;
     for ($i = 0; $i < sizeof($commentsData); $i++) {
         if (!in_array($commentsData[$i]['from_id'], $useridsArr)) {
             $useridsArr[$j] = $commentsData[$i]['from_id'];
             $j++;
         }
     }
     $userids = implode(',', $useridsArr);
     if ($userids != '') {
         $usernamesArr = $commentsModel->getuserNames($userids);
     }
     for ($i = 0; $i < sizeof($usernamesArr); $i++) {
         $usernames[$usernamesArr[$i]['id']] = $usernamesArr[$i]['userfullname'];
     }
     $elements = $processesform->getElements();
     if (count($elements) > 0) {
         foreach ($elements as $key => $element) {
             if ($key != "Cancel" && $key != "Edit" && $key != "Delete" && $key != "Attachments") {
                 $element->setAttrib("disabled", "disabled");
             }
         }
     }
     $processdata = $processesmodel->getsinglecheckDetailData($id);
     if (!empty($processdata)) {
         $processesform->setDefault('process_status', $processdata[0]['process_status']);
     }
     if ($specimen_id == $loginUserId) {
         $displaymsg = 'nodata';
     } else {
         $displaymsg = '';
     }
     $this->view->displaymsg = $displaymsg;
     $this->view->processdata = $processdata;
     $this->view->commentsData = $commentsData;
     $this->view->usernames = $usernames;
     $this->view->form = $processesform;
     $this->view->loginuserid = $loginUserId;
 }
コード例 #2
0
 public function processesGrid($id, $empstatus = '')
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $dashboardcall = $this->_getParam('dashboardcall');
     if ($dashboardcall == 'Yes') {
         $perPage = DASHBOARD_PERPAGE;
     } else {
         $perPage = PERPAGE;
     }
     $empscreeningModel = new Default_Model_Processes();
     $sort = 'DESC';
     $by = 'b.modifieddate';
     $pageNo = 1;
     $searchData = '';
     $searchArray = array();
     $objName = 'processes';
     $tableFields = array('action' => 'Action', 'type' => 'Check Type', 'agencyname' => 'Agency Name', 'email' => 'POC Email', 'process_status' => 'Process Status', 'explanation' => 'Explanation', 'isactive' => 'Active Status', 'startdate' => 'Started On', 'enddate' => 'Ended On', 'recentlycommenteddate' => 'Recently Commented On');
     $tablecontent = $empscreeningModel->getProcessesData($sort, $by, $pageNo, $perPage, '', $id, $loginUserId, $loginuserGroup);
     $data = array();
     $dataTmp = array('sort' => $sort, 'by' => $by, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent, 'objectname' => $objName, 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getAjaxgridData', 'jsFillFnName' => '', 'searchArray' => $searchArray, 'formgrid' => 'true', 'menuName' => 'Background check Process', 'add' => 'add', 'dashboardcall' => $dashboardcall, 'unitId' => $id, 'empstatus' => $empstatus, 'search_filters' => array('isactive' => array('type' => 'select', 'filter_data' => array('' => 'All', 1 => 'Active', '2' => 'Agency deleted', '3' => 'Agency User deleted', '4' => 'POC deleted', 0 => 'Process deleted')), 'startdate' => array('type' => 'datepicker'), 'enddate' => array('type' => 'datepicker'), 'recentlycommenteddate' => array('type' => 'datepicker')));
     array_push($data, $dataTmp);
     return $data;
 }