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


PHP Default_Model_Countries::getsingleCountriesData方法代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $orgInfoModel = new Default_Model_Organisationinfo();
     $getorgData = $orgInfoModel->getorgrecords();
     $addpermission = sapp_Global::_checkprivileges(ORGANISATIONINFO, $loginuserGroup, $loginuserRole, 'add');
     $viewpermission = sapp_Global::_checkprivileges(ORGANISATIONINFO, $loginuserGroup, $loginuserRole, 'view');
     $editpermission = sapp_Global::_checkprivileges(ORGANISATIONINFO, $loginuserGroup, $loginuserRole, 'edit');
     $this->view->addpermission = $addpermission;
     $this->view->editpermission = $editpermission;
     if (!empty($getorgData)) {
         $id = $getorgData[0]['id'];
         $data = $getorgData[0];
         $head_data = $orgInfoModel->getorghead_details();
         $data['orghead'] = isset($head_data['head_name']) ? $head_data['head_name'] : "";
         $data['jobtitle'] = isset($head_data['jobtitle_name']) ? $head_data['jobtitle_name'] : "";
         $countryId = $data['country'];
         $stateId = $data['state'];
         $cityId = $data['city'];
         $countriesmodel = new Default_Model_Countries();
         $statesmodel = new Default_Model_States();
         $citiesmodel = new Default_Model_Cities();
         if ($countryId != '') {
             try {
                 $countryData = $countriesmodel->getsingleCountriesData($countryId, 'main');
                 $data['country'] = $countryData['country'];
             } catch (Exception $e) {
                 $data['country'] = 'No country';
             }
         }
         if ($stateId != '') {
             try {
                 $stateData = $statesmodel->getsingleStatesData($stateId, 'main');
                 $data['state'] = $stateData['state'];
             } catch (Exception $e) {
                 $data['state'] = 'No state';
             }
         }
         if ($cityId != '') {
             try {
                 $citiesData = $citiesmodel->getsingleCitiesData($cityId, 'main');
                 $data['city'] = $citiesData['city'];
             } catch (Exception $e) {
                 $data['city'] = 'No city';
             }
         }
         $data['org_startdate'] = sapp_Global::change_date($data['org_startdate'], 'view');
         if ($data['totalemployees'] == 1) {
             $data['totalemployees'] = '20-50';
         } else {
             if ($data['totalemployees'] == 2) {
                 $data['totalemployees'] = '51-100';
             } else {
                 if ($data['totalemployees'] == 3) {
                     $data['totalemployees'] = '101-500';
                 } else {
                     if ($data['totalemployees'] == 4) {
                         $data['totalemployees'] = '501 -1000';
                     } else {
                         $data['totalemployees'] = '> 1000';
                     }
                 }
             }
         }
         $organizationImg = new Zend_Session_Namespace('organizationinfo');
         if (!empty($data['org_image'])) {
             $organizationImg->orgimg = $data['org_image'];
         }
         $data['address1'] = htmlentities($data['address1'], ENT_QUOTES, "UTF-8");
         $data['address2'] = htmlentities($data['address2'], ENT_QUOTES, "UTF-8");
         $data['address3'] = htmlentities($data['address3'], ENT_QUOTES, "UTF-8");
         $this->view->dataArray = $data;
         $this->view->messages = $this->_helper->flashMessenger->getMessages();
         $this->view->role = $loginuserRole;
         $this->view->ermsg = '';
         if ($loginuserGroup == MANAGEMENT_GROUP || $loginuserGroup == HR_GROUP) {
             if ($viewpermission != 'Yes') {
                 $this->view->ermsg = 'noview';
             }
         }
     } else {
         $this->view->ermsg = 'nodata';
     }
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:89,代码来源:OrganisationinfoController.php


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