当前位置: 首页>>代码示例>>PHP>>正文


PHP Default_Model_Menu::getMenuObjID方法代码示例

本文整理汇总了PHP中Default_Model_Menu::getMenuObjID方法的典型用法代码示例。如果您正苦于以下问题:PHP Default_Model_Menu::getMenuObjID方法的具体用法?PHP Default_Model_Menu::getMenuObjID怎么用?PHP Default_Model_Menu::getMenuObjID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Default_Model_Menu的用法示例。


在下文中一共展示了Default_Model_Menu::getMenuObjID方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: deleteAction

 public function deleteAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $this->_request->getParam('objid');
     $messages['message'] = '';
     $actionflag = 3;
     $completedDetails = 0;
     $onholdDetails = 0;
     $specimen_id = 0;
     $flag = 1;
     if ($id) {
         $empscreeningModel = new Default_Model_Empscreening();
         $menumodel = new Default_Model_Menu();
         $empmodel = new Default_Model_Empscreening();
         $emparraydata = $empmodel->checkdetailedbgstatus('', '', '', $id);
         if ($emparraydata['isactive'] != '0' && $emparraydata['isactive'] != 0) {
             $checkemparraydata = $empmodel->checkdetailedbgstatus('', '', '', $id, 'findcompleted');
             for ($i = 0; $i < sizeof($checkemparraydata); $i++) {
                 $specimen_id = $checkemparraydata[0]['specimen_id'];
                 $flag = $checkemparraydata[0]['flag'];
                 if ($checkemparraydata[$i]['process_status'] == 'Complete') {
                     $completedDetails = $completedDetails + 1;
                 } else {
                     if ($checkemparraydata[$i]['process_status'] == 'On hold') {
                         $onholdDetails = $onholdDetails + 1;
                     }
                 }
             }
             if ($completedDetails == sizeof($checkemparraydata)) {
                 $empmodel->updatebgstatus('complete', $specimen_id, $flag);
             }
             if ($onholdDetails == sizeof($checkemparraydata)) {
                 $empmodel->updatebgstatus('onhold', $specimen_id, $flag);
             }
             $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $where = array('id=?' => $id);
             $Id = $empscreeningModel->SaveorUpdateDetails($data, $where);
             if ($Id == 'update') {
                 $menuidArr = $menumodel->getMenuObjID('/empscreening');
                 $menuID = $menuidArr[0]['id'];
                 $messages['message'] = 'Process deleted successfully';
                 $messages['msgtype'] = 'success';
                 $messages['flagtype'] = 'process';
             } else {
                 $messages['message'] = 'Process cannot be deleted';
                 $messages['msgtype'] = 'error';
                 $messages['flagtype'] = 'process';
             }
         } else {
             $messages['message'] = 'As the process has been made inactive, you cannot delete it.';
             $messages['msgtype'] = 'error';
             $messages['flagtype'] = 'process';
             $messages['redirect'] = 'no';
         }
     } else {
         $messages['message'] = 'Process cannot be deleted';
         $messages['msgtype'] = 'error';
         $messages['flagtype'] = 'process';
     }
     $this->_helper->json($messages);
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:64,代码来源:ProcessesController.php

示例2: updatecontactnumberAction

 public function updatecontactnumberAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $this->_request->getParam('id');
     $contactnumber = $this->_request->getParam('contactnumber');
     $messages['message'] = '';
     $actionflag = 2;
     if ($id) {
         $usersModal = new Default_Model_Users();
         $menumodel = new Default_Model_Menu();
         $data = array('contactnumber' => $contactnumber);
         $where = array('id=?' => $id);
         $Id = $usersModal->addOrUpdateUserModel($data, $where);
         if ($Id == 'update') {
             $menuidArr = $menumodel->getMenuObjID('/employee');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Contact number updated successfully.';
         } else {
             $messages['message'] = 'Contact number cannot be updated.';
         }
     } else {
         $messages['message'] = 'Contact number cannot be updated.';
     }
     $this->_helper->json($messages);
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:29,代码来源:IndexController.php

示例3: comsave

 public function comsave($empcommdetailsform, $userid)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $perm_country = $this->_request->getParam('perm_country');
     $perm_stateparam = $this->_request->getParam('perm_state');
     $perm_stateArr = explode("!@#", $this->_request->getParam('perm_state'));
     $perm_state = $perm_stateArr[0];
     $perm_cityparam = $this->_request->getParam('perm_city');
     $perm_cityArr = explode("!@#", $this->_request->getParam('perm_city'));
     $perm_city = $perm_cityArr[0];
     $address_flag = $this->_request->getParam('address_flag');
     $current_country = $this->_request->getParam('current_country');
     $current_stateparam = $this->_request->getParam('current_state');
     $current_stateArr = explode("!@#", $this->_request->getParam('current_state'));
     $current_state = $current_stateArr[0];
     $current_cityparam = $this->_request->getParam('current_city');
     $current_cityArr = explode("!@#", $this->_request->getParam('current_city'));
     $current_city = $current_cityArr[0];
     if ($empcommdetailsform->isValid($this->_request->getPost())) {
         $post_values = $this->_request->getPost();
         if (isset($post_values['id'])) {
             unset($post_values['id']);
         }
         if (isset($post_values['user_id'])) {
             unset($post_values['user_id']);
         }
         if (isset($post_values['submit'])) {
             unset($post_values['submit']);
         }
         $new_post_values = array_filter($post_values);
         if (!empty($new_post_values)) {
             $empcommdetailsModal = new Default_Model_Empcommunicationdetails();
             $id = $this->_request->getParam('id');
             $user_id = $userid;
             $personalemail = $this->_request->getParam('personalemail');
             $perm_streetaddress = $this->_request->getParam('perm_streetaddress');
             $perm_pincode = $this->_request->getParam('perm_pincode');
             $current_streetaddress = $this->_request->getParam('current_streetaddress');
             $current_pincode = $this->_request->getParam('current_pincode');
             $emergency_number = $this->_request->getParam('emergency_number');
             $emergency_name = $this->_request->getParam('emergency_name');
             $emergency_email = $this->_request->getParam('emergency_email');
             $date = new Zend_Date();
             $menumodel = new Default_Model_Menu();
             $actionflag = '';
             $tableid = '';
             $data = array('user_id' => $user_id, 'personalemail' => $personalemail, 'perm_streetaddress' => $perm_streetaddress, 'perm_country' => $perm_country != '' ? $perm_country : NULL, 'perm_state' => $perm_state != '' ? $perm_state : NULL, 'perm_city' => $perm_city != '' ? $perm_city : NULL, 'perm_pincode' => $perm_pincode, 'current_streetaddress' => $current_streetaddress != '' ? $current_streetaddress : NULL, 'current_country' => $current_country != '' ? $current_country : NULL, 'current_state' => $current_state != '' ? $current_state : NULL, 'current_city' => $current_city != '' ? $current_city : NULL, 'current_pincode' => $current_pincode != '' ? $current_pincode : NULL, 'emergency_number' => $emergency_number != '' ? $emergency_number : NULL, 'emergency_name' => $emergency_name != '' ? $emergency_name : NULL, 'emergency_email' => $emergency_email != '' ? $emergency_email : NULL, 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
             if ($id != '') {
                 $where = array('user_id=?' => $user_id);
                 $actionflag = 2;
             } else {
                 $data['createdby'] = $loginUserId;
                 $data['createddate'] = gmdate("Y-m-d H:i:s");
                 $data['isactive'] = 1;
                 $where = '';
                 $actionflag = 1;
             }
             $Id = $empcommdetailsModal->SaveorUpdateEmpcommData($data, $where);
             if ($Id == 'update') {
                 $tableid = $id;
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee contact details updated successfully."));
             } else {
                 $tableid = $Id;
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee contact details added successfully."));
             }
             $menuidArr = $menumodel->getMenuObjID('/employee');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $user_id);
         } else {
             $this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => FIELDMSG));
         }
         $this->_redirect('myemployees/comedit/userid/' . $userid);
     } else {
         $messages = $empcommdetailsform->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         if (isset($perm_country) && $perm_country != 0 && $perm_country != '') {
             $statesmodel = new Default_Model_States();
             $statesmodeldata = $statesmodel->getStatesList($perm_country);
             $empcommdetailsform->perm_state->clearMultiOptions();
             $empcommdetailsform->perm_city->clearMultiOptions();
             $empcommdetailsform->perm_state->addMultiOption('', 'Select State');
             foreach ($statesmodeldata as $res) {
                 $empcommdetailsform->perm_state->addMultiOption($res['id'] . '!@#' . utf8_encode($res['state_name']), utf8_encode($res['state_name']));
             }
             if (isset($perm_stateparam) && $perm_stateparam != 0 && $perm_stateparam != '') {
                 $empcommdetailsform->setDefault('perm_state', $perm_stateparam);
             }
         }
         if (isset($perm_stateparam) && $perm_stateparam != 0 && $perm_stateparam != '') {
             $citiesmodel = new Default_Model_Cities();
             $citiesmodeldata = $citiesmodel->getCitiesList($perm_state);
             $empcommdetailsform->perm_city->addMultiOption('', 'Select City');
//.........这里部分代码省略.........
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:101,代码来源:MyemployeesController.php

示例4: deleteAction

 public function deleteAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $this->_request->getParam('objid');
     $messages['message'] = '';
     $actionflag = 3;
     if ($id) {
         $departmentsmodel = new Default_Model_Departments();
         $checkemployees = $departmentsmodel->checkemployeestodepartment($id);
         if ($checkemployees == 0) {
             $menumodel = new Default_Model_Menu();
             $data = array('isactive' => 0);
             $where = array('id=?' => $id);
             $Id = $departmentsmodel->SaveorUpdateDepartmentsUnits($data, $where);
             if ($Id == 'update') {
                 $menuidArr = $menumodel->getMenuObjID('/departments');
                 $menuID = $menuidArr[0]['id'];
                 $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                 $messages['message'] = 'Department deleted successfully.';
                 $messages['msgtype'] = 'success';
             } else {
                 $messages['message'] = 'Department cannot be deleted.';
                 $messages['msgtype'] = 'error';
             }
         } else {
             $messages['message'] = 'Please re-assign the employees to another department';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Department cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:37,代码来源:DepartmentsController.php

示例5: deleteAction

 public function deleteAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $this->_request->getParam('objid');
     $messages['message'] = '';
     $messages['msgtype'] = '';
     $actionflag = 3;
     if ($id) {
         $leavemanagementmodel = new Default_Model_Leavemanagement();
         $menumodel = new Default_Model_Menu();
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $Id = $leavemanagementmodel->SaveorUpdateLeaveManagementData($data, $where);
         if ($Id == 'update') {
             $menuidArr = $menumodel->getMenuObjID('/leavemanagement');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Leave management deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Leave management cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Leave management cannot be deleted.';
         $messages['msgtype'] = 'succerroress';
     }
     $this->_helper->json($messages);
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:32,代码来源:LeavemanagementController.php

示例6: deleteAction

 public function deleteAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $this->_request->getParam('objid');
     $messages['message'] = '';
     $messages['msgtype'] = '';
     $messages['flagtype'] = '';
     $actionflag = 3;
     if ($id) {
         $positionsmodel = new Default_Model_Positions();
         $menumodel = new Default_Model_Menu();
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $position_data = $positionsmodel->getsinglePositionData($id);
         $Id = $positionsmodel->SaveorUpdatePositionData($data, $where);
         if ($Id == 'update') {
             sapp_Global::send_configuration_mail("Positions", $position_data[0]['positionname']);
             $menuidArr = $menumodel->getMenuObjID('/positions');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Position deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Position cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Position cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:35,代码来源:PositionsController.php

示例7: save

 public function save($empsalarydetailsform, $userid)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     if ($empsalarydetailsform->isValid($this->_request->getPost())) {
         $empsalarydetailsModal = new Default_Model_Empsalarydetails();
         $id = $this->_request->getParam('id');
         $user_id = $userid;
         $currencyid = $this->_request->getParam('currencyid');
         $salarytype = $this->_request->getParam('salarytype');
         $salary = $this->_request->getParam('salary');
         $bankname = trim($this->_request->getParam('bankname'));
         $accountholder_name = trim($this->_request->getParam('accountholder_name'));
         $accountclasstypeid = $this->_request->getParam('accountclasstypeid');
         $bankaccountid = $this->_request->getParam('bankaccountid');
         $accountnumber = trim($this->_request->getParam('accountnumber'));
         $accountholding = $this->_request->getParam('accountholding');
         $accountholding = sapp_Global::change_date($accountholding, 'database');
         $date = new Zend_Date();
         $menumodel = new Default_Model_Menu();
         $actionflag = '';
         $tableid = '';
         $data = array('user_id' => $user_id, 'currencyid' => $currencyid, 'salarytype' => $salarytype, 'salary' => $salary, 'bankname' => $bankname != '' ? $bankname : NULL, 'accountholder_name' => $accountholder_name != '' ? $accountholder_name : NULL, 'accountclasstypeid' => $accountclasstypeid != '' ? $accountclasstypeid : NULL, 'bankaccountid' => $bankaccountid != '' ? $bankaccountid : NULL, 'accountnumber' => $accountnumber != '' ? $accountnumber : NULL, 'accountholding' => $accountholding != '' ? $accountholding : NULL, 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         if ($id != '') {
             $where = array('user_id=?' => $user_id);
             $actionflag = 2;
         } else {
             $data['createdby'] = $loginUserId;
             $data['createddate'] = gmdate("Y-m-d H:i:s");
             $data['isactive'] = 1;
             $where = '';
             $actionflag = 1;
         }
         $Id = $empsalarydetailsModal->SaveorUpdateEmpSalaryData($data, $where);
         if ($Id == 'update') {
             $tableid = $id;
             $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee salary details updated successfully."));
         } else {
             $tableid = $Id;
             $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee salary details added successfully."));
         }
         $menuidArr = $menumodel->getMenuObjID('/employee');
         $menuID = $menuidArr[0]['id'];
         $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $user_id);
         $this->_redirect('empsalarydetails/edit/userid/' . $user_id);
     } else {
         $messages = $empsalarydetailsform->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         return $msgarray;
     }
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:58,代码来源:EmpsalarydetailsController.php

示例8: makeactiveinactiveAction

 /**
  * This function is used to active/inactive employees.
  */
 public function makeactiveinactiveAction()
 {
     Zend_Layout::getMvcInstance()->setLayoutPath(APPLICATION_PATH . "/layouts/scripts/popup/");
     $emp_id = $this->_getParam('emp_id', null);
     $status = trim($this->_getParam('status', null));
     $hasteam = trim($this->_getParam('hasteam', null));
     $employeeModal = new Default_Model_Employee();
     $user_model = new Default_Model_Usermanagement();
     $usermodel = new Default_Model_Users();
     $role_model = new Default_Model_Roles();
     $logmanagermodel = new Default_Model_Logmanager();
     $menumodel = new Default_Model_Menu();
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $empData = $employeeModal->getsingleEmployeeData($emp_id);
     if ($hasteam == 'true') {
         $employessunderEmpId = array();
         $reportingmanagersList = array();
         $employessunderEmpId = $employeeModal->getEmployeesUnderRM($emp_id);
         if ($empData[0]['is_orghead'] == 1) {
             $reportingmanagersList = $usermodel->getReportingManagerList_employees('', '', MANAGEMENT_GROUP);
         } else {
             $role_data = $role_model->getRoleDataById($empData[0]['emprole']);
             $reportingmanagersList = $usermodel->getReportingManagerList_employees($empData[0]['department_id'], $emp_id, $role_data['group_id']);
         }
         $reportingmanagersList = sapp_Global::removeElementWithValue($reportingmanagersList, 'id', $emp_id);
         $this->view->emp_id = $emp_id;
         $this->view->status = $status;
         $this->view->ishead = $empData[0]['is_orghead'];
         $this->view->empName = $empData[0]['userfullname'];
         $this->view->employessunderEmpId = $employessunderEmpId;
         $this->view->reportingmanagersList = $reportingmanagersList;
     } else {
         $db = Zend_Db_Table::getDefaultAdapter();
         $db->beginTransaction();
         try {
             if ($status == 'active') {
                 $data = array('isactive' => 1, 'emptemplock' => 0);
                 $empdata = array('isactive' => 1);
                 $logarr = array('userid' => $loginUserId, 'recordid' => $emp_id, 'date' => gmdate("Y-m-d H:i:s"), 'isactive' => 1);
                 $jsonlogarr = json_encode($logarr);
             } else {
                 if ($status == 'inactive') {
                     $data = array('isactive' => 0, 'emptemplock' => 1);
                     $empdata = array('isactive' => 0);
                     $logarr = array('userid' => $loginUserId, 'recordid' => $emp_id, 'date' => gmdate("Y-m-d H:i:s"), 'isactive' => 0);
                     $jsonlogarr = json_encode($logarr);
                 }
             }
             $where = "id = " . $emp_id;
             $user_model->SaveorUpdateUserData($data, $where);
             $employeeModal->SaveorUpdateEmployeeData($empdata, "user_id =" . $emp_id);
             if ($empData[0]['is_orghead'] == '1') {
                 $headData = array('is_orghead' => 0);
                 $headWhere = "user_id = " . $emp_id;
                 $employeeModal->SaveorUpdateEmployeeData($headData, $headWhere);
             }
             $menuidArr = $menumodel->getMenuObjID('/employee');
             $menuID = $menuidArr[0]['id'];
             $id = $logmanagermodel->addOrUpdateLogManager($menuID, 4, $jsonlogarr, $loginUserId, $emp_id);
             $db->commit();
             $result = 'update';
         } catch (Exception $e) {
             $db->rollBack();
             $result = 'failed';
         }
         $this->_helper->json(array('result' => $result == 'update' ? "yes" : "no"));
     }
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:74,代码来源:EmployeeController.php

示例9: deleteAction

 public function deleteAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $this->_request->getParam('objid');
     $messages['message'] = '';
     $actionflag = 3;
     if ($id) {
         $assignmententryreasoncodemodel = new Default_Model_Assignmententryreasoncode();
         $menumodel = new Default_Model_Menu();
         $data = array('isactive' => 0);
         $where = array('id=?' => $id);
         $Id = $assignmententryreasoncodemodel->SaveorUpdateAssignmentEntryData($data, $where);
         if ($Id == 'update') {
             $menuidArr = $menumodel->getMenuObjID('/assignmententryreasoncode');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Assignment entry reason code deleted successfully.';
         } else {
             $messages['message'] = 'Assignment entry reason code cannot be deleted.';
         }
     } else {
         $messages['message'] = 'Assignment entry reason code cannot be deleted.';
     }
     $this->_helper->json($messages);
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:28,代码来源:AssignmententryreasoncodeController.php

示例10: deleteAction

 public function deleteAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $this->_request->getParam('objid');
     $messages['message'] = '';
     $actionflag = 3;
     if ($id) {
         $leaverequestmodel = new Default_Model_Leaverequest();
         $menumodel = new Default_Model_Menu();
         $data = array('leavestatus' => 4);
         $where = array('id=?' => $id);
         $Id = $leaverequestmodel->SaveorUpdateLeaveRequest($data, $where);
         if ($Id == 'update') {
             $menuidArr = $menumodel->getMenuObjID('/pendingleaves');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Leave request cancelled.';
         } else {
             $messages['message'] = 'Leave request cannot be cancelled.';
         }
     } else {
         $messages['message'] = 'Leave request cannot be cancelled.';
     }
     $this->_helper->json($messages);
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:28,代码来源:EmpleavesummaryController.php

示例11: addpopupAction

 public function addpopupAction()
 {
     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');
     $msgarray = array();
     $controllername = 'servicedeskdepartment';
     $servicedeskdepartmentform = new Default_Form_servicedeskdepartment();
     $servicedeskdepartmentmodel = new Default_Model_Servicedeskdepartment();
     $servicedeskdepartmentform->setAction(DOMAIN . 'servicedeskdepartment/addpopup');
     if ($this->getRequest()->getPost()) {
         if ($servicedeskdepartmentform->isValid($this->_request->getPost())) {
             $id = $this->_request->getParam('id');
             $service_desk_name = $this->_request->getParam('service_desk_name');
             $description = $this->_request->getParam('description');
             $menumodel = new Default_Model_Menu();
             $actionflag = '';
             $tableid = '';
             $data = array('service_desk_name' => $service_desk_name, 'description' => $description, 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
             if ($id != '') {
                 $where = array('id=?' => $id);
                 $actionflag = 2;
             } else {
                 $data['createdby'] = $loginUserId;
                 $data['createddate'] = gmdate("Y-m-d H:i:s");
                 $data['isactive'] = 1;
                 $where = '';
                 $actionflag = 1;
             }
             $Id = $servicedeskdepartmentmodel->SaveorUpdateServiceDeskDepartmentData($data, $where);
             $tableid = $Id;
             $menuidArr = $menumodel->getMenuObjID('/servicedeskdepartment');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $tableid);
             $servicedeskdepartmentData = $servicedeskdepartmentmodel->getSDDepartmentData();
             $opt = '';
             foreach ($servicedeskdepartmentData as $record) {
                 $opt .= sapp_Global::selectOptionBuilder($record['id'], utf8_encode($record['service_desk_name']));
             }
             $this->view->departmentData = $opt;
             $this->view->eventact = 'added';
             $close = 'close';
             $this->view->popup = $close;
         } else {
             $messages = $servicedeskdepartmentform->getMessages();
             foreach ($messages as $key => $val) {
                 foreach ($val as $key2 => $val2) {
                     $msgarray[$key] = $val2;
                     break;
                 }
             }
             $this->view->msgarray = $msgarray;
         }
     }
     $this->view->controllername = $controllername;
     $this->view->form = $servicedeskdepartmentform;
     $this->view->ermsg = '';
     $this->render('form');
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:62,代码来源:ServicedeskdepartmentController.php

示例12: deleteAction

 public function deleteAction()
 {
     if (defined('EMPTABCONFIGS')) {
         $empOrganizationTabs = explode(",", EMPTABCONFIGS);
         if (in_array('dependency_details', $empOrganizationTabs)) {
             $auth = Zend_Auth::getInstance();
             if ($auth->hasIdentity()) {
                 $loginUserId = $auth->getStorage()->read()->id;
             }
             $id = $this->_request->getParam('objid');
             $messages['message'] = '';
             $messages['msgtype'] = '';
             $actionflag = 3;
             if ($id) {
                 $dependencydetailsModel = new Default_Model_Dependencydetails();
                 $menumodel = new Default_Model_Menu();
                 $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
                 $where = array('id=?' => $id);
                 $Id = $dependencydetailsModel->SaveorUpdateEmployeedependencyData($data, $where);
                 if ($Id == 'update') {
                     $menuidArr = $menumodel->getMenuObjID('/employee');
                     $menuID = $menuidArr[0]['id'];
                     $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                     $messages['message'] = 'Employee dependency details deleted successfully.';
                     $messages['msgtype'] = 'success';
                 } else {
                     $messages['message'] = 'Employee dependency details  cannot be deleted.';
                     $messages['msgtype'] = 'error';
                 }
             } else {
                 $messages['message'] = 'Employee dependency details cannot be deleted.';
                 $messages['msgtype'] = 'error';
             }
             $this->_helper->json($messages);
         } else {
             $this->_redirect('error');
         }
     }
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:39,代码来源:DependencydetailsController.php

示例13: addpopupAction

 public function addpopupAction()
 {
     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');
     $controllername = 'timezone';
     $timezoneform = new Default_Form_timezone();
     $timezonemodel = new Default_Model_Timezone();
     $timezoneform->setAction(DOMAIN . 'timezone/addpopup');
     if ($this->getRequest()->getPost()) {
         if ($timezoneform->isValid($this->_request->getPost())) {
             $id = $this->_request->getParam('id');
             $timezones = $this->_request->getParam('timezone');
             $description = $this->_request->getParam('description');
             $menumodel = new Default_Model_Menu();
             $date = new Zend_Date();
             $actionflag = '';
             $tableid = '';
             if (is_array($timezones)) {
                 $timezonesStr = implode(",", $timezones);
             } else {
                 $timezonesStr = '';
             }
             $count = count($timezones);
             $Id = $timezonemodel->savetimezonedetails($timezonesStr, $description, $loginUserId);
             $where = '';
             $actionflag = 1;
             $tableid = $Id;
             $menuidArr = $menumodel->getMenuObjID('/timezone');
             $menuID = $menuidArr[0]['id'];
             for ($i = 0; $i < $count; $i++) {
                 $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $tableid);
                 $tableid = $tableid + 1;
             }
             $timezonesData = $timezonemodel->fetchAll('isactive = 1', 'timezone')->toArray();
             $opt = '';
             foreach ($timezonesData as $record) {
                 $opt .= sapp_Global::selectOptionBuilder($record['id'], $record['timezone'] . ' [' . $record['timezone_abbr'] . ']');
             }
             $this->view->timezonesData = $opt;
             $this->view->eventact = 'added';
             $close = 'close';
             $this->view->popup = $close;
         } else {
             $messages = $timezoneform->getMessages();
             foreach ($messages as $key => $val) {
                 foreach ($val as $key2 => $val2) {
                     $msgarray[$key] = $val2;
                     break;
                 }
             }
             $this->view->msgarray = $msgarray;
         }
     }
     $this->view->controllername = $controllername;
     $this->view->form = $timezoneform;
     $this->view->ermsg = '';
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:61,代码来源:TimezoneController.php

示例14: addnewcityAction

 public function addnewcityAction()
 {
     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');
     $selectedcountryid = $this->_request->getParam('selectcountryid');
     $selectedstateid = $this->_request->getParam('selectstateid');
     $msgarray = array();
     $setDefaultString = '';
     $citystring = '';
     $controllername = 'cities';
     $citiesform = new Default_Form_cities();
     $citiesmodel = new Default_Model_Cities();
     $countriesModel = new Default_Model_Countries();
     $statesmodel = new Default_Model_States();
     /* Changing the form */
     $citiesform->setAction(BASE_URL . 'cities/addnewcity/selectcountryid/' . $selectedcountryid . '/selectstateid/' . $selectedstateid);
     $citiesform->removeElement('city');
     $citiesform->addElement('text', 'city', array('label' => 'City', 'maxlength' => '20', 'required' => true, 'validators' => array(array('validator' => 'NotEmpty', 'options' => array('messages' => 'Please enter city name.')))));
     /* END */
     $countrieslistArr = $countriesModel->getTotalCountriesList('');
     if (sizeof($countrieslistArr) > 0) {
         $citiesform->countryid->addMultiOption('', 'Select Country');
         foreach ($countrieslistArr as $countrieslistres) {
             if ($selectedcountryid != '') {
                 if ($countrieslistres['id'] == $selectedcountryid) {
                     $citiesform->countryid->addMultiOption($countrieslistres['id'], utf8_encode($countrieslistres['country_name']));
                     $citiesform->setDefault('countryid', $selectedcountryid);
                 }
             } else {
                 $citiesform->countryid->addMultiOption($countrieslistres['id'], utf8_encode($countrieslistres['country_name']));
             }
             $citiesform->countryid->setAttrib('onchange', 'displayParticularState_normal(this,"","state","city")');
         }
     } else {
         $msgarray['countryid'] = 'Countries are not configured yet.';
     }
     $countryid = $this->_request->getParam('countryid');
     if (isset($selectedcountryid) && $selectedcountryid != '' || isset($countryid) && $countryid != '') {
         if ($countryid) {
             $statesmodeldata = $statesmodel->getStatesList($countryid, '');
         } else {
             $statesmodeldata = $statesmodel->getStatesList($selectedcountryid, '');
         }
         $citiesform->state->addMultiOption('', 'Select State');
         foreach ($statesmodeldata as $res) {
             $citiesform->state->addMultiOption($res['id'], utf8_encode($res['state_name']));
             if ($selectedstateid != '') {
                 if ($res['id'] == $selectedstateid) {
                     $setDefaultString = $res['id'];
                 }
             } else {
                 if ($countryid != '') {
                     if ($res['id'] == $countryid) {
                         $setDefaultString = $res['id'];
                     }
                 }
             }
         }
         $citiesform->setDefault('state', $setDefaultString);
     } else {
         $citiesform->state->addMultiOption('', 'Select State');
     }
     if ($this->getRequest()->getPost()) {
         $id = $this->_request->getParam('id');
         $errorflag = "true";
         $msgarray = array();
         $dbstate = '';
         $dbcountryid = '';
         $stateidstr = $this->_request->getParam('state');
         $stateid = intval($stateidstr);
         $city = $this->_request->getParam('city');
         if (isset($stateid)) {
             $isDuplicateCityNameArr = $citiesmodel->getDuplicateCityName($city, $stateid);
             if ($isDuplicateCityNameArr[0]['count'] > 0) {
                 $errorflag = "false";
                 $msgarray['city'] = "City already exists.";
             }
         } else {
             $errorflag = "false";
             $msgarray['state'] = "Please select state.";
         }
         if ($citiesform->isValid($this->_request->getPost()) && $errorflag == "true") {
             $menumodel = new Default_Model_Menu();
             $city = $this->_request->getParam('city');
             $actionflag = '';
             $tableid = '';
             $NewCityId = $citiesmodel->SaveMainCityData($stateid, $city);
             $actionflag = 1;
             $tableid = $NewCityId;
             $menuidArr = $menumodel->getMenuObjID('/cities');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $tableid);
             if (isset($selectedstateid) && isset($selectedcountryid)) {
                 $cityData = $citiesmodel->getCitiesList($selectedstateid, 'city');
             } else {
                 $cityData = array();
//.........这里部分代码省略.........
开发者ID:sura2k,项目名称:sentrifugo,代码行数:101,代码来源:CitiesController.php

示例15: updateempdetails


//.........这里部分代码省略.........
                         if ($emp_status_id == 10) {
                             $isactivestatus = 4;
                         }
                     }
                 }
                 $statusdata = array('isactive' => $isactivestatus);
                 $empstatusId = $usersModel->SaveorUpdateUserData($statusdata, $statuswhere);
             } else {
                 $statusdata = array('isactive' => 1);
                 $empstatusId = $usersModel->SaveorUpdateUserData($statusdata, $statuswhere);
             }
             if ($Id == 'update') {
                 $tableid = $id;
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee details updated successfully."));
             } else {
                 //start of mailing
                 $base_url = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
                 $view = $this->getHelper('ViewRenderer')->view;
                 $this->view->emp_name = $emp_name;
                 $this->view->password = $emppassword;
                 $this->view->emp_id = $employeeId;
                 $this->view->base_url = $base_url;
                 $text = $view->render('mailtemplates/newpassword.phtml');
                 $options['subject'] = APPLICATION_NAME . ' login credentials';
                 $options['header'] = 'Greetings from Sentrifugo';
                 $options['toEmail'] = $emailaddress;
                 $options['toName'] = $this->view->emp_name;
                 $options['message'] = $text;
                 $result = sapp_Global::_sendEmail($options);
                 //end of mailing
                 $tableid = $Id;
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee details added successfully."));
             }
             $menuidArr = $menumodel->getMenuObjID('/employee');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $tableid);
             $menuidArr = $menumodel->getMenuObjID('/usermanagement');
             $menuID_user = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $user_id);
             if ($act_inact == 1) {
                 if ($user_data['isactive'] == 1) {
                     $act_str = array("Activated" => Zend_Registry::get('currentdate'));
                 } else {
                     $act_str = array("Inactivated" => Zend_Registry::get('currentdate'));
                 }
                 $result = sapp_Global::logManager($menuID_user, 4, $loginUserId, $user_id, '', $act_str);
             }
             $trDb->commit();
             $this->_redirect('employee/edit/id/' . $user_id);
         } catch (Exception $e) {
             $trDb->rollBack();
             $msgarray['employeeId'] = "Something went wrong,please try again later.";
             return $msgarray;
         }
     } else {
         $messages = $employeeform->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         $usersModel = new Default_Model_Users();
         if (isset($businessunit_id) && $businessunit_id != 0 && $businessunit_id != '') {
             $departmentsmodel = new Default_Model_Departments();
             $departmentlistArr = $departmentsmodel->getDepartmentList($businessunit_id);
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:67,代码来源:MydetailsController.php


注:本文中的Default_Model_Menu::getMenuObjID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。