コード例 #1
0
 /**
  * 
  */
 public function viewpopupAction()
 {
     $id = $this->getRequest()->getParam('id');
     $call = $this->getRequest()->getParam('call');
     if ($call == 'ajaxcall') {
         Zend_Layout::getMvcInstance()->setLayoutPath(APPLICATION_PATH . "/layouts/scripts/popup/");
     }
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $data = array();
     $jobtitle = '';
     $requi_model = new Default_Model_Requisition();
     $jobtitleModel = new Default_Model_Jobtitles();
     $user_model = new Default_Model_Usermanagement();
     try {
         $data = $requi_model->getReqDataForView($id);
         $getempId = $requi_model->getrequisitionDataonid($id);
         $getdatampname = $requi_model->getEmployeeNameonId($getempId['billable_empname']);
     } catch (Exception $e) {
         $this->view->ermsg = 'nodata';
     }
     if (!empty($data)) {
         $data = $data[0];
         $data['jobtitlename'] = '';
         $data['businessunit_name'] = $data['businessunit_name'];
         $data['dept_name'] = $data['department_name'];
         $data['titlename'] = $data['jobtitle_name'];
         $data['posname'] = $data['position_name'];
         $data['empttype'] = $data['emp_type_name'];
         $data['mngrname'] = $data['reporting_manager_name'];
         $data['raisedby'] = $data['createdby_name'];
         $data['app1_name'] = $data['approver1_name'];
         if ($data['approver2'] != '') {
             $data['app2_name'] = $data['approver2_name'];
         } else {
             $data['app2_name'] = 'No Approver';
         }
         if ($data['approver3'] != '') {
             $data['app3_name'] = $data['approver3_name'];
         } else {
             $data['app3_name'] = 'No Approver';
         }
         foreach ($data as $key => $val) {
             $data[$key] = htmlentities($val, ENT_QUOTES, "UTF-8");
         }
         $data['onboard_date'] = sapp_Global::change_date($data['onboard_date'], 'view');
         $data['req_skills'] = $requi_model->getRequsitionSkills($id);
         $this->view->data = $data;
         $this->view->ermsg = '';
     } else {
         $this->view->ermsg = 'nodata';
     }
 }