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


PHP Default_Model_Countries::getCountriesDataByID方法代码示例

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


在下文中一共展示了Default_Model_Countries::getCountriesDataByID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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'] = '';
     $actionflag = 3;
     $countryOrgId = '';
     if ($id) {
         $countriesmodel = new Default_Model_Countries();
         $statesmodel = new Default_Model_States();
         $citiesmodel = new Default_Model_Cities();
         $countrydata = $countriesmodel->getCountriesDataByID($id);
         if (!empty($countrydata)) {
             $countryOrgId = $countrydata[0]['country_id_org'];
         }
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $Id = $countriesmodel->SaveorUpdateCountryData($data, $where);
         if ($countryOrgId != '') {
             $statesandcitydata = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $statesandcitywhere = array('countryid=?' => $countryOrgId);
             $StateId = $statesmodel->deleteStateData($statesandcitydata, $statesandcitywhere);
             $CityId = $citiesmodel->deleteCityData($statesandcitydata, $statesandcitywhere);
         }
         if ($Id == 'update') {
             $menuID = COUNTRIES;
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $configmail = sapp_Global::send_configuration_mail('Country', $countrydata[0]['country']);
             $messages['message'] = 'Country deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Country cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Country cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:44,代码来源:CountriesController.php


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