public function viewAction() { if (defined('EMPTABCONFIGS')) { $empOrganizationTabs = explode(",", EMPTABCONFIGS); if (in_array('experience_details', $empOrganizationTabs)) { $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { $loginUserId = $auth->getStorage()->read()->id; $loginUserRole = $auth->getStorage()->read()->emprole; $loginUserGroup = $auth->getStorage()->read()->group_id; } $objName = 'experiencedetails'; $conText = ""; $userid = $this->getRequest()->getParam('userid'); $call = $this->_getParam('call'); if ($call == 'ajaxcall') { $this->_helper->layout->disableLayout(); $userID = $this->_getParam('unitId') != '' ? $this->_getParam('unitId') : $this->_getParam('userid'); $conText = $this->_getParam('context') != '' ? $this->_getParam('context') : $this->getRequest()->getParam('context'); } if ($userid == '') { $userid = $userID; } $Uid = $userid ? $userid : $userID; $experiencedetailsModel = new Default_Model_Experiencedetails(); $employeeModal = new Default_Model_Employee(); try { if ($Uid && is_numeric($Uid) && $Uid > 0 && $Uid != $loginUserId) { $empdata = $employeeModal->getsingleEmployeeData($Uid); if ($empdata == 'norows') { $this->view->rowexist = "norows"; $this->view->empdata = ""; } else { $this->view->rowexist = "rows"; if (!empty($empdata)) { $view = Zend_Layout::getMvcInstance()->getView(); $objname = $this->_getParam('objname'); $refresh = $this->_getParam('refresh'); $dashboardcall = $this->_getParam('dashboardcall', null); $data = array(); $searchQuery = ''; $searchArray = array(); $tablecontent = ''; if ($refresh == 'refresh') { if ($dashboardcall == 'Yes') { $perPage = DASHBOARD_PERPAGE; } else { $perPage = PERPAGE; } $sort = 'DESC'; $by = 'modifieddate'; $pageNo = 1; $searchData = ''; $searchQuery = ''; $searchArray = ''; } else { $sort = $this->_getParam('sort') != '' ? $this->_getParam('sort') : 'DESC'; $by = $this->_getParam('by') != '' ? $this->_getParam('by') : 'modifieddate'; if ($dashboardcall == 'Yes') { $perPage = $this->_getParam('per_page', DASHBOARD_PERPAGE); } else { $perPage = $this->_getParam('per_page', PERPAGE); } $pageNo = $this->_getParam('page', 1); $searchData = $this->_getParam('searchData'); $searchData = rtrim($searchData, ','); } $dataTmp = $experiencedetailsModel->getGrid($sort, $by, $pageNo, $perPage, $searchData, $call, $dashboardcall, $Uid, $conText); array_push($data, $dataTmp); $this->view->id = $userid; //User_id sending to view for tabs navigation.... $this->view->controllername = $objName; $this->view->dataArray = $data; $this->view->call = $call; $this->view->employeedata = $empdata[0]; $this->view->messages = $this->_helper->flashMessenger->getMessages(); } $this->view->empdata = $empdata; } } else { $this->view->rowexist = "norows"; } } catch (Exception $e) { $this->view->rowexist = "norows"; } } else { $this->_redirect('error'); } } else { $this->_redirect('error'); } }