當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。