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


PHP sapp_Global::send_configuration_mail方法代码示例

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


在下文中一共展示了sapp_Global::send_configuration_mail方法的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'] = '';
     $messages['msgtype'] = '';
     $messages['flagtype'] = '';
     $documentname = '';
     $actionflag = 3;
     if ($id) {
         $identitydocumentsModel = new Default_Model_Identitydocuments();
         $menumodel = new Default_Model_Menu();
         $identitydocumentdata = $identitydocumentsModel->getIdentitydocumnetsrecordwithID($id);
         if (!empty($identitydocumentdata)) {
             $documentname = $identitydocumentdata[0]['document_name'];
         }
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $Id = $identitydocumentsModel->SaveorUpdateIdentitydocumentsData($data, $where);
         if ($Id == 'update') {
             $menuidArr = $menumodel->getMenuObjID('/identitydocuments');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $configmail = sapp_Global::send_configuration_mail('Identity Document', $documentname);
             $messages['message'] = 'Identity document deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Identity document cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Identity document cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:39,代码来源:IdentitydocumentsController.php

示例2: 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'] = '';
     $count = 0;
     $actionflag = 3;
     if ($id) {
         $appraisalCategoryModel = new Default_Model_Appraisalcategory();
         $menumodel = new Default_Model_Menu();
         $appCategorydata = $appraisalCategoryModel->getAppraisalCategoryDatabyID($id);
         if ($appCategorydata[0]['isused'] == 0) {
             $appQuestionModel = new Default_Model_Appraisalquestions();
             $appQuesData = $appQuestionModel->getAppraisalQuestionsByCategotyID($id);
             if (sizeof($appQuesData) == 0) {
                 $data = array('isactive' => 0, 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
                 $where = array('id=?' => $id);
                 $Id = $appraisalCategoryModel->SaveorUpdateAppraisalCategoryData($data, $where);
                 if ($Id == 'update') {
                     $menuidArr = $menumodel->getMenuObjID('/appraisalcategory');
                     $menuID = $menuidArr[0]['id'];
                     $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                     $configmail = sapp_Global::send_configuration_mail('Category', $appCategorydata[0]['category_name']);
                     $messages['message'] = 'Category deleted successfully.';
                     $messages['msgtype'] = 'success';
                 } else {
                     $messages['message'] = 'Category cannot be deleted.';
                     $messages['msgtype'] = 'error';
                 }
             } else {
                 $messages['message'] = 'Category cannot be deleted. Delete the questions under this category.';
                 $messages['msgtype'] = 'error';
             }
         } else {
             $messages['message'] = 'Category cannot be deleted as its using in appraisal process.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Category cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:47,代码来源:AppraisalcategoryController.php

示例3: 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) {
         $nationalitycontextcodemodel = new Default_Model_Nationalitycontextcode();
         $nationalitycontextdata = $nationalitycontextcodemodel->getNationalityContextCodeDataByID($id);
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $Id = $nationalitycontextcodemodel->SaveorUpdateNationalityContextCodeData($data, $where);
         if ($Id == 'update') {
             $menuID = NATIONALITYCONTEXTCODE;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $configmail = sapp_Global::send_configuration_mail('Nationality Context Code', $nationalitycontextdata[0]['nationalitycontextcode']);
             $messages['message'] = 'Nationality context code deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Nationality context code cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Nationality context code cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:32,代码来源:NationalitycontextcodeController.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'] = '';
     $messages['msgtype'] = '';
     $actionflag = 3;
     if ($id) {
         $currencyconvertermodel = new Default_Model_Currencyconverter();
         $currencyconverterdata = $currencyconvertermodel->getCurrencyConverterDatabyID($id);
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $Id = $currencyconvertermodel->SaveorUpdateCurrencyConverterData($data, $where);
         if ($Id == 'update') {
             $menuID = CURRENCYCONVERTER;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $configmail = sapp_Global::send_configuration_mail('Base Currency', $currencyconverterdata[0]['basecurrtext']);
             $messages['message'] = 'Currency converter deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Currency converter cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Currency converter cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:32,代码来源:CurrencyconverterController.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'] = '';
     $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

示例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'] = '';
     $timezonename = '';
     $actionflag = 3;
     if ($id) {
         $timezonemodel = new Default_Model_Timezone();
         $timezonedata = $timezonemodel->getTimeZoneDataByID($id);
         if (!empty($timezonedata)) {
             $timezonename = $timezonedata[0]['timezone'];
         }
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $Id = $timezonemodel->SaveorUpdateTimeZoneData($data, $where);
         if ($Id == 'update') {
             $menuID = TIMEZONE;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $configmail = sapp_Global::send_configuration_mail('Time Zone', $timezonename);
             $messages['message'] = 'Time zone deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Time zone cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Time zone cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:37,代码来源:TimezoneController.php

示例7: 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) {
         $payfrequencymodel = new Default_Model_Payfrequency();
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $pay_data = $payfrequencymodel->getsinglePayfrequencyData($id);
         $Id = $payfrequencymodel->SaveorUpdatePayFrequencyData($data, $where);
         if ($Id == 'update') {
             sapp_Global::send_configuration_mail("Pay Frequency", $pay_data[0]['freqtype']);
             $menuID = PAYFREQUENCY;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Pay frequency deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Pay frequency Status cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Pay frequency cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:33,代码来源:PayfrequencyController.php

示例8: 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) {
         $accountclasstypemodel = new Default_Model_Accountclasstype();
         $accountdata = $accountclasstypemodel->getsingleAccountClassTypeData($id);
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $Id = $accountclasstypemodel->SaveorUpdateAccountClassTypeData($data, $where);
         if ($Id == 'update') {
             $menuID = ACCOUNTCLASSTYPE;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $configmail = sapp_Global::send_configuration_mail('Account Class Type', $accountdata[0]['accountclasstype']);
             $messages['message'] = 'Account class type deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Account class type cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Account class type cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:samdubey,项目名称:sentrifugo,代码行数:32,代码来源:AccountclasstypeController.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'] = '';
     $messages['msgtype'] = '';
     $actionflag = 3;
     if ($id) {
         $militaryservicemodel = new Default_Model_Militaryservice();
         $militaryservicedata = $militaryservicemodel->getMilitaryServiceDataByID($id);
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $Id = $militaryservicemodel->SaveorUpdateMilitaryServiceData($data, $where);
         if ($Id == 'update') {
             $menuID = MILITARYSERVICE;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $configmail = sapp_Global::send_configuration_mail('Miltitary Service Type', $militaryservicedata[0]['militaryservicetype']);
             $messages['message'] = 'Military service type deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Military service type cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Military service type cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:32,代码来源:MilitaryserviceController.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'] = '';
     $messages['msgtype'] = '';
     $messages['flagtype'] = '';
     $actionflag = 3;
     if ($id) {
         $eeoccategorymodel = new Default_Model_Eeoccategory();
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $ee_data = $eeoccategorymodel->getsingleEeoccategoryData($id);
         $Id = $eeoccategorymodel->SaveorUpdateEeocCategoryData($data, $where);
         if ($Id == 'update') {
             sapp_Global::send_configuration_mail("EEOC Categories", $ee_data[0]['eeoccategory']);
             $menuID = EEOCCATEGORY;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'EEOC category deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'EEOC category cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'EEOC category cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:33,代码来源:EeoccategoryController.php

示例11: 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) {
         $remunerationbasismodel = new Default_Model_Remunerationbasis();
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $re_data = $remunerationbasismodel->getsingleRemunerationBasisData($id);
         $Id = $remunerationbasismodel->SaveorUpdateRemunerationBasisData($data, $where);
         if ($Id == 'update') {
             sapp_Global::send_configuration_mail("Remuneration Basis", $re_data[0]['remtype']);
             $menuID = REMUNERATIONBASIS;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Remuneration basis deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Remuneration basis cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Remuneration basis cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:33,代码来源:RemunerationbasisController.php

示例12: 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;
     $count = 0;
     if ($id) {
         $servicedeskconfmodel = new Default_Model_Servicedeskconf();
         $servicedeskdepartmentmodel = new Default_Model_Servicedeskdepartment();
         $servicedeskconfdata = $servicedeskconfmodel->getServiceDeskConfbyID($id);
         if (!empty($servicedeskconfdata)) {
             $pendingRequestdata = $servicedeskconfmodel->getPendingServiceReqData($servicedeskconfdata[0]['businessunit_id']);
         }
         if (!empty($pendingRequestdata)) {
             $count = $pendingRequestdata[0]['count'];
         }
         if ($count < 1) {
             $serviceDeptData = $servicedeskdepartmentmodel->getServiceDeskDepartmentDatabyID($servicedeskconfdata[0]['service_desk_id']);
             $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $where = array('id=?' => $id);
             $Id = $servicedeskconfmodel->SaveorUpdateServiceConfData($data, $where);
             if ($Id == 'update') {
                 $menuID = SERVICEDESKCONFIGURATION;
                 $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                 if (!empty($serviceDeptData)) {
                     $configmail = sapp_Global::send_configuration_mail('Setting', $serviceDeptData[0]['service_desk_name']);
                 }
                 $messages['message'] = 'Setting deleted successfully.';
                 $messages['msgtype'] = 'success';
             } else {
                 $messages['message'] = 'Setting cannot be deleted.';
                 $messages['msgtype'] = 'error';
             }
         } else {
             $messages['message'] = 'Setting cannot be deleted as requests are in pending state.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Setting cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:48,代码来源:ServicedeskconfController.php

示例13: 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) {
         $workeligibilitydoctypesmodel = new Default_Model_Workeligibilitydoctypes();
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $doc_data = $workeligibilitydoctypesmodel->getsingleWorkEligibilityDocTypeData($id);
         $Id = $workeligibilitydoctypesmodel->SaveorUpdateWorkEligibilityDocumentData($data, $where);
         if ($Id == 'update') {
             sapp_Global::send_configuration_mail("Work Eligibility Document Type", $doc_data[0]['documenttype']);
             $menuID = WORKELIGIBILITYDOCTYPES;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Work eligibility document type deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Work eligibility document type cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Work eligibility document type cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:33,代码来源:WorkeligibilitydoctypesController.php

示例14: 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) {
         $educationlevelcodemodel = new Default_Model_Educationlevelcode();
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $elevel_data = $educationlevelcodemodel->getsingleEducationLevelCodeData($id);
         $Id = $educationlevelcodemodel->SaveorUpdateEducationlevelData($data, $where);
         if ($Id == 'update') {
             sapp_Global::send_configuration_mail("Education Level", $elevel_data[0]['educationlevelcode']);
             $menuID = EDUCATIONLEVELCODE;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Education level deleted successfully';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Education level cannot be deleted';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Education level cannot be deleted';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:33,代码来源:EducationlevelcodeController.php

示例15: 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'] = '';
     $count = 0;
     $actionflag = 3;
     if ($id) {
         $servicedeskdepartmentmodel = new Default_Model_Servicedeskdepartment();
         $servicedeskrequestmodel = new Default_Model_Servicedeskrequest();
         $servicedeskconfmodel = new Default_Model_Servicedeskconf();
         $menumodel = new Default_Model_Menu();
         $pendingRequestdata = $servicedeskconfmodel->getServiceReqDeptCount($id, 1);
         if (!empty($pendingRequestdata)) {
             $count = $pendingRequestdata[0]['count'];
         }
         $service_req_cnt = $servicedeskrequestmodel->getReqCnt($id);
         if ($service_req_cnt > 0) {
             $count = $count + $service_req_cnt;
         }
         if ($count < 1) {
             $servicedeskdepartmentdata = $servicedeskdepartmentmodel->getServiceDeskDepartmentDatabyID($id);
             $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $where = array('id=?' => $id);
             $reqwhere = array('service_desk_id=?' => $id);
             $Id = $servicedeskdepartmentmodel->SaveorUpdateServiceDeskDepartmentData($data, $where);
             $RId = $servicedeskrequestmodel->SaveorUpdateServiceDeskRequestData($data, $reqwhere);
             if ($Id == 'update') {
                 $menuidArr = $menumodel->getMenuObjID('/servicedeskdepartment');
                 $menuID = $menuidArr[0]['id'];
                 $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                 $configmail = sapp_Global::send_configuration_mail('Category', $servicedeskdepartmentdata[0]['service_desk_name']);
                 $messages['message'] = 'Category deleted successfully.';
                 $messages['msgtype'] = 'success';
             } else {
                 $messages['message'] = 'Category cannot be deleted.';
                 $messages['msgtype'] = 'error';
             }
         } else {
             $messages['message'] = 'Category cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Category cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:52,代码来源:ServicedeskdepartmentController.php


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