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


PHP sapp_Global::logManager方法代码示例

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


在下文中一共展示了sapp_Global::logManager方法的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'] = '';
     $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

示例2: 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

示例3: saveorginfo

 public function saveorginfo($form, $loginUserId, $wizardData)
 {
     $orgInfoModel = new Default_Model_Organisationinfo();
     $wizard_model = new Default_Model_Wizard();
     $id = $this->getRequest()->getParam('id');
     $imagerror = $this->_request->getParam('imgerr');
     $imagepath = $this->_request->getParam('org_image_value');
     $imgerrmsg = $this->_request->getParam('imgerrmsg');
     $pphnumber = $this->_request->getParam('phonenumber');
     $sphnumber = $this->_request->getParam('secondaryphone');
     $org_startdate = sapp_Global::change_date($this->_request->getParam('org_startdate'), 'database');
     $flag = 'true';
     if (isset($imagepath) && $imagepath != '') {
         $imageArr = explode('.', $imagepath);
         if (sizeof($imageArr) > 1) {
             $imagename = $imageArr[0];
             $imageext = $imageArr[1];
             $extArr = array('gif', 'jpg', 'jpeg', 'png');
             if (!in_array($imageext, $extArr)) {
                 $msgarray['org_image_value'] = 'Please upload an appropriate image file.';
                 $flag = 'false';
             }
         } else {
             $msgarray['org_image_value'] = 'Please upload an appropriate image file.';
             $flag = 'false';
         }
     }
     if ($imagerror == 'error') {
         if ($imgerrmsg != '' && $imgerrmsg != 'undefined') {
             $msgarray['org_image_value'] = $imgerrmsg;
         } else {
             $msgarray['org_image_value'] = 'Please upload an appropriate image file.';
         }
         $flag = 'false';
     }
     if ($pphnumber == $sphnumber && $sphnumber != '' && $pphnumber != '') {
         $msgarray['secondaryphone'] = 'Please enter different phone number.';
         $flag = 'false';
     }
     if ($form->isValid($this->_request->getPost()) && $flag != 'false') {
         $domain = $this->_request->getParam('domain');
         $domain = implode(',', $domain);
         $date = new Zend_Date();
         $data = array('organisationname' => trim($this->_request->getParam('organisationname')), 'domain' => trim($domain), 'website' => trim($this->_request->getParam('website')), 'org_image' => $imagepath, 'orgdescription' => trim($this->_request->getParam('orgdescription')), 'totalemployees' => trim($this->_request->getParam('totalemployees')), 'org_startdate' => $org_startdate != '' ? $org_startdate : NULL, 'phonenumber' => trim($this->_request->getParam('phonenumber')), 'secondaryphone' => trim($this->_request->getParam('secondaryphone')), 'faxnumber' => trim($this->_request->getParam('faxnumber')), 'country' => trim((int) $this->_request->getParam('country')), 'state' => trim(intval($this->_request->getParam('state'))), 'city' => trim(intval($this->_request->getParam('city'))), 'address1' => trim($this->_request->getParam('address1')), 'address2' => trim($this->_request->getParam('address2')), 'address3' => trim($this->_request->getParam('address3')), 'description' => trim($this->_request->getParam('description')), 'designation' => trim($this->_request->getParam('jobtitle_id', null)), 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $db = Zend_Db_Table::getDefaultAdapter();
         $db->beginTransaction();
         try {
             $path = IMAGE_UPLOAD_PATH;
             $imagepath = $this->_request->getParam('org_image_value');
             $filecopy = 'success';
             if ($imagepath != '') {
                 $filecopy = 'error';
                 if (file_exists(USER_PREVIEW_UPLOAD_PATH . '//' . $imagepath)) {
                     try {
                         if (copy(USER_PREVIEW_UPLOAD_PATH . '//' . $imagepath, $path . '//' . $imagepath)) {
                             $filecopy = 'success';
                         }
                         unlink(USER_PREVIEW_UPLOAD_PATH . '//' . $imagepath);
                     } catch (Exception $e) {
                         echo $msgarray['org_image_value'] = $e->getMessage();
                         exit;
                     }
                 }
             }
             $where = array('id=?' => $id);
             if ($imagepath == '') {
                 unset($data['org_image']);
             } else {
                 if ($filecopy == 'error') {
                     unset($data['org_image']);
                 }
             }
             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 = $orgInfoModel->SaveorUpdateData($data, $where);
             $menuID = ORGANISATIONINFO;
             try {
                 if ($Id != '' && $Id != 'update') {
                     $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $Id);
                 } else {
                     $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                 }
             } catch (Exception $e) {
                 echo $e->getMessage();
             }
             $wizardarray = array('org_details' => 2, 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
             if ($wizardData['site_config'] == 2) {
                 $wizardarray['iscomplete'] = 2;
             }
             $wizard_model->SaveorUpdateWizardData($wizardarray, '');
             $location_data = array('country' => trim((int) $this->_request->getParam('country')), 'state' => trim(intval($this->_request->getParam('state'))), 'city' => trim(intval($this->_request->getParam('city'))), 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $LocationId = $wizard_model->SaveorUpdateWizardData($location_data, '');
//.........这里部分代码省略.........
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:101,代码来源:WizardController.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) {
         $systempreferencemodel = new Default_Model_Sitepreference();
         $menumodel = new Default_Model_Menu();
         $data = array('isactive' => 0);
         $where = array('id=?' => $id);
         $Id = $systempreferencemodel->SaveorUpdateSystemPreferanceData($data, $where);
         if ($Id == 'update') {
             $menuidArr = $menumodel->getMenuObjID('/sitepreference');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Site preferences deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Site preferences cannot be deleted.';
         }
         $messages['msgtype'] = 'error';
     } else {
         $messages['message'] = 'Site preferences cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:32,代码来源:SitepreferenceController.php

示例5: 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

示例6: save

 public function save($empleavesform, $userid, $used_leaves, $leavetransfercount, $isleavetrasnferset, $currentyearleavecount)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     if ($empleavesform->isValid($this->_request->getPost())) {
         $employeeleavesModel = new Default_Model_Employeeleaves();
         $id = $this->_request->getParam('id');
         $user_id = $userid;
         $emp_leave_limit = $this->_request->getParam('leave_limit');
         if ($leavetransfercount != '' && $currentyearleavecount == '') {
             $emp_leave_limit = $emp_leave_limit + $leavetransfercount;
         } else {
             $emp_leave_limit = $emp_leave_limit + $currentyearleavecount;
         }
         $isleavetrasnfer = 0;
         if ($isleavetrasnferset == 1) {
             $isleavetrasnfer = 1;
         }
         $date = new Zend_Date();
         $menumodel = new Default_Model_Menu();
         $actionflag = '';
         $tableid = '';
         /* Save employee leaves in allotted leaves log */
         $postedArr = array();
         $postedArr = $_POST;
         $saveID = $employeeleavesModel->saveallotedleaves($postedArr, $emp_leave_limit, $user_id, $loginUserId);
         /* END */
         $Id = $employeeleavesModel->SaveorUpdateEmployeeLeaves($user_id, $emp_leave_limit, $isleavetrasnfer, $loginUserId);
         if ($id) {
             $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee Leave details updated successfully."));
             $actionflag = 2;
             $tableid = $id;
         } else {
             $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee Leave details added successfully."));
             $actionflag = 1;
             $tableid = $Id;
         }
         $menuidArr = $menumodel->getMenuObjID('/employee');
         $menuID = $menuidArr[0]['id'];
         $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $user_id);
         $this->_redirect('empleaves/edit/userid/' . $user_id);
     } else {
         $messages = $empleavesform->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         return $msgarray;
     }
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:54,代码来源:EmpleavesController.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'] = '';
     $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

示例8: updateempdetails


//.........这里部分代码省略.........
                             $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);
             $employeeform->department_id->clearMultiOptions();
             $employeeform->reporting_manager->clearMultiOptions();
             $employeeform->department_id->addMultiOption('', 'Select Department');
             foreach ($departmentlistArr as $departmentlistresult) {
                 $employeeform->department_id->addMultiOption($departmentlistresult['id'], utf8_encode($departmentlistresult['deptname']));
             }
             if (isset($department_id) && $department_id != 0 && $department_id != '') {
                 $employeeform->setDefault('department_id', $department_id);
             }
         }
         if (isset($department_id) && $department_id != 0 && $department_id != '') {
             $reportingManagerArr = $usersModel->getReportingManagerList($department_id, $user_id);
             $employeeform->reporting_manager->addMultiOption('', 'Select Reporting Manager');
             foreach ($reportingManagerArr as $reportingManagerresult) {
                 $employeeform->reporting_manager->addMultiOption($reportingManagerresult['id'], utf8_encode($reportingManagerresult['userfullname']));
             }
             if (isset($reporting_manager) && $reporting_manager != 0 && $reporting_manager != '') {
                 $employeeform->setDefault('reporting_manager', $reporting_manager);
             }
         }
         if (isset($jobtitle_id) && $jobtitle_id != 0 && $jobtitle_id != '') {
             $positionsmodel = new Default_Model_Positions();
             $positionlistArr = $positionsmodel->getPositionList($jobtitle_id);
             $employeeform->position_id->clearMultiOptions();
             $employeeform->position_id->addMultiOption('', 'Select Position');
             foreach ($positionlistArr as $positionlistRes) {
                 $employeeform->position_id->addMultiOption($positionlistRes['id'], utf8_encode($positionlistRes['positionname']));
             }
             if (isset($position_id) && $position_id != 0 && $position_id != '') {
                 $employeeform->setDefault('position_id', $position_id);
             }
         }
         return $msgarray;
     }
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:101,代码来源:MydetailsController.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'] = '';
     $messages['flagtype'] = '';
     $actionflag = 3;
     if ($id) {
         $empadditionaldetailsModal = new Default_Model_Empadditionaldetails();
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $Id = $empadditionaldetailsModal->SaveorUpdateEmpAdditionalData($data, $where);
         if ($Id == 'update') {
             $menuID = EMPLOYEE;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Employee additional details deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Employee additional details cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Employee additional details cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:31,代码来源:EmpadditionaldetailsController.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'] = '';
     $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

示例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'] = '';
     $actionflag = 3;
     if ($id) {
         $numberformatsmodel = new Default_Model_Numberformats();
         $menumodel = new Default_Model_Menu();
         $numberformatdata = $numberformatsmodel->getNumberFormatDataByID($id);
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $Id = $numberformatsmodel->SaveorUpdateNumberFormatData($data, $where);
         if ($Id == 'update') {
             $menuidArr = $menumodel->getMenuObjID('/numberformats');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $configmail = sapp_Global::send_configuration_mail('Number Format', $numberformatdata[0]['numberformattype']);
             $messages['message'] = 'Number format deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Number format cannot be deleted.';
             $messages['msgtype'] = 'success';
         }
     } else {
         $messages['message'] = 'Number format cannot be deleted.';
         $messages['msgtype'] = 'success';
     }
     $this->_helper->json($messages);
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:34,代码来源:NumberformatsController.php

示例12: savegroupedemployees

 public function savegroupedemployees()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $appraisalinitmodel = new Default_Model_Appraisalgroupemployeestemp();
     $menumodel = new Default_Model_Menu();
     $groupid = $this->_request->getParam('group_id');
     $appraisalid = $this->_request->getParam('appraisalid');
     $empids = $this->_request->getParam('empids');
     $id = '';
     $actionflag = '';
     $tableid = '';
     $msgarray = array();
     if (!isset($groupid) && $groupid == '') {
         $groupid = 0;
     }
     try {
         $ifrecordexists = $appraisalinitmodel->checkAppraisalRecordexists($groupid, $appraisalid);
         if (!empty($ifrecordexists)) {
             $id = $ifrecordexists[0]['id'];
         }
         $insertdata = array('pa_initialization_id' => $appraisalid, 'group_id' => $groupid, 'employee_ids' => $empids, 'isactive' => 1, 'createdby' => $loginUserId, 'createdby_role' => $loginuserRole, 'createdby_group' => $loginuserGroup, 'modifiedby' => $loginUserId, 'modifiedby_role' => $loginuserRole, 'modifiedby_group' => $loginuserGroup, 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $updatedata = array('employee_ids' => $empids, 'modifiedby' => $loginUserId, 'modifiedby_role' => $loginuserRole, 'modifiedby_group' => $loginuserGroup, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         if ($id != '') {
             $where = array('id=?' => $id);
             $actionflag = 2;
             $tableid = $id;
             $appraisalinitmodel->SaveorUpdateAppraisalGroupsEmployeesTempData($updatedata, $where);
             $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employees updated successfully."));
         } else {
             $where = '';
             $actionflag = 1;
             $Id = $appraisalinitmodel->SaveorUpdateAppraisalGroupsEmployeesTempData($insertdata, $where);
             $tableid = $Id;
             $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employees added successfully."));
         }
         $menuidArr = $menumodel->getMenuObjID('/appraisalinit');
         $menuID = $menuidArr[0]['id'];
         $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $tableid);
         $this->_redirect('appraisalinit/assigngroups/id/' . $appraisalid);
     } catch (Exception $e) {
         $msgarray = $this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => $e->getMessage()));
     }
     return $msgarray;
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:49,代码来源:AppraisalinitController.php

示例13: deleteAction

    public function deleteAction()
    {
        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity()) {
            $loginUserId = $auth->getStorage()->read()->id;
            $loginUserEmail = $auth->getStorage()->read()->emailaddress;
            $loginUserName = $auth->getStorage()->read()->userfullname;
        }
        $id = $this->_request->getParam('objid');
        $messages['message'] = '';
        $actionflag = 5;
        $businessunitid = '';
        $leavetypetext = '';
        if ($id) {
            $leaverequestmodel = new Default_Model_Leaverequest();
            $usersmodel = new Default_Model_Users();
            $employeesmodel = new Default_Model_Employees();
            $employeeleavetypesmodel = new Default_Model_Employeeleavetypes();
            $loggedInEmployeeDetails = $employeesmodel->getLoggedInEmployeeDetails($loginUserId);
            if ($loggedInEmployeeDetails[0]['businessunit_id'] != '') {
                $businessunitid = $loggedInEmployeeDetails[0]['businessunit_id'];
            }
            $dataarr = array('leavestatus' => 4, 'modifieddate' => gmdate("Y-m-d H:i:s"), 'modifiedby' => $loginUserId);
            $where = array('id=?' => $id);
            $Id = $leaverequestmodel->SaveorUpdateLeaveRequest($dataarr, $where);
            $data = $leaverequestmodel->getsinglePendingLeavesData($id);
            $data = $data[0];
            $appliedleavesdaycount = $data['appliedleavescount'];
            $to_date = $data['to_date'];
            $from_date = $data['from_date'];
            $reason = $data['reason'];
            $leavetypeid = $data['leavetypeid'];
            $repmngrnameArr = $usersmodel->getUserDetailsByID($data['rep_mang_id']);
            $reportingmanageremail = $repmngrnameArr[0]['emailaddress'];
            $reportingmanagername = $repmngrnameArr[0]['userfullname'];
            if ($Id == 'update') {
                $menuID = PENDINGLEAVES;
                $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                /** MAILING CODE **/
                if ($to_date == '' || $to_date == NULL) {
                    $to_date = $from_date;
                }
                /* Mail to Employee */
                $options['subject'] = 'Leave request cancelled';
                $options['header'] = 'Leave Request';
                $options['toEmail'] = $loginUserEmail;
                $options['toName'] = $loginUserName;
                $options['message'] = '<div>Hi,</div>
								<div>The below leave(s) has been cancelled.</div>
								<div>
                <table width="100%" cellspacing="0" cellpadding="15" border="0" style="border:3px solid #BBBBBB; font-size:16px; font-family:Arial, Helvetica, sans-serif; margin:30px 0 30px 0;" bgcolor="#ffffff">
                      <tbody><tr>
                        <td width="28%" style="border-right:2px solid #BBBBBB;">Employee Name</td>
                        <td width="72%">' . $loginUserName . '</td>
                      </tr>
                      <tr bgcolor="#e9f6fc">
                        <td style="border-right:2px solid #BBBBBB;">No. of Day(s)</td>
                        <td>' . $appliedleavesdaycount . '</td>
                      </tr>
                      <tr>
                        <td style="border-right:2px solid #BBBBBB;">From</td>
                        <td>' . $from_date . '</td>
                      </tr>
                      <tr bgcolor="#e9f6fc">
                        <td style="border-right:2px solid #BBBBBB;">To</td>
                        <td>' . $to_date . '</td>
            	     </tr>
                      <tr bgcolor="#e9f6fc">
                        <td style="border-right:2px solid #BBBBBB;">Reason for Leave</td>
                        <td>' . $reason . '</td>
                  </tr>
                </tbody></table>

            </div>
            <div style="padding:20px 0 10px 0;">Please <a href="' . BASE_URL . '/index/popup" target="_blank" style="color:#b3512f;">click here</a> to login and check the leave details.</div>';
                $result = sapp_Global::_sendEmail($options);
                /* End */
                /* Mail to Reporting Manager */
                $options['subject'] = 'Leave request cancelled';
                $options['header'] = 'Leave Request';
                $options['toEmail'] = $reportingmanageremail;
                $options['toName'] = $reportingmanagername;
                $options['message'] = '<div>Hi,</div>
								<div>The below leave(s) has been cancelled.</div>
								<div>
                <table width="100%" cellspacing="0" cellpadding="15" border="0" style="border:3px solid #BBBBBB; font-size:16px; font-family:Arial, Helvetica, sans-serif; margin:30px 0 30px 0;" bgcolor="#ffffff">
                      <tbody><tr>
                        <td width="28%" style="border-right:2px solid #BBBBBB;">Employee Name</td>
                        <td width="72%">' . $loginUserName . '</td>
                      </tr>
                      <tr bgcolor="#e9f6fc">
                        <td style="border-right:2px solid #BBBBBB;">No. of Day(s)</td>
                        <td>' . $appliedleavesdaycount . '</td>
                      </tr>
                      <tr>
                        <td style="border-right:2px solid #BBBBBB;">From</td>
                        <td>' . $from_date . '</td>
                      </tr>
                      <tr bgcolor="#e9f6fc">
                        <td style="border-right:2px solid #BBBBBB;">To</td>
//.........这里部分代码省略.........
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:101,代码来源:PendingleavesController.php

示例14: deleteAction

 public function deleteAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $id = $this->_request->getParam('objid');
     $messages['message'] = '';
     $messages['msgtype'] = '';
     $count = 0;
     $actionflag = 3;
     if ($id) {
         $appraisalquestionsmodel = new Default_Model_Appraisalquestions();
         $menumodel = new Default_Model_Menu();
         $appraisalquestionsdata = $appraisalquestionsmodel->getAppraisalQuestionbyID($id);
         if ($appraisalquestionsdata[0]['isused'] == 0) {
             $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"), 'modifiedby_role' => $loginuserRole, 'modifiedby_group' => $loginuserGroup, 'modifiedby' => $loginUserId);
             $where = array('id=?' => $id);
             $Id = $appraisalquestionsmodel->SaveorUpdateAppraisalQuestionData($data, $where);
             if ($Id == 'update') {
                 $menuidArr = $menumodel->getMenuObjID('/appraisalquestions');
                 $menuID = $menuidArr[0]['id'];
                 $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                 $configmail = sapp_Global::send_configuration_mail('Question', $appraisalquestionsdata[0]['question']);
                 $messages['message'] = 'Question deleted successfully.';
                 $messages['msgtype'] = 'success';
             } else {
                 $messages['message'] = 'Question cannot be deleted.';
                 $messages['msgtype'] = 'error';
             }
         } else {
             $messages['message'] = 'Question cannot be deleted as its using in appraisal process.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Question cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:42,代码来源:AppraisalquestionsController.php

示例15: savepopupAction

 public function savepopupAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $feedforwardquestionsmodel = new Default_Model_Feedforwardquestions();
     $msgarray = array();
     $result['msg'] = '';
     $result['id'] = '';
     $result['question'] = '';
     $result['description'] = '';
     try {
         $question = trim($this->_request->getParam('question'));
         $description = trim($this->_request->getParam('description'));
         $actionflag = '';
         $data = array('question' => $question, 'description' => $description != '' ? $description : NULL, 'module_flag' => 2, 'modifiedby_role' => $loginuserRole, 'modifiedby_group' => $loginuserGroup, 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $data['createdby_role'] = $loginuserRole;
         $data['createdby_group'] = $loginuserGroup;
         $data['createdby'] = $loginUserId;
         $data['createddate'] = gmdate("Y-m-d H:i:s");
         $data['isactive'] = 1;
         $where = '';
         $actionflag = 1;
         $Id = $feedforwardquestionsmodel->SaveorUpdateFeedforwardQuestionData($data, $where);
         $menuID = FEEDFORWARDQUESTIONS;
         sapp_Global::logManager($menuID, $actionflag, $loginUserId, $Id);
         $result['msg'] = 'success';
         $result['id'] = $Id;
         $result['question'] = $question;
         $result['description'] = $description;
     } catch (Exception $e) {
         $result['msg'] = $e->getMessage();
         $result['id'] = '';
         $result['question'] = '';
         $result['description'] = '';
     }
     $this->_helper->json($result);
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:41,代码来源:FeedforwardquestionsController.php


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