本文整理汇总了PHP中sapp_Global::_decrypt方法的典型用法代码示例。如果您正苦于以下问题:PHP sapp_Global::_decrypt方法的具体用法?PHP sapp_Global::_decrypt怎么用?PHP sapp_Global::_decrypt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sapp_Global
的用法示例。
在下文中一共展示了sapp_Global::_decrypt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexAction
public function indexAction()
{
$requi_model = new Default_Model_Requisition();
$appr_model = new Default_Model_Approvedrequisitions();
$call = $this->_getParam('call');
if ($call == 'ajaxcall') {
$this->_helper->layout->disableLayout();
}
$dashboardcall = $this->_getParam('dashboardcall');
$statusidstring = $this->_request->getParam('status');
$unitId = '';
if (!isset($statusidstring) || $statusidstring == '') {
$unitId = $this->_request->getParam('unitId');
$statusidstring = $unitId;
}
$formgrid = 'true';
if (isset($unitId) && $unitId != '') {
$formgrid = 'true';
}
$statusid = sapp_Global::_decrypt($statusidstring);
$queryflag = 'Approved';
$refresh = $this->_getParam('refresh');
$data = array();
$searchQuery = '';
$searchArray = array();
$tablecontent = '';
if ($refresh == 'refresh') {
if ($dashboardcall == 'Yes') {
$perPage = DASHBOARD_PERPAGE;
} else {
$perPage = PERPAGE;
}
$sort = 'DESC';
$by = 'r.modifiedon';
$pageNo = 1;
$searchData = '';
$searchQuery = '';
$searchQuery = '';
$searchArray = '';
$searchArray = array();
} else {
$sort = $this->_getParam('sort') != '' ? $this->_getParam('sort') : 'DESC';
$by = $this->_getParam('by') != '' ? $this->_getParam('by') : 'r.modifiedon';
if ($dashboardcall == 'Yes') {
$perPage = $this->_getParam('per_page', DASHBOARD_PERPAGE);
} else {
$perPage = $this->_getParam('per_page', PERPAGE);
}
$pageNo = $this->_getParam('page', 1);
/** search from grid - START **/
$searchData = $this->_getParam('searchData');
/** search from grid - END **/
}
$dataTmp = $appr_model->getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $statusid, $a1 = '', $a2 = '', $a3 = '');
array_push($data, $dataTmp);
$this->view->dataArray = $dataTmp;
$this->view->call = $call;
$this->view->statusidstring = $statusidstring;
$this->view->messages = $this->_helper->flashMessenger->getMessages();
}
示例2: getGrid
/**
* This function gives all content for grid view.
* @param string $sort = ascending or descending
* @param string $by = name of field which to be sort
* @param integer $pageNo = page number
* @param integer $perPage = no.of records per page
* @param array $searchData = search string
* @param string $call = type of call like ajax.
* @return array Array of data.
*/
public function getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $grid_type, $status_value, $p4, $p5)
{
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
}
$status_value_arr = array(1 => 'Open', 2 => 'Closed', 3 => 'Cancelled', 4 => 'Overdue', 5 => 'Duetoday', 6 => 'To approve', 7 => 'Approved', 8 => 'Rec_pending', 9 => 'Rec_wapproval', 10 => 'Rec_toapprove', 11 => 'To approve', 12 => 'App_approved', 13 => 'To manager approve', 14 => 'Rept_approved', 15 => 'Req_pending', 16 => 'Rejected', 17 => 'Raiser_open', 18 => 'Manager approved', 19 => 'Manager rejected', 20 => 'Rec_app_approved', 21 => 'Rec_app_rejected', 22 => 'Rec_app_closed', 23 => 'To management approve', 24 => 'Management approved', 25 => 'Management rejected');
$status_search_arr = array(6 => " (status = 'To management approve' or status = 'To manager approve') ", 9 => " (status = 'To management approve' or status = 'To manager approve') ", 7 => " (status = 'Manager approved' or status = 'Management Approved' or status = 'Manager rejected' or status = 'Management Rejected') ", 8 => " (status = 'Manager approved' or status = 'Management Approved' or status = 'Manager rejected' or status = 'Management Rejected') ", 10 => " (reporting_manager_id = '" . $loginUserId . "' and status ='To manager approve') ", 12 => " (status = 'Approved' or status = 'Rejected') ", 14 => " (status = 'Manager approved' or status = 'Manager rejected') ", 15 => " (status != 'Cancelled' and status != 'Closed') ", 5 => " date_add(date(r.createddate),interval 10 day) = date(now()) ", 4 => " date_add(date(r.createddate),interval 10 day) < date(now())", 17 => " ( status not in ('Closed','Cancelled','Rejected')) ", 20 => " (status = 'Manager approved' or status = 'Management Approved') ", 21 => " (status = 'Manager rejected' or status = 'Management Rejected')", 22 => " (status = 'Closed' or status = 'Rejected')");
$grid_type_arr = $this->getGridtypearr();
$grid_type = sapp_Global::_decrypt($grid_type);
$status_value = sapp_Global::_decrypt($status_value);
$searchQuery = '';
$searchArray = array();
if ($searchData != '' && $searchData != 'undefined') {
$searchValues = json_decode($searchData);
if (count($searchValues) > 0) {
foreach ($searchValues as $key => $val) {
if ($key == 'createddate') {
$searchQuery .= " date(" . $key . ") = '" . sapp_Global::change_date($val, 'database') . "' AND ";
} else {
$searchQuery .= " " . $key . " like '%" . $val . "%' AND ";
}
$searchArray[$key] = $val;
}
$searchQuery = rtrim($searchQuery, " AND");
}
}
if (is_numeric($status_value) && $status_value > 0 && array_key_exists($status_value, $status_value_arr)) {
if (!array_key_exists($status_value, $status_search_arr)) {
$newsearchQuery = " status = '" . $status_value_arr[$status_value] . "'";
} else {
$newsearchQuery = $status_search_arr[$status_value];
}
if ($searchQuery != '') {
$searchQuery .= " and " . $newsearchQuery;
} else {
$searchQuery .= $newsearchQuery;
}
}
$objName = 'servicerequests';
$tableFields = array('action' => 'Action', 'ticket_number' => 'Ticket#', 'service_desk_name' => 'Category', 'service_request_name' => 'Request Type', 'priority' => 'Priority', 'description' => 'Description', 'raised_by_name' => 'Raised By', 'createddate' => 'Raised On', 'status' => 'Status');
if ($status_value != '') {
unset($tableFields['status']);
}
$bool_arr = array('' => 'All', 1 => 'Low', 2 => 'Medium', 3 => 'High');
$tablecontent = $this->getRequestData($sort, $by, $pageNo, $perPage, $searchQuery, $grid_type, $status_value);
$menu_name_arr = $this->getServicemenunames();
$menuName = $menu_name_arr[$grid_type];
$dataTmp = array('sort' => $sort, 'by' => $by, 'menuName' => $menuName, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent['table_content'], 'row_count' => $tablecontent['count'], 'objectname' => $objName, 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getAjaxgridData', 'jsFillFnName' => '', 'searchArray' => $searchArray, 'call' => $call, 'grid_type' => $grid_type, 'status_value' => $status_value, 'view_link' => BASE_URL . 'servicerequests/view/id/{{id}}/t/' . sapp_Global::_encrypt($grid_type) . ($status_value != '' ? "/v/" . sapp_Global::_encrypt($status_value) : ""), 'add_link' => BASE_URL . 'servicerequests/add/t/' . sapp_Global::_encrypt($grid_type) . ($status_value != '' ? "/v/" . sapp_Global::_encrypt($status_value) : ""), 'dashboardcall' => $dashboardcall, 'search_filters' => array('priority' => array('type' => 'select', 'filter_data' => $bool_arr), 'createddate' => array('type' => 'datepicker')));
if ($grid_type_arr[$grid_type] == 'request') {
$dataTmp['add'] = 'add';
}
return $dataTmp;
}
示例3: confmanagersAction
public function confmanagersAction()
{
$init_param = $this->_getParam('i', null);
$init_id = sapp_Global::_decrypt($init_param);
$this->render('configuremanagers');
}
示例4: recentlyviewed
//.........这里部分代码省略.........
} else {
if (array_key_exists($pagesplit_action, $myemployeesedit_arr) !== false) {
$menuName .= $myemployeesedit_arr[$pagesplit_action];
} else {
if ($actionName == 'add') {
$menuName .= '-Add';
}
}
}
} else {
if (array_key_exists($pagesplit_action, $mydetails_arr) !== false) {
$menuName .= $mydetails_arr[$pagesplit_action];
}
}
} else {
if ($pagesplit_action == '') {
if ($pagesplitName == 'mydetails') {
$menuName .= TAB_EMP_OFFICIAL . "-View";
}
} else {
$menuName .= '';
}
}
} else {
if ($pagesplitName != '' && $pagesplitName == 'reports') {
if ($pagesplit_action != '') {
if (array_key_exists($pagesplit_action, $reportsArr) !== false) {
$menuName .= $reportsArr[$pagesplit_action];
}
}
} else {
if ($pagesplitName != '' && $pagesplitName == 'servicerequests') {
if ($pagesplit_action != '') {
$param_t = isset($pagesplit['t']) ? sapp_Global::_decrypt($pagesplit['t']) : "";
$param_v = isset($pagesplit['v']) ? sapp_Global::_decrypt($pagesplit['v']) : "";
$service_menu = sapp_Helper::sd_menu_names();
$service_action_arr = sapp_Helper::sd_action_names();
if ($param_t != '' && isset($service_menu[$param_t])) {
$menuName .= " - " . $service_menu[$param_t];
}
if ($param_v != '' && isset($service_action_arr[$param_v])) {
$menuName .= " - " . $service_action_arr[$param_v];
}
}
} else {
if ($pagesplitName != '' && $pagesplitName == 'appraisalinit') {
if ($pagesplit_action != '') {
if ($pagesplit_action == 'edit') {
$menuName .= '-Edit';
}
if ($pagesplit_action == 'view') {
$menuName .= '-View';
}
if ($pagesplit_action == 'add') {
$menuName .= '-Add';
}
if ($pagesplit_action == 'assigngroups') {
$menuName .= '-Edit Questions';
}
if ($pagesplit_action == 'confmanagers') {
$menuName .= '-Edit Managers';
}
if ($pagesplit_action == 'viewassigngroups') {
$menuName .= '-View Questions';
}
if ($pagesplit_action == 'viewconfmanagers') {
示例5:
<li class="third_li">
<h4>Application Settings</h4>
<div class="third_icon icon"></div>
<span>Configure application name and super admin credentials</span>
</li>
<li class="fourth_li">
<h4>Mail Server Settings</h4>
<div class="fourth_icon icon"></div>
<span>Configure your mail server to get automated mails</span>
</li>
<li class="fifth_li">
<h4>Final Check</h4>
<div class="fifth_icon icon"></div>
<span>Confirm and complete the installation process</span>
</li>
</ul>
</div>
<div class="content_wrapper">
<?php
if (isset($_GET['s']) && $_GET['s'] != '') {
$redirectUrl = sapp_Global::_decrypt($_GET['s']);
require_once 'step' . $redirectUrl . '.php';
} else {
require_once 'step1.php';
}
?>
</div>
</div>
</body>
</html>
示例6: breadcrumbs
public function breadcrumbs($baseUrlString = '')
{
$request = Zend_Controller_Front::getInstance();
$params = $request->getRequest()->getParams();
$controllerName = $request->getRequest()->getControllerName();
$action_Name = $request->getRequest()->getActionName();
$tName = '';
$vName = '';
$tUrl = '';
$serviceUrl = '';
$burl = $controllerName . "/" . $action_Name;
/**
*
* For service request modifying the breadcrum based on t and v params
* @var t and @var v
*/
$param_t = isset($params['t']) ? sapp_Global::_decrypt($params['t']) : "";
$param_v = isset($params['v']) ? sapp_Global::_decrypt($params['v']) : "";
$service_menu = sapp_Helper::sd_menu_names();
$service_action_arr = sapp_Helper::sd_action_names();
if ($param_t != '' && isset($service_menu[$param_t])) {
$tName = $service_menu[$param_t] . ' Summary';
$tUrl = $baseUrlString . '/' . $controllerName . '/index/t/' . sapp_Global::_encrypt($param_t);
}
if ($param_v != '' && isset($service_action_arr[$param_v])) {
$vName = $service_action_arr[$param_v];
} else {
$vName = $action_Name != 'index' ? $action_Name : '';
}
if ($vName != '') {
if ($tName != '') {
$serviceUrl = '<a href=' . $tUrl . '>' . $tName . '</a><span class="arrows">›</span>';
}
$serviceUrl .= '<span>' . ucfirst($vName) . '</span>';
} else {
$serviceUrl = '<span>' . $tName . '</span>';
}
/**
* End modifying breadcrum for servicerequest.
*/
unset($params['module'], $params['controller'], $params['action']);
if (isset($params['error_handler'])) {
unset($params['error_handler']);
}
$id_name = '';
if (is_array($params) && !empty($params)) {
foreach ($params as $key => $value) {
if (!is_array($value)) {
$burl .= "/" . $key . "/" . $value;
}
}
$id_name = "yes";
}
$pageUrl = explode("/", $_SERVER['REQUEST_URI']);
$serverUrl = $_SERVER['HTTP_HOST'];
$reportsArr = array('leavesreport' => 'Leaves', 'holidaygroupreports' => 'Holidays', 'activeuser' => 'Active Users', 'employeereport' => 'Employees', 'rolesgroup' => 'Roles', 'emprolesgroup' => 'Employee Roles', 'userlogreport' => 'User Logs', 'activitylogreport' => 'Activity Logs', 'requisitionstatusreport' => 'Requisition');
$pageName = $controllerName;
$actionName = $action_Name;
$breadCrumbsData = '';
$mydetails_arr = array('jobhistory' => 'Employee Job History', 'certification' => 'Training & Certification Details', 'experience' => 'Experience Details', 'education' => 'Education Details', 'medicalclaims' => 'Medical Claims', 'leaves' => 'Employee Leaves', 'skills' => 'Employee Skills', 'communication' => 'Contact Details', 'communicationdetailsview' => 'Contact Details', 'disability' => 'Disability Details', 'disabilitydetailsview' => 'Disability Details', 'workeligibility' => 'Work Eligibility Details', 'workeligibilitydetailsview' => 'Work Eligibility Details', 'visa' => 'Visa and Immigration Details', 'visadetailsview' => 'Visa and Immigration Details', 'additionaldetails' => 'Additional Details', 'additionaldetailsview' => 'Additional Details', 'salarydetails' => 'Salary Details', 'salarydetailsview' => 'Salary Details', 'personal' => 'Personal Details', 'personaldetailsview' => 'Personal Details', 'creditcard' => 'Corporate Card Details', 'creditcarddetailsview' => 'Corporate Card Details', 'dependency' => 'Dependency Details', 'edit' => 'Edit');
$myemployees_arr = array('additionaldetailsview' => 'Additional Details', 'jobhistoryview' => 'Job History', 'perview' => 'Personal Details', 'expview' => 'Experience Details', 'eduview' => 'Education Details', 'skillsview' => 'Employee Skills', 'comview' => 'Contact Details', 'trainingview' => 'Training & Certification Details', 'view' => 'View');
if ($pageName == '' || $pageName == 'welcome') {
$breadCrumbsData .= '';
} else {
if ($pageName == 'dashboard') {
$breadCrumbsData = '<div class="breadcrumbs">';
if ($actionName == 'viewsettings') {
$breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">›</span> Settings';
} else {
if ($actionName == 'viewprofile') {
$breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">›</span> Profile';
} else {
if ($actionName == 'changepassword') {
$breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">›</span> Change Password';
} else {
if ($actionName == 'emailsettings') {
$breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">›</span> Email Settings';
} else {
if ($actionName == 'upgradeapplication') {
$breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">›</span> Upgrade Application ';
}
}
}
}
}
$breadCrumbsData .= '</div>';
} else {
if ($pageName == 'configuresite') {
$breadCrumbsData = '<div class="breadcrumbs">';
$breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">›</span> Configure Site';
$breadCrumbsData .= '</div>';
} else {
if ($pageName == 'managemenus') {
$breadCrumbsData = '<div class="breadcrumbs">';
$breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">›</span> Manage Modules';
$breadCrumbsData .= '</div>';
} else {
if ($pageName == 'logmanager') {
$breadCrumbsData = '<div class="breadcrumbs">';
$breadCrumbsData .= '<a href="' . $baseUrlString . '">Home</a> <span class="arrows">›</span> Activity Log';
//.........这里部分代码省略.........
示例7: createnewgroupAction
/**
* This action is used to create new group by manager.It will serve as ajax call.
*/
public function createnewgroupAction()
{
$appraisal_id = $this->_getParam('appraisal_id', null);
$manager_id = $this->_getParam('manager_id', null);
$flag = $this->_getParam('flag', null);
$group_id = $this->_getParam('group_id', null);
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginuserRole = $auth->getStorage()->read()->emprole;
$loginuserGroup = $auth->getStorage()->read()->group_id;
}
try {
if ($appraisal_id != '' && $manager_id != '') {
$appraisal_id = sapp_Global::_decrypt($appraisal_id);
$manager_id = sapp_Global::_decrypt($manager_id);
if ($flag == 'edit') {
$group_id = sapp_Global::_decrypt($group_id);
}
$app_manager_model = new Default_Model_Appraisalmanager();
$appraisal_init_model = new Default_Model_Appraisalinit();
$appraisal_qs_model = new Default_Model_Appraisalquestions();
$check_array = array();
$tablename = 'main_pa_questions_privileges';
$manager_emp = $app_manager_model->getmanager_emp($appraisal_id, $manager_id, '');
if (empty($manager_emp) && $flag == 'add') {
$this->view->ermsg = 'No employees to add.';
}
$appraisaldata = $appraisal_init_model->getConfigData($appraisal_id);
$appraisaldata = $appraisaldata[0];
$questionPrivileges = $appraisal_qs_model->gethrquestionprivileges($appraisal_id, $tablename, '');
$questionsArr = $appraisal_qs_model->getQuestionsByCategory($appraisaldata['category_id'], '');
if (!empty($questionPrivileges)) {
if (isset($questionPrivileges['manager_qs']) && isset($questionPrivileges['manager_qs_privileges'])) {
if ($questionPrivileges['manager_qs'] != '' && $questionPrivileges['manager_qs_privileges'] != '') {
$hr_qs_Arr = explode(',', $questionPrivileges['manager_qs']);
$hr_qs_privileges = json_decode($questionPrivileges['manager_qs_privileges'], true);
foreach ($hr_qs_privileges as $key => $val) {
//$val = explode(',',substr($val, 1, -1));
$check_array[$key] = $val;
}
}
}
}
if (sapp_Global::_checkprivileges(APPRAISALQUESTIONS, $loginuserGroup, $loginuserRole, 'edit') == 'Yes') {
$appraisaldata['poppermission'] = 'yes';
}
$appraisaldata['poppermission'] = 'yes';
$manager_emp_selected = array();
$group_name = "";
if ($flag == 'edit') {
$app_group_model = new Default_Model_Appraisalgroups();
$group_details = $app_group_model->getAppraisalGroupsDatabyID($group_id);
if (!empty($group_details)) {
$group_details = $group_details[0];
$group_name = $group_details['group_name'];
$manager_emp_selected = $app_manager_model->getmanager_emp($appraisal_id, $manager_id, $group_id);
$manager_qs_privileges = json_decode($manager_emp_selected[0]['manager_qs_privileges'], true);
foreach ($manager_qs_privileges as $key => $val) {
$check_array[$key] = $val;
}
} else {
$this->view->ermsg = 'No data found.';
}
}
$view = $this->view;
$view->appraisal_id = $appraisal_id;
$view->manager_id = $manager_id;
$view->manager_emp = $manager_emp;
$view->questionsArr = $questionsArr;
$view->checkArr = $check_array;
$view->appraisaldata = $appraisaldata;
$view->checkArr = $check_array;
$view->flag = $flag;
$view->group_name = $group_name;
$view->group_id = $group_id;
$view->selected_emp = $manager_emp_selected;
} else {
$this->view->ermsg = 'No data found.';
}
} catch (Exception $ex) {
$this->view->ermsg = 'No data found.';
}
}
示例8: indexAction
public function indexAction()
{
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
}
if (isset($_SESSION['emp_leaves'])) {
unset($_SESSION['emp_leaves']);
}
$leaverequestmodel = new Default_Model_Leaverequest();
$queryflag = '';
$errorstring = '';
$statusidarr = array('1', '2', '3', '4');
$call = $this->_getParam('call');
$statusidstring = $this->_request->getParam('status');
$unitId = '';
if (!isset($statusidstring) || $statusidstring == '') {
$unitId = $this->_request->getParam('unitId');
$statusidstring = $unitId;
}
$statusid = sapp_Global::_decrypt($statusidstring);
if (isset($statusid) && $statusid != '' && $statusidstring != 'ASC') {
if (!in_array($statusid, $statusidarr)) {
$errorstring = "error";
}
$_SESSION['emp_leaves'] = $statusidstring;
}
if ($call == 'ajaxcall') {
$this->_helper->layout->disableLayout();
}
$view = Zend_Layout::getMvcInstance()->getView();
$objname = $this->_getParam('objname');
$refresh = $this->_getParam('refresh');
$dashboardcall = $this->_getParam('dashboardcall');
$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 = '';
} 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);
// search from grid - START
$searchData = $this->_getParam('searchData');
$searchData = rtrim($searchData, ',');
// search from grid - END
}
$objName = 'empleavesummary';
$dataTmp = $leaverequestmodel->getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $objName, $statusid);
array_push($data, $dataTmp);
$this->view->dataArray = $data;
$this->view->call = $call;
$this->view->controllername = $objName;
$this->view->statusidstring = $statusidstring;
$this->view->errorstring = $errorstring;
$this->view->messages = $this->_helper->flashMessenger->getMessages();
}
示例9: getGrid
/**
* This function gives all content for grid view.
* @param string $sort = ascending or descending
* @param string $by = name of field which to be sort
* @param integer $pageNo = page number
* @param integer $perPage = no.of records per page
* @param array $searchData = search string
* @param string $call = type of call like ajax.
* @return array Array of data.
*/
public function getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $grid_type, $status_value, $p4, $p5)
{
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
}
$status_value_arr = array(1 => 'Open', 2 => 'Closed', 3 => 'Cancelled', 4 => 'Overdue', 5 => 'Duetoday', 6 => 'To approve', 7 => 'Approved', 8 => 'Rec_pending', 9 => 'Rec_wapproval', 10 => 'Rec_toapprove', 11 => 'To approve', 12 => 'App_approved', 13 => 'To manager approve', 14 => 'Rept_approved', 15 => 'Req_pending', 16 => 'Rejected', 17 => 'Raiser_open', 18 => 'Manager approved', 19 => 'Manager rejected', 20 => 'Rec_app_approved', 21 => 'Rec_app_rejected', 22 => 'Rec_app_closed', 23 => 'To management approve', 24 => 'Management approved', 25 => 'Management rejected', 26 => 'In Progress', 27 => 'Duplicate', 28 => 'Need more Info', 29 => 'Team Tickets');
$status_search_arr = array(4 => " date_add(date(r.createddate),interval 10 day) < date(now())", 5 => " date_add(date(r.createddate),interval 10 day) = date(now()) ", 6 => " (r.status = 'To management approve' or r.status = 'To manager approve') ", 7 => " (r.status = 'Manager approved' or r.status = 'Management Approved' or r.status = 'Manager rejected' or r.status = 'Management Rejected') ", 8 => " (r.status = 'Manager approved' or r.status = 'Management Approved' or r.status = 'Manager rejected' or r.status = 'Management Rejected') ", 9 => " (r.status = 'To management approve' or r.status = 'To manager approve') ", 10 => " (r.reporting_manager_id = '" . $loginUserId . "' and r.status ='To manager approve') ", 12 => " (r.status = 'Approved' or r.status = 'Rejected') ", 14 => " (r.status = 'Manager approved' or r.status = 'Manager rejected') ", 15 => " (r.status != 'Cancelled' and r.status != 'Closed') ", 17 => " (r.status not in ('Closed','Cancelled','Rejected')) ", 20 => " (r.status = 'Manager approved' or r.status = 'Management Approved') ", 21 => " (r.status = 'Manager rejected' or r.status = 'Management Rejected')", 22 => " (r.status = 'Closed' or r.status = 'Rejected')", 26 => " (r.status = 'In Progress')", 27 => " (r.status = 'Duplicate')", 28 => " (r.status = 'Need more Info')", 29 => " (usr.reporting_manager = " . $loginUserId . ")");
$grid_type_arr = $this->getGridtypearr();
$grid_type = sapp_Global::_decrypt($grid_type);
$status_value = sapp_Global::_decrypt($status_value);
$searchQuery = '';
$searchArray = array();
if ($searchData != '' && $searchData != 'undefined') {
$searchValues = json_decode($searchData);
if (count($searchValues) > 0) {
foreach ($searchValues as $key => $val) {
if ($key == 'createddate') {
$searchQuery .= " date(" . $key . ") = '" . sapp_Global::change_date($val, 'database') . "' AND ";
} else {
$searchQuery .= " " . $key . " like '%" . $val . "%' AND ";
}
$searchArray[$key] = $val;
}
$searchQuery = rtrim($searchQuery, " AND");
}
}
if (is_numeric($status_value) && $status_value > 0 && array_key_exists($status_value, $status_value_arr)) {
if (!array_key_exists($status_value, $status_search_arr)) {
$newsearchQuery = " r.status = '" . $status_value_arr[$status_value] . "'";
} else {
$newsearchQuery = $status_search_arr[$status_value];
}
if ($searchQuery != '') {
$searchQuery .= " and " . $newsearchQuery;
} else {
$searchQuery .= $newsearchQuery;
}
}
//My Action Summary menu item grid types
if ($grid_type == 2 || $grid_type == 4 || $grid_type == 5 || $grid_type == 6 || $grid_type == 8) {
//if (strpos($searchQuery, 'Open') !== false) {
// is Current Login user is Admin for 1 or more business units
$currentuserIsAdmin = $this->getAdminServiceDeskIds($loginUserId);
if ($currentuserIsAdmin != "0") {
if ($searchQuery != '') {
if (strpos($searchQuery, 'Open') !== false) {
$searchQuery .= " AND (r.service_desk_id in (" . $currentuserIsAdmin . "))";
} else {
$searchQuery .= " OR (r.service_desk_id in (" . $currentuserIsAdmin . "))";
}
} else {
$searchQuery .= "(r.service_desk_id in (" . $currentuserIsAdmin . "))";
}
}
//else {
// is Current Login user is Executor for 1 or more service tickets
$currentuserIsExecutor = $this->IsExecutorForActiveTickets($loginUserId);
if ($currentuserIsExecutor != "0") {
if ($searchQuery != '') {
$searchQuery .= " and (find_in_set(" . $loginUserId . ",r.executor_id)) " . "and (r.status not in ('Closed','Rejected'))";
} else {
$searchQuery .= " (find_in_set(" . $loginUserId . ",r.executor_id)) " . "and (r.status not in ('Closed','Rejected'))";
}
}
//}
//}
}
$objName = 'servicerequests';
$tableFields = array('action' => 'Action', 'ticket_number' => 'Ticket#', 'service_desk_name' => 'Category', 'service_request_name' => 'Request Type', 'priority' => 'Priority', 'status' => 'Status', 'description' => 'Description', 'raised_by_name' => 'Raised By', 'createddate' => 'Raised On', 'executor_id' => 'Allocate', 'executor_name' => 'Executor');
if ($status_value != '') {
unset($tableFields['status']);
}
$bool_arr = array('' => 'All', 1 => 'Low', 2 => 'Medium', 3 => 'High');
$tablecontent = $this->getRequestData($sort, $by, $pageNo, $perPage, $searchQuery, $grid_type, $status_value);
$menu_name_arr = $this->getServicemenunames();
$menuName = $menu_name_arr[$grid_type];
$dataTmp = array('sort' => $sort, 'by' => $by, 'menuName' => $menuName, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent['table_content'], 'row_count' => $tablecontent['count'], 'objectname' => $objName, 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getAjaxgridData', 'jsFillFnName' => '', 'searchArray' => $searchArray, 'call' => $call, 'grid_type' => $grid_type, 'status_value' => $status_value, 'view_link' => DOMAIN . 'servicerequests/view/id/{{id}}/t/' . sapp_Global::_encrypt($grid_type) . ($status_value != '' ? "/v/" . sapp_Global::_encrypt($status_value) : ""), 'add_link' => DOMAIN . 'servicerequests/add/t/' . sapp_Global::_encrypt($grid_type) . ($status_value != '' ? "/v/" . sapp_Global::_encrypt($status_value) : ""), 'dashboardcall' => $dashboardcall, 'search_filters' => array('priority' => array('type' => 'select', 'filter_data' => $bool_arr), 'createddate' => array('type' => 'datepicker')));
if ($grid_type_arr[$grid_type] == 'request') {
$dataTmp['add'] = 'add';
}
return $dataTmp;
}
示例10: indexAction
public function indexAction()
{
$empscreeningModel = new Default_Model_Empscreening();
$call = $this->_getParam('call');
if ($call == 'ajaxcall') {
$this->_helper->layout->disableLayout();
}
$view = Zend_Layout::getMvcInstance()->getView();
$objname = $this->_getParam('objname');
$refresh = $this->_getParam('refresh');
$data = array();
$searchQuery = '';
$searchArray = array();
$tablecontent = '';
$dashboardcall = $this->_getParam('dashboardcall');
$statusidstring = $this->_request->getParam('status');
$unitId = '';
if (!isset($statusidstring) || $statusidstring == '') {
$unitId = $this->_request->getParam('unitId');
$statusidstring = $unitId;
}
$formgrid = 'true';
if (isset($unitId) && $unitId != '') {
$formgrid = 'true';
}
$statusid = sapp_Global::_decrypt($statusidstring);
if ($statusid != '1' && $statusid != '2') {
$statusidstring = sapp_Global::_encrypt(1);
}
$queryflag = '';
unset($_SESSION['emp_status']);
if ($statusid != '') {
$_SESSION['emp_status'] = $statusidstring;
if ($statusid == '1') {
$queryflag = '1';
$this->view->ermsg = '';
} else {
if ($statusid == '2') {
$queryflag = '2';
$this->view->ermsg = '';
} else {
$this->view->ermsg = 'nodata';
$queryflag = '1';
}
}
} else {
$queryflag = '1';
}
if ($refresh == 'refresh') {
if ($dashboardcall == 'Yes') {
$perPage = DASHBOARD_PERPAGE;
} else {
$perPage = PERPAGE;
}
$sort = 'DESC';
$by = 'me.modifieddate';
$pageNo = 1;
$searchData = '';
$searchQuery = '';
$searchArray = '';
} else {
$sort = $this->_getParam('sort') != '' ? $this->_getParam('sort') : 'DESC';
$by = $this->_getParam('by') != '' ? $this->_getParam('by') : 'me.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, ',');
$searchData = $this->_getParam('searchData');
}
$dataTmp = $empscreeningModel->getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $queryflag, $statusidstring, $formgrid, $unitId);
array_push($data, $dataTmp);
$this->view->dataArray = $data;
$this->view->call = $call;
$this->view->statusidstring = $statusidstring;
$this->view->messages = $this->_helper->flashMessenger->getMessages();
}
示例11: viewAction
/**
*
*/
public function viewAction()
{
$request_form = new Default_Form_Servicerequest();
$id = $this->_getParam('id', null);
$grid_type = $this->_getParam('t', null);
$status_value = $this->_getParam('v', null);
$req_msg = "";
try {
if ($id != '' && $grid_type != '') {
$grid_type = sapp_Global::_decrypt($grid_type);
$sd_req_model = new Default_Model_Servicerequests();
$grid_type_arr = $sd_req_model->getGridtypearr();
if (is_numeric($id) && $id > 0 && is_numeric($grid_type) && $grid_type > 0 && array_key_exists($grid_type, $grid_type_arr)) {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
$loginuserRole = $auth->getStorage()->read()->emprole;
$loginuserGroup = $auth->getStorage()->read()->group_id;
$login_bu = $auth->getStorage()->read()->businessunit_id;
$login_dept = $auth->getStorage()->read()->department_id;
}
$data = $sd_req_model->getRequestById($id);
if (!empty($data)) {
$approver_level = "view";
if (($grid_type_arr[$grid_type] == 'rept_app' || $grid_type_arr[$grid_type] == 'approver') && $data['status'] == 'To management approve') {
$approver_level = $sd_req_model->getApproverLevel($loginUserId, $id);
}
$canTicketEscalate = $sd_req_model->canTicketEscalate($loginUserId, $id);
$ticketFeedbackRating = $sd_req_model->isFeedbackProvided($id);
$request_Admins = $sd_req_model->getRequestAdmins($id);
$request_history = $sd_req_model->getRequestHistory($id);
$requester_length = 5;
$requester_history = $sd_req_model->getLastRequests($id, $data['raised_by'], $requester_length);
$emp_model = new Default_Model_Employee();
$service_conf_model = new Default_Model_Servicedeskconf();
$raised_by_details = $emp_model->getEmp_from_summary($data['raised_by']);
$other_approvers = $emp_model->get_Other_Approvers();
$app_data = $sd_req_model->getApprovers($data['service_desk_conf_id'], "config");
$app_details = $emp_model->getEmployeeDetails(implode(',', $app_data));
foreach ($app_data as $key => $value) {
$app_names[$key] = $app_details[$value];
}
$conf_data = $service_conf_model->getServiceDeskConfbyID($data['service_desk_conf_id']);
$exec_data = $emp_model->getEmployeeDetails($conf_data[0]['request_recievers']);
$this->view->id = $id;
$this->view->data = $data;
$this->view->grid_type = $grid_type_arr[$grid_type];
$this->view->grid_type_arr = $sd_req_model->getGridtypearr_rev();
$this->view->status_value = $status_value;
$this->view->approver_level = $approver_level;
$this->view->canTicketEscalate = $canTicketEscalate;
$this->view->ticketFeedbackRating = $ticketFeedbackRating;
$this->view->loginUserId = $loginUserId;
$this->view->request_Admins = $request_Admins;
$this->view->request_history = $request_history;
$this->view->requester_history = $requester_history;
$this->view->requester_length = $requester_length;
$this->view->raised_by_details = $raised_by_details;
$this->view->other_approvers = $other_approvers;
$this->view->app_names = $app_names;
$this->view->exec_data = $exec_data;
if ($this->getRequest()->getPost()) {
$trDb = Zend_Db_Table::getDefaultAdapter();
// starting transaction
$trDb->beginTransaction();
try {
$req_id = $this->_getParam('hid_reqid', null);
$hid_status = $this->_getParam('hid_status', null);
$request_action = $this->_getParam('request_action', null);
$request_comments = trim($this->_getParam('request_comments', null));
//email stuff ------------Start
$sEmailData = $sd_req_model->getRequestDataForEmail($id);
$summary_data = $sd_req_model->getDataSummary($id);
$stoEmailAddress2 = $sd_req_model->getEmailAddress($sEmailData['raised_by']);
//mail for requester
$stoEmailAddress4 = $sd_req_model->getEmailAddress($sEmailData['executor_id']);
//mail for executor
$stoEmailAddress3 = constant('ITSUPPORT_0');
//$stoEmailAddress3 = $this->getSupportTeamEmailID($sEmailData['service_desk_conf_id']); //mail for support group
$sMailSubject = sprintf("%s - %s - %s - %s", $sEmailData['ticket_number'], $sEmailData['service_desk_name'], $sEmailData['service_request_name'], $hid_status);
$smessage = "The below service request status has been changed to " . $hid_status;
$this->mail_helper_action($sMailSubject, $smessage, $summary_data, $stoEmailAddress2);
$this->mail_helper_action($sMailSubject, $smessage, $summary_data, $stoEmailAddress3);
$this->mail_helper_action($sMailSubject, $smessage, $summary_data, $stoEmailAddress4);
//email stuff ------------End
switch ($hid_status) {
case "Cancelled":
$save_data = array('status' => 'Cancelled', 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
$req_msg['success'] = "Request cancelled successfully.";
//mailto: Requester, Supportgroup
break;
case "Duplicate":
if ($request_action != '' && $request_comments != '') {
$save_data = array('status' => 'Duplicate', 'executor_comments' => trim($request_comments), 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
}
$req_msg['success'] = "Request marked as duplicate.";
break;
//.........这里部分代码省略.........
示例12: viewAction
public function viewAction()
{
$request_form = new Default_Form_Servicerequest();
$id = $this->_getParam('id', null);
$grid_type = $this->_getParam('t', null);
$status_value = $this->_getParam('v', null);
$req_msg = "";
try {
if ($id != '' && $grid_type != '') {
$grid_type = sapp_Global::_decrypt($grid_type);
$sd_req_model = new Default_Model_Servicerequests();
$grid_type_arr = $sd_req_model->getGridtypearr();
if (is_numeric($id) && $id > 0 && is_numeric($grid_type) && $grid_type > 0 && array_key_exists($grid_type, $grid_type_arr)) {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
$loginuserRole = $auth->getStorage()->read()->emprole;
$loginuserGroup = $auth->getStorage()->read()->group_id;
$login_bu = $auth->getStorage()->read()->businessunit_id;
$login_dept = $auth->getStorage()->read()->department_id;
}
$data = $sd_req_model->getRequestById($id);
if (!empty($data)) {
$approver_level = "view";
if (($grid_type_arr[$grid_type] == 'rept_app' || $grid_type_arr[$grid_type] == 'approver') && $data['status'] == 'To management approve') {
$approver_level = $sd_req_model->getApproverLevel($loginUserId, $id);
}
$request_history = $sd_req_model->getRequestHistory($id);
$emp_model = new Default_Model_Employee();
$service_conf_model = new Default_Model_Servicedeskconf();
$raised_by_details = $emp_model->getEmp_from_summary($data['raised_by']);
$app_data = $sd_req_model->getApprovers($data['service_desk_conf_id'], "config");
$app_details = $emp_model->getEmployeeDetails(implode(',', $app_data));
foreach ($app_data as $key => $value) {
$app_names[$key] = $app_details[$value];
}
$conf_data = $service_conf_model->getServiceDeskConfbyID($data['service_desk_conf_id']);
$exec_data = $emp_model->getEmployeeDetails($conf_data[0]['request_recievers']);
$this->view->id = $id;
$this->view->data = $data;
$this->view->grid_type = $grid_type_arr[$grid_type];
$this->view->grid_type_arr = $sd_req_model->getGridtypearr_rev();
$this->view->status_value = $status_value;
$this->view->approver_level = $approver_level;
$this->view->loginUserId = $loginUserId;
$this->view->request_history = $request_history;
$this->view->raised_by_details = $raised_by_details;
$this->view->app_names = $app_names;
$this->view->exec_data = $exec_data;
if ($this->getRequest()->getPost()) {
$trDb = Zend_Db_Table::getDefaultAdapter();
// starting transaction
$trDb->beginTransaction();
try {
$req_id = $this->_getParam('hid_reqid', null);
$hid_status = $this->_getParam('hid_status', null);
if ($hid_status != '' && $hid_status == 'Cancelled') {
$save_data = array('status' => $hid_status, 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
$sd_req_model->SaveorUpdateRequestData($save_data, 'id = ' . $id);
//start of saving history
$reqh_model = new Default_Model_Requesthistory();
$reqh_data = array('request_id' => $id, 'description' => ucfirst($data['service_desk_name']) . " Request has been cancelled by ", 'emp_id' => $loginUserId, 'emp_name' => ucfirst($data['raised_by_name']), 'emp_profileimg' => $auth->getStorage()->read()->profileimg, 'createdby' => $loginUserId, 'modifiedby' => $loginUserId, 'isactive' => 1, 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
$reqh_model->SaveorUpdateRhistory($reqh_data, '');
//end of saving history
$req_msg['success'] = "Request cancelled successfully.";
} else {
if ($hid_status != '' && $hid_status == 'To management approve') {
$hid_app_pos = $this->_getParam('hid_app_pos', null);
$hid_max_app = $this->_getParam('hid_max_app', null);
if ($hid_app_pos == '' && $hid_max_app == '') {
$request_comments = trim($this->_getParam('request_comments', null));
if ($request_comments != '') {
$save_data = array('status' => "To management approve", 'to_mgmt_comments' => trim($request_comments), 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
$save_data = $save_data + $app_data;
$sd_result = "";
if ($data['status'] == 'Open') {
$sd_result = $sd_req_model->SaveorUpdateRequestData($save_data, 'status = "Open" and id = ' . $id);
}
//start of saving history
$reqh_model = new Default_Model_Requesthistory();
$reqh_data = array('request_id' => $id, 'description' => ucfirst($data['service_desk_name']) . " Request has been sent for management approval by ", 'emp_id' => $loginUserId, 'emp_name' => ucfirst($auth->getStorage()->read()->userfullname), 'emp_profileimg' => $auth->getStorage()->read()->profileimg, 'createdby' => $loginUserId, 'modifiedby' => $loginUserId, 'comments' => trim($request_comments), 'isactive' => 1, 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
if ($sd_result == 'update') {
$reqh_model->SaveorUpdateRhistory($reqh_data, '');
//end of saving history
$this->send_req_mails($id);
$req_msg['success'] = "Request sent for management approval successfully.";
} else {
$req_msg['error'] = "Some thing went wrong, please try again.";
}
}
} else {
$request_comments = trim($this->_getParam('request_comments', null));
$request_action = $this->_getParam('request_action', null);
if ($request_comments != '' && $request_action != '') {
$save_data = array('approver_status_' . $approver_level['app_pos'] => $request_action, 'modifiedby' => $loginUserId, 'approver_' . $approver_level['app_pos'] . '_comments' => trim($request_comments), 'modifieddate' => gmdate("Y-m-d H:i:s"));
if ($request_action == 'Reject') {
$save_data['status'] = 'Management rejected';
}
if ($approver_level['app_pos'] == $approver_level['max_app']) {
$save_data['status'] = $request_action == 'Approve' ? "Management approved" : "Management rejected";
//.........这里部分代码省略.........
示例13: savemngrorghierarchyAction
public function savemngrorghierarchyAction()
{
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
$loginuserRole = $auth->getStorage()->read()->emprole;
$loginuserGroup = $auth->getStorage()->read()->group_id;
}
$app_init_model = new Default_Model_Appraisalinit();
$ques_temp_model = new Default_Model_Appraisalqstemp();
$ques_org_model = new Default_Model_Appraisalqsmain();
$app_rating_model = new Default_Model_Appraisalratings();
// $init_id = $this->_getParam('init_id',null);
$init_param = $this->_getParam('i', null);
$init_id = sapp_Global::_decrypt($init_param);
$init_data = $app_init_model->getConfigData($init_id);
if (count($init_data) > 0) {
$init_data = $init_data[0];
}
$this->view->init_id = $init_id;
$this->view->init_data = $init_data;
$this->view->msg_arr = array();
$ratingsflag = 'false';
$checkRatingsExists = $app_rating_model->getAppraisalRatingsbyInitId($init_id);
if (!empty($checkRatingsExists)) {
$ratingsflag = 'true';
}
$red_result = "";
$type_arr = array('line' => 1, 'report' => 2);
$trDb = Zend_Db_Table::getDefaultAdapter();
//get manager ids as comma seperated string
$manager_ids = $this->_getParam('mid', null);
//break the manager ids into array
$mngr_ids_array = explode(',', $manager_ids);
$get_managers_data = array();
$get_managers_data = $app_init_model->getManagers_report($init_id);
$final_managers_data = array();
//get the managers data and build an array with manager id as key
if (isset($get_managers_data) && count($get_managers_data) > 0) {
foreach ($get_managers_data as $data) {
$mngr_id = isset($data['user_id']) ? $data['user_id'] : 0;
$final_managers_data[$mngr_id] = $data;
}
}
if (isset($mngr_ids_array) && count($mngr_ids_array) > 0) {
$choose_option = 'report';
foreach ($mngr_ids_array as $mngr) {
$tot_ids = array();
$context = 'add';
$content = array();
$content = $app_init_model->getdisplayacontentreportacc($init_id, $mngr);
if ($context == 'add') {
$init_sdata = array('manager_level_type' => $type_arr[$choose_option]);
$app_result = array();
$app_result = $app_init_model->SaveorUpdateAppraisalInitData($init_sdata, " id = " . $init_id);
$qresult = '';
if ($app_result === 'update') {
if (count($content) > 0) {
foreach ($content as $cont) {
if (is_numeric($cont['user_id'])) {
array_push($tot_ids, $cont['user_id']);
}
}
}
$line_str_arr = array();
$line_str_arr['line_manager_1'] = $mngr;
if (count($tot_ids) > 0) {
foreach ($tot_ids as $emp_id) {
$qdata = array('pa_initialization_id' => $init_id, 'manager_levels' => 1, 'employee_id' => $emp_id, 'module_flag' => 1, 'createdby' => $loginUserId, 'createdby_role' => $loginuserRole, 'createdby_group' => $loginuserGroup, 'modifiedby' => $loginUserId, 'modifiedby_role' => $loginuserRole, 'modifiedby_group' => $loginuserGroup, 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"), 'isactive' => 1);
$qdata = array_merge($qdata, $line_str_arr);
if ($init_data['initialize_status'] == 1) {
$qresult = $ques_org_model->SaveorUpdatePrivilegeData($qdata, '');
} else {
$qresult = $ques_temp_model->SaveorUpdateData($qdata, '');
}
}
}
}
if ($qresult !== '' && $app_result !== '') {
$red_result = 'saved';
}
$message = "Appraisal process updated successfully";
}
}
if ($red_result === 'saved') {
$message = "Appraisal process updated successfully";
$this->_helper->FlashMessenger()->setNamespace('conf_success')->addMessage($message);
$this->_redirect('appraisalinit/confmanagers/i/' . sapp_Global::_encrypt($init_id));
}
}
$this->view->ratingsflag = $ratingsflag;
$this->render('configuremanagers');
}
示例14: pendingAction
public function pendingAction()
{
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
}
$leaverequestmodel = new Default_Model_Leaverequest();
$call = $this->_getParam('call');
if ($call == 'ajaxcall') {
$this->_helper->layout->disableLayout();
}
$view = Zend_Layout::getMvcInstance()->getView();
$objname = $this->_getParam('objname');
$refresh = $this->_getParam('refresh');
$dashboardcall = $this->_getParam('dashboardcall');
$statusidstring = $this->_request->getParam('status');
if (!isset($statusidstring) || $statusidstring == '') {
$unitId = $this->_request->getParam('unitId');
$statusidstring = $unitId;
}
$statusid = sapp_Global::_decrypt($statusidstring);
$queryflag = 'Pending';
$data = array();
$searchQuery = '';
$searchArray = array();
$tablecontent = '';
if ($refresh == 'refresh') {
if ($dashboardcall == 'Yes') {
$perPage = DASHBOARD_PERPAGE;
} else {
$perPage = PERPAGE;
}
$sort = 'DESC';
$by = 'createddate';
$pageNo = 1;
$searchData = '';
} else {
$sort = $this->_getParam('sort') != '' ? $this->_getParam('sort') : 'DESC';
$by = $this->_getParam('by') != '' ? $this->_getParam('by') : 'createddate';
if ($dashboardcall == 'Yes') {
$perPage = $this->_getParam('per_page', DASHBOARD_PERPAGE);
} else {
$perPage = $this->_getParam('per_page', PERPAGE);
}
$pageNo = $this->_getParam('page', 1);
/** search from grid - START * */
$searchData = $this->_getParam('searchData');
$searchData = rtrim($searchData, ',');
/** search from grid - END * */
}
$objName = 'manageremployeevacations';
$queryflag = "1";
$dataTmp = $leaverequestmodel->getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $objName, $queryflag);
array_push($data, $dataTmp);
$this->view->dataArray = $data;
$this->view->call = $call;
$this->view->messages = $this->_helper->flashMessenger->getMessages();
}
示例15: indexAction
public function indexAction()
{
$candidatesmodel = new Default_Model_Shortlistedcandidates();
$call = $this->_getParam('call');
if ($call == 'ajaxcall') {
$this->_helper->layout->disableLayout();
}
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
$loginuserGroup = $auth->getStorage()->read()->group_id;
}
$dashboardcall = $this->_getParam('dashboardcall');
$queryflag = '';
$refresh = $this->_getParam('refresh');
$data = array();
$searchQuery = '';
$searchArray = array();
$tablecontent = '';
if ($call == 'ajaxcall') {
$this->_helper->layout->disableLayout();
}
$view = Zend_Layout::getMvcInstance()->getView();
$statusidstring = $this->_request->getParam('status');
$unitId = '';
if (!isset($statusidstring) || $statusidstring == '') {
$unitId = $this->_request->getParam('unitId');
$statusidstring = $unitId;
}
$formgrid = 'false';
if (isset($unitId) && $unitId != '') {
$formgrid = 'true';
}
$statusid = sapp_Global::_decrypt($statusidstring);
$queryflag = '';
unset($_SESSION['short_status']);
if ($statusid != '' && is_numeric($statusid)) {
$_SESSION['short_status'] = $statusidstring;
if ($statusid == 0) {
$queryflag = 'All';
} else {
if ($statusid == 2) {
$queryflag = 'Selected';
} else {
if ($statusid == 3) {
$queryflag = 'Rejected';
} else {
if ($statusid == 4) {
$queryflag = 'Offered';
} else {
if ($statusid == 5) {
$queryflag = 'Offer Accepted';
} else {
if ($statusid == 6) {
$queryflag = 'Joined';
} else {
if ($statusid == 7) {
$queryflag = 'On Hold';
} else {
if ($statusid == 8) {
$queryflag = 'Yet to offer';
} else {
if ($statusid == 9) {
$queryflag = 'Offer Declined';
}
}
}
}
}
}
}
}
}
// else if ($statusid == 1)
// $queryflag = 'Shortlisted';
} else {
$queryflag = 'All';
$statusid = 0;
$statusidstring = sapp_Global::_encrypt('0');
}
if ($refresh == 'refresh') {
if ($dashboardcall == 'Yes') {
$perPage = DASHBOARD_PERPAGE;
} else {
$perPage = PERPAGE;
}
$sort = 'DESC';
$by = 'c.modifieddate';
$pageNo = 1;
$searchData = '';
$searchQuery = '';
$searchArray = array();
} else {
$sort = $this->_getParam('sort') != '' ? $this->_getParam('sort') : 'DESC';
$by = $this->_getParam('by') != '' ? $this->_getParam('by') : 'c.modifieddate';
if ($dashboardcall == 'Yes') {
$perPage = $this->_getParam('per_page', DASHBOARD_PERPAGE);
} else {
$perPage = $this->_getParam('per_page', PERPAGE);
}
//.........这里部分代码省略.........