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


PHP Default_Model_Users::getDepartmentAddress方法代码示例

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


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

示例1: comviewAction

 public function comviewAction()
 {
     if (defined('EMPTABCONFIGS')) {
         $empOrganizationTabs = explode(",", EMPTABCONFIGS);
         if (in_array('empcommunicationdetails', $empOrganizationTabs)) {
             $auth = Zend_Auth::getInstance();
             $empdata = array();
             $empDeptdata = array();
             $empDept = '';
             if ($auth->hasIdentity()) {
                 $loginUserId = $auth->getStorage()->read()->id;
             }
             $id = $this->getRequest()->getParam('userid');
             if ($id == '') {
                 $id = $loginUserId;
             }
             $callval = $this->getRequest()->getParam('call');
             if ($callval == 'ajaxcall') {
                 $this->_helper->layout->disableLayout();
             }
             $objName = 'empcommunicationdetails';
             $empcommdetailsform = new Default_Form_empcommunicationdetails();
             $empcommdetailsform->removeElement("submit");
             $elements = $empcommdetailsform->getElements();
             if (count($elements) > 0) {
                 foreach ($elements as $key => $element) {
                     if ($key != "Cancel" && $key != "Edit" && $key != "Delete" && $key != "Attachments") {
                         $element->setAttrib("disabled", "disabled");
                     }
                 }
             }
             try {
                 if ($id) {
                     $employeeModal = new Default_Model_Employee();
                     $empdata = $employeeModal->getsingleEmployeeData($id);
                     if ($empdata == 'norows') {
                         $this->view->rowexist = "norows";
                         $this->view->empdata = "";
                     } else {
                         $this->view->rowexist = "rows";
                         if (!empty($empdata)) {
                             $empDept = $empdata[0]['department_id'];
                             $empcommdetailsModal = new Default_Model_Empcommunicationdetails();
                             $usersModel = new Default_Model_Users();
                             $countriesModel = new Default_Model_Countries();
                             $statesmodel = new Default_Model_States();
                             $citiesmodel = new Default_Model_Cities();
                             $orgInfoModel = new Default_Model_Organisationinfo();
                             $msgarray = array();
                             $deptModel = new Default_Model_Departments();
                             if ($empDept != '' && $empDept != 'NULL') {
                                 $departmentAddress = $usersModel->getDepartmentAddress($empDept);
                             } else {
                                 $departmentAddress = $usersModel->getOrganizationAddress($empDept);
                             }
                             $data = $empcommdetailsModal->getsingleEmpCommDetailsData($id);
                             if (!empty($data)) {
                                 if ($data[0]['perm_country'] != '') {
                                     $countrieslistArr = $countriesModel->getCountryCode($data[0]['perm_country']);
                                     if (sizeof($countrieslistArr) > 0) {
                                         $empcommdetailsform->perm_country->addMultiOption('', 'Select Country');
                                         foreach ($countrieslistArr as $countrieslistres) {
                                             $empcommdetailsform->perm_country->addMultiOption($countrieslistres['id'], $countrieslistres['country_name']);
                                         }
                                     }
                                 }
                                 if ($data[0]['perm_country'] != '') {
                                     $statePermlistArr = $statesmodel->getStatesList($data[0]['perm_country']);
                                     if (sizeof($statePermlistArr) > 0) {
                                         $empcommdetailsform->perm_state->addMultiOption('', 'Select State');
                                         foreach ($statePermlistArr as $statelistres) {
                                             $empcommdetailsform->perm_state->addMultiOption($statelistres['id'] . '!@#' . $statelistres['state_name'], $statelistres['state_name']);
                                         }
                                     }
                                 }
                                 if ($data[0]['perm_state'] != '') {
                                     $cityPermlistArr = $citiesmodel->getCitiesList($data[0]['perm_state']);
                                     if (sizeof($cityPermlistArr) > 0) {
                                         $empcommdetailsform->perm_city->addMultiOption('', 'Select City');
                                         foreach ($cityPermlistArr as $cityPermlistres) {
                                             $empcommdetailsform->perm_city->addMultiOption($cityPermlistres['id'] . '!@#' . $cityPermlistres['city_name'], $cityPermlistres['city_name']);
                                         }
                                     }
                                 }
                                 if ($data[0]['current_country'] != '' && $data[0]['current_state'] != '') {
                                     $countriesArr = $countriesModel->getCountryCode($data[0]['current_country']);
                                     if (sizeof($countriesArr) > 0) {
                                         $empcommdetailsform->current_country->addMultiOption('', 'Select Country');
                                         foreach ($countriesArr as $countrieslistres) {
                                             $empcommdetailsform->current_country->addMultiOption($countrieslistres['id'], $countrieslistres['country_name']);
                                         }
                                     }
                                     $statecurrlistArr = $statesmodel->getStatesList($data[0]['current_country']);
                                     if (sizeof($statecurrlistArr) > 0) {
                                         $empcommdetailsform->current_state->addMultiOption('', 'Select State');
                                         foreach ($statecurrlistArr as $statecurrlistres) {
                                             $empcommdetailsform->current_state->addMultiOption($statecurrlistres['id'] . '!@#' . $statecurrlistres['state_name'], $statecurrlistres['state_name']);
                                         }
                                     }
                                     $currstateNameArr = $statesmodel->getStateName($data[0]['current_state']);
//.........这里部分代码省略.........
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:101,代码来源:MyemployeesController.php

示例2: communicationAction

 public function communicationAction()
 {
     if (defined('EMPTABCONFIGS')) {
         $empOrganizationTabs = explode(",", EMPTABCONFIGS);
         if (in_array('empcommunicationdetails', $empOrganizationTabs)) {
             $empdata = array();
             $departmentAddress = array();
             $tabName = "communication";
             $emptyFlag = 0;
             $auth = Zend_Auth::getInstance();
             if ($auth->hasIdentity()) {
                 $loginUserId = $auth->getStorage()->read()->id;
                 $id = $loginUserId;
                 $employeeModal = new Default_Model_Employee();
                 $empdata = $employeeModal->getsingleEmployeeData($id);
                 if ($empdata == 'norows') {
                     $this->view->rowexist = "norows";
                     $this->view->empdata = "";
                 } else {
                     if (!empty($empdata)) {
                         $this->view->rowexist = "rows";
                         $empcommdetailsform = new Default_Form_empcommunicationdetails();
                         $empcommdetailsModal = new Default_Model_Empcommunicationdetails();
                         $usersModel = new Default_Model_Users();
                         $countriesModel = new Default_Model_Countries();
                         $statesmodel = new Default_Model_States();
                         $citiesmodel = new Default_Model_Cities();
                         $countrieslistArr = $countriesModel->getTotalCountriesList();
                         $msgarray = array();
                         //Department address
                         $deptId = $empdata[0]['department_id'];
                         if ($deptId != '' && $deptId != '') {
                             $departmentAddress = $usersModel->getDepartmentAddress($deptId);
                         } else {
                             $departmentAddress = $usersModel->getOrganizationAddress();
                         }
                         if (!empty($countrieslistArr)) {
                             $empcommdetailsform->perm_country->addMultiOption('', 'Select Country');
                             $empcommdetailsform->current_country->addMultiOption('', 'Select Country');
                             foreach ($countrieslistArr as $countrieslistres) {
                                 $empcommdetailsform->perm_country->addMultiOption($countrieslistres['id'], utf8_encode($countrieslistres['country_name']));
                                 $empcommdetailsform->current_country->addMultiOption($countrieslistres['id'], utf8_encode($countrieslistres['country_name']));
                             }
                         } else {
                             $msgarray['perm_country'] = 'Countries are not configured yet';
                             $msgarray['current_country'] = 'Countries are not configured yet';
                             $emptyFlag++;
                         }
                         //login Employee communication details.....
                         $data = $empcommdetailsModal->getsingleEmpCommDetailsData($loginUserId);
                         if (!empty($data)) {
                             $statePermlistArr = $statesmodel->getStatesList($data[0]['perm_country']);
                             if (sizeof($statePermlistArr) > 0) {
                                 $empcommdetailsform->perm_state->addMultiOption('', 'Select State');
                                 foreach ($statePermlistArr as $statelistres) {
                                     $empcommdetailsform->perm_state->addMultiOption($statelistres['id'] . '!@#' . $statelistres['state_name'], $statelistres['state_name']);
                                 }
                             }
                             $cityPermlistArr = $citiesmodel->getCitiesList($data[0]['perm_state']);
                             if (sizeof($cityPermlistArr) > 0) {
                                 $empcommdetailsform->perm_city->addMultiOption('', 'Select City');
                                 foreach ($cityPermlistArr as $cityPermlistres) {
                                     $empcommdetailsform->perm_city->addMultiOption($cityPermlistres['id'] . '!@#' . $cityPermlistres['city_name'], $cityPermlistres['city_name']);
                                 }
                             }
                             if ($data[0]['current_country'] != '' && $data[0]['current_state'] != '') {
                                 $statecurrlistArr = $statesmodel->getStatesList($data[0]['current_country']);
                                 if (sizeof($statecurrlistArr) > 0) {
                                     $empcommdetailsform->current_state->addMultiOption('', 'Select State');
                                     foreach ($statecurrlistArr as $statecurrlistres) {
                                         $empcommdetailsform->current_state->addMultiOption($statecurrlistres['id'] . '!@#' . $statecurrlistres['state_name'], $statecurrlistres['state_name']);
                                     }
                                 }
                                 $currstateNameArr = $statesmodel->getStateName($data[0]['current_state']);
                             }
                             if ($data[0]['current_country'] != '' && $data[0]['current_state'] != '' && $data[0]['current_city'] != '') {
                                 $cityCurrlistArr = $citiesmodel->getCitiesList($data[0]['current_state']);
                                 if (sizeof($cityCurrlistArr) > 0) {
                                     $empcommdetailsform->current_city->addMultiOption('', 'Select State');
                                     foreach ($cityCurrlistArr as $cityCurrlistres) {
                                         $empcommdetailsform->current_city->addMultiOption($cityCurrlistres['id'] . '!@#' . $cityCurrlistres['city_name'], $cityCurrlistres['city_name']);
                                     }
                                 }
                                 $currcityNameArr = $citiesmodel->getCityName($data[0]['current_city']);
                             }
                             $permstateNameArr = $statesmodel->getStateName($data[0]['perm_state']);
                             $permcityNameArr = $citiesmodel->getCityName($data[0]['perm_city']);
                             $empcommdetailsform->populate($data[0]);
                             $empcommdetailsform->setDefault('perm_country', $data[0]['perm_country']);
                             $empcommdetailsform->setDefault('perm_state', $permstateNameArr[0]['id'] . '!@#' . $permstateNameArr[0]['statename']);
                             $empcommdetailsform->setDefault('perm_city', $permcityNameArr[0]['id'] . '!@#' . $permcityNameArr[0]['cityname']);
                             if ($data[0]['current_country'] != '') {
                                 $empcommdetailsform->setDefault('current_country', $data[0]['current_country']);
                             }
                             if ($data[0]['current_state'] != '') {
                                 $empcommdetailsform->setDefault('current_state', $currstateNameArr[0]['id'] . '!@#' . $currstateNameArr[0]['statename']);
                             }
                             if ($data[0]['current_city'] != '') {
                                 $empcommdetailsform->setDefault('current_city', $currcityNameArr[0]['id'] . '!@#' . $currcityNameArr[0]['cityname']);
                             }
//.........这里部分代码省略.........
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:101,代码来源:MydetailsController.php


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