• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Province类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: updateProvince

 function updateProvince($xmlStr)
 {
     if (!($domDoc = domxml_open_mem($xmlStr))) {
         return false;
     }
     $province = new Province();
     $province->parseDomDocument($domDoc);
     $ret = $province->updateRecord();
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:10,代码来源:ProvinceEncode.php


示例2: getProvinceDetails

 function getProvinceDetails($provinceID)
 {
     $province = new Province();
     $province->selectRecord($provinceID);
     if (!($domDoc = $province->getDomDocument())) {
         return false;
     } else {
         $xmlStr = $domDoc->dump_mem(true);
         return $xmlStr;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:11,代码来源:ProvinceDetails.php


示例3: actionCreate

 /**
  * 录入
  *
  */
 public function actionCreate()
 {
     parent::_acl('province_create');
     $model = new Province();
     if (isset($_POST['Province'])) {
         $model->attributes = $_POST['Province'];
         if ($model->save()) {
             AdminLogger::_create(array('catalog' => 'create', 'intro' => '录入省份,ID:' . $model->id));
             $this->redirect(array('index'));
         }
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:zywh,项目名称:maplecity,代码行数:17,代码来源:ProvinceController.php


示例4: updatePosition

 function updatePosition()
 {
     $positionList = $this->input->post('positionList');
     $idList = $this->input->post('idList');
     $locations = new Province();
     for ($i = 0; $i < count($idList); $i++) {
         $locations->where("id", $idList[$i]);
         $locations->get();
         $locations->position = $positionList[$i];
         $locations->save();
         $locations->clear();
     }
     redirect("admin/locations/listAll/");
 }
开发者ID:lxthien,项目名称:batdongsan,代码行数:14,代码来源:locations.php


示例5: save

 function save($object = '', $related_field = '')
 {
     if (!$this->exists()) {
         $o = new Province();
         $o->select_max('position');
         $o->get();
         if (count($o->all) != 0) {
             $max = $o->position + 1;
             $this->position = $max;
         } else {
             $this->postion = 1;
         }
     }
     return parent::save($object, $related_field);
 }
开发者ID:lxthien,项目名称:batdongsan,代码行数:15,代码来源:province.php


示例6: actionEditmoreinfo

 public function actionEditmoreinfo($user_id)
 {
     $user_more_info = UserInfoAR::model()->findByPk($user_id);
     $this->assign('user_more', $user_more_info);
     $maritalStatus = MaritalStatus::model()->findAll();
     // 'MaritalStatus', 'marital_status_id'),
     $hometown = Hometown::model()->findAll();
     // 'Province', 'hometown_id'),
     $nation = Nation::model()->findAll();
     // 'Nation', 'nation_id'),
     $bodyType = BodyType::model()->findAll();
     // 'BodyType', 'body_type_id'),
     $education = Education::model()->findAll();
     // 'Education', 'education_id'),
     $school = School::model()->findAll();
     // 'School', 'school_id'),
     $province = Province::model()->findAll();
     // 'Province', 'province_id'),
     $job = Job::model()->findAll();
     // '$maritalSta,
     $this->assign('maritalStatus', $maritalStatus);
     $this->assign('hometown', $hometown);
     $this->assign('nation', $nation);
     $this->assign('bodyType', $bodyType);
     $this->assign('education', $education);
     $this->assign('school', $school);
     $this->assign('province', $province);
     $this->assign('job', $job);
 }
开发者ID:sheepcat,项目名称:piebridge,代码行数:29,代码来源:PersonController.php


示例7: getMyprofile

 public function getMyprofile()
 {
     $id = Auth::user()->id;
     $alumni_id = null;
     $sql = "SELECT * FROM alumni WHERE account_id = ?";
     $prof = DB::select($sql, array($id));
     if ($prof != null) {
         $alumni_id = $prof[0]->id;
     }
     $sql2 = "SELECT * FROM degree WHERE alumni_id = ?";
     $deg = DB::select($sql2, array($alumni_id));
     $sql3 = "SELECT * FROM work_experience WHERE alumni_id = ?";
     $wrk_exp = DB::select($sql3, array($alumni_id));
     $sql4 = "SELECT * FROM certificate WHERE alumni_id = ?";
     $certificate = DB::select($sql4, array($alumni_id));
     // $sql5 = "SELECT * FROM alumni_tracer WHERE alumni_id = ?";
     $sql5 = "SELECT at.*, sq.question, sc.choice\n\t\t\t\tFROM alumni_tracer AS at\n\t\t\t\tINNER JOIN survey_questions AS sq\n\t\t\t\tON sq.id = at.question_id\n\t\t\t\tINNER JOIN survey_choices AS sc\n\t\t\t\tON sc.id = at.choice_id\n\t\t\t\tWHERE at.alumni_id = ?\n\t\t\t\tORDER BY at.question_id";
     $a_tracer = DB::select($sql5, array($alumni_id));
     $dept = Department::all();
     $region = Region::all();
     $province = Province::all();
     $occupation = Occupation::all();
     $company = Company::all();
     $deg_title = DegreeTitle::all();
     $school = School::all();
     $jobs = Job::all();
     $field = Field::all();
     $questions = DB::select("SELECT * FROM survey_questions");
     $civil_status = DB::select("SELECT * FROM civil_status");
     return View::make('user.profile')->with('company', $company)->with('field', $field)->with('occupation', $occupation)->with('work_exp', $wrk_exp)->with('degree', $deg)->with('a_tracer', $a_tracer)->with('certificate', $certificate)->with('school', $school)->with('deg_title', $deg_title)->with('profile', $prof)->with('dept', $dept)->with('region', $region)->with('province', $province)->with('civil_status', $civil_status)->with('questions', $questions)->with('jobs', $jobs);
 }
开发者ID:patocjurel,项目名称:capstone-project,代码行数:31,代码来源:UserController.php


示例8: getLocation

 public static function getLocation($ward_id, $district_id, $province_id)
 {
     $ward_type = null;
     $ward_name = null;
     $district_type = null;
     $district_name = null;
     $province_type = null;
     $province_name = null;
     if (isset($ward_id)) {
         $ward = Ward::model()->findByPk($ward_id);
         if ($ward) {
             $ward_type = $ward->type;
             $ward_name = $ward->name;
         }
     }
     if (isset($district_id)) {
         $district = District::model()->findByPk($district_id);
         if ($district) {
             $district_type = $district->type;
             $district_name = $district->name;
         }
     }
     if (isset($province_id)) {
         $province = Province::model()->findByPk($province_id);
         if ($province) {
             $province_type = $province->type;
             $province_name = $province->name;
         }
     }
     return $ward_type . " " . $ward_name . ", " . $district_type . " " . $district_name . ", " . $province_type . " " . $province_name;
 }
开发者ID:huynt57,项目名称:vksnd,代码行数:31,代码来源:Util.php


示例9: getConfig

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function getConfig()
 {
     if (Payment::VeryPayment() == false) {
         return View::make('clinic.payment.renews-payment');
     }
     $user = Sentry::getUser();
     $clinic = Clinic::where('user_id', $user->id)->first();
     $adress = Address::find($clinic->address_id);
     $province_id = City::find($adress->city_id)->province_id;
     $country_id = Province::find($province_id)->country_id;
     $option = $clinic->insurances;
     #$option      = Option::where('name', $clinic->id.'-clinic-insurance')->first();
     $array = array();
     if ($option) {
         $segs = explode(',', $option);
         $segok = '';
         foreach ($segs as $seg) {
             $very = Insurance::where('id', $seg)->first();
             if ($very) {
                 $array[] = array('value' => $very->id, 'text' => $very->name);
             }
         }
     }
     /**/
     $optionLang = Option::where('name', $clinic->id . '-clinic-lang')->first();
     if (!$option) {
         return View::make('clinic.config.config')->with('country_id', $country_id)->with('clinic', $clinic)->with('adress', $adress);
     } else {
         return View::make('clinic.config.config')->with('clinic', $clinic)->with('option', $array)->with('adress', $adress)->with('country_id', $country_id)->with('optionLang', $optionLang);
     }
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:36,代码来源:ClinicController.php


示例10: province

 public function province()
 {
     $result = Province::where('PAK_ID', Input::get('id'))->select('PROVINCE_ID', 'PROVINCE_NAME')->get();
     $dropdown = '<option value=""></option>';
     foreach ($result as $result) {
         $dropdown .= '<option value="' . $result->PROVINCE_ID . '">' . $result->PROVINCE_NAME . '</option>';
     }
     return Response::make($dropdown);
 }
开发者ID:terkmods,项目名称:CBT,代码行数:9,代码来源:BaseController.php


示例11: getDropdown

 public function getDropdown()
 {
     global $dataDropdown;
     $dataDropdown = array();
     $parents = Province::model()->findALl('t.status=1 ORDER BY t.name');
     foreach ($parents as $parent) {
         $dataDropdown[$parent->id] = $parent->name;
     }
     return $dataDropdown;
 }
开发者ID:phantsang,项目名称:xzsUuJg0keDWW5Rx679PHBVBJ,代码行数:10,代码来源:Province.php


示例12: edit_district

 public function edit_district($code)
 {
     $district = District::getDistrict($code);
     $data['district'] = $district[0];
     $data['title'] = "District Management::Edit " . $district->name . " District";
     $data['module_view'] = "add_district_view";
     $data['quick_link'] = "new_district";
     $data['provinces'] = Province::getAll();
     $this->base_params($data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:10,代码来源:district_management.php


示例13: saveProAddress

 public static function saveProAddress(UserProudctAddress $userprodaddress, $user_id)
 {
     $_POST['UserProudctAddress']['province'] = 'xx';
     $_POST['UserProudctAddress']['city'] = 'xx';
     $_POST['UserProudctAddress']['area'] = 'xx';
     $_POST['UserProudctAddress']['sysaddress'] = 'xx';
     if (isset($_POST['province'])) {
         $_POST['UserProudctAddress']['province'] = $_POST['province'];
         $provincename = Province::model()->find("provinceID=:proid", array(":proid" => $_POST['UserProudctAddress']['province']));
         if ($provincename) {
             $_POST['UserProudctAddress']['sysaddress'] = $provincename->province;
         }
     }
     if (isset($_POST['city'])) {
         $_POST['UserProudctAddress']['city'] = $_POST['city'];
         $cityname = City::model()->find("cityID=:cityid", array(":cityid" => $_POST['UserProudctAddress']['city']));
         if ($cityname) {
             $_POST['UserProudctAddress']['sysaddress'] .= $cityname->city;
         }
     }
     if (isset($_POST['area'])) {
         $_POST['UserProudctAddress']['area'] = $_POST['area'];
         $areaname = Area::model()->find("areaID=:areaid", array(":areaid" => $_POST['UserProudctAddress']['area']));
         if ($areaname) {
             $_POST['UserProudctAddress']['sysaddress'] .= $areaname->area;
         }
     }
     $_POST['UserProudctAddress']['user_id'] = $user_id;
     $userprodaddress->setAttributes($_POST['UserProudctAddress']);
     foreach ((array) $_POST['UserProudctAddress'] as $key => $value) {
         if (trim($value) == '') {
             $userprodaddress->addError($key, "字段不能为空");
             break;
         }
     }
     if (!$userprodaddress->getErrors()) {
         $userprodaddress->setAttribute('addtime', time());
         $userprodaddress->setAttribute('addip', Yii::app()->request->userHostAddress);
         if ($userprodaddress->validate()) {
             if ($userprodaddress->isNewRecord) {
                 $result = $userprodaddress->save();
             } else {
                 $result = $userprodaddress->update();
             }
             if (!$result) {
                 $userprodaddress->addError("realname", "更新失败");
             }
         } else {
             $userprodaddress->addError("realname", "更新失败");
         }
     }
     return $userprodaddress;
 }
开发者ID:bfyang5130,项目名称:zzl,代码行数:53,代码来源:MemberService.php


示例14: actionListCity

 public function actionListCity()
 {
     //		$data=::model()->findAll('referid=:referid',
     if (isset($_POST['provinceId'])) {
         $provinceId = $_POST['provinceId'];
     }
     $cities = Province::model()->findByPk($provinceId)->cities;
     //		$data=CHtml::listData($data,'id','name');
     foreach ($cities as $city) {
         echo CHtml::tag('option', array('value' => $city->id), CHtml::encode($city->name), true);
     }
 }
开发者ID:stan5621,项目名称:jp_edu_online,代码行数:12,代码来源:AreaController.php


示例15: edit_user

 public function edit_user($id)
 {
     $user = Users::getUser($id);
     $data['user'] = $user;
     $data['title'] = "User Management::Edit " . $user->Name . "'s Details";
     $data['title'] = "User Management::Add New User";
     $data['module_view'] = "add_user_view";
     $data['levels'] = Access_Level::getAll();
     $data['districts'] = District::getAll();
     $data['provinces'] = Province::getAll();
     $this->base_params($data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:12,代码来源:user_management.php


示例16: view_list

 public function view_list()
 {
     $year = $this->input->post("year");
     $epiweek = $this->input->post("epiweek");
     $dnr_districts = District::getDNRDistricts($year, $epiweek);
     $provinces = Province::getAll();
     $data['provinces'] = $provinces;
     $data['dnr_districts'] = $dnr_districts;
     $data['report_view'] = "dnr_districts_v";
     $data['small_title'] = "DNR Districts in " . $year . " Epiweek " . $epiweek;
     $this->base_params($data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:12,代码来源:dnr_districts.php


示例17: profile

 public static function profile()
 {
     if (current_user_can('profile')) {
         $user_id = get_current_user_id();
         $usermeta = \UserMeta::where('user_id', $user_id)->first();
         $cities = self::idandname(\City::all(), "id", "name");
         $provinces = self::idandname(\Province::all(), "id", "name");
         $countries = self::idandname(\Country::all(), "id", "name");
         View::make("site/user/profile", compact('cities', 'provinces', 'countries', 'usermeta'));
         die;
     }
     wp_redirect("/login");
     exit;
 }
开发者ID:hasangilak,项目名称:wp-semi-laravel,代码行数:14,代码来源:UserController.php


示例18: edit_weekly_data

 public function edit_weekly_data($epiweek, $reporting_year, $district)
 {
     $provinces = Province::getAll();
     $districts = District::getAll();
     $diseases = Disease::getAllObjects();
     $data['provinces'] = $provinces;
     $data['districts'] = $districts;
     $data['diseases'] = $diseases;
     $data['prediction'] = Surveillance::getPrediction();
     $data['surveillance_data'] = Surveillance::getSurveillanceData($epiweek, $reporting_year, $district);
     $data['lab_data'] = Lab_Weekly::getWeeklyDistrictLabData($epiweek, $reporting_year, $district);
     $data['editing'] = true;
     $data['scripts'] = array("special_date_picker.js", "validationEngine-en.js", "validator.js");
     $data["styles"] = array("validator.css");
     $this->base_params($data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:16,代码来源:weekly_data_management.php


示例19: authenticate

 /**
  *用户有可能输入四种情况:
  * 1.景点名
  * 2.城市名
  * 3.国家名
  * 4.省的名字
  * 5.一个数据库没有的名字
  * 6.要从行政数据库里面查找名字
  */
 public function authenticate($location)
 {
     //先判断这是否是一个景点名
     if ($this->find('name=:name', array(':name' => $location))) {
         return $this->_flag = self::SECENIC;
     } else {
         if (City::model()->loadModel($location)) {
             return $this->_flag = self::CITY;
         } else {
             if (Province::model()->loadModel($location)) {
                 return $this->_flag = self::PROVINCE;
             } else {
                 return $this->_flag = self::INVAILD;
             }
         }
     }
 }
开发者ID:tiger2soft,项目名称:travelman,代码行数:26,代码来源:Scenic.php


示例20: add

 public function add()
 {
     $provinces = Province::getAll();
     $districts = District::getAll();
     $facilities = Facilities::getAll();
     $diseases = Disease::getAllObjects();
     $data['provinces'] = $provinces;
     $data['districts'] = $districts;
     $data['facilities'] = $facilities;
     $data['diseases'] = $diseases;
     $data['scripts'] = array("jquery.ui.core.js", "jquery.ui.datepicker.js", "jquery.ui.widget.js");
     $data['styles'] = array("jquery.ui.all.css");
     $data['title'] = "Line List Data";
     $data['content_view'] = "linelist_data_add_v";
     $data['banner_text'] = "Linelist Data";
     $data['link'] = "submissions_management";
     $data['quick_link'] = "linelisted_data_management";
     $this->base_params($data);
     //$this -> load -> view("template", $data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:20,代码来源:linelisted_data_management.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Proxy类代码示例发布时间:2022-05-23
下一篇:
PHP Provider类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap