phpcms获取省份

编辑整理:整理来源:搜狗问问,浏览量:42,时间:2023-02-25 14:30:01

phpcms获取省份,php获取地址栏参数,php获取地理位置

关于phpcms获取省份内容导航:

1、phpcms获取省份


$province_list = getcache('linkage','linkage');
$province_arr = $province_list['data'];
$province_str = '';
foreach($province_arr as $k=>$v){
$province_str .= '';
}
$this->assign('province_str',$province_str);

//获取城市
$city_str = '';
if($info['province']){
$city_arr = $province_list['parentid'][$info['province']];
foreach($city_arr as $k=>$v){
$city_str .= '';
}
}
$this->assign('city_str',$city_str);

//获取地区
$area_str = '';
if($info['city']){
$area_arr = $province_list['parentid'][$info['city']];
foreach($area_arr as $k=>$v){
$area_str .= '';
}
}
$this->assign('area_str',$area_str);

$this->assign('info',$info);
$this->display();
}

//删除
public function delete(){
$id = I('get.id');
if(!$id){
$this->error('参数错误');
}
$res = M('member')->where(array('id'=>$id))->delete();
if($res){
$this->success('删除成功');
}else{
$this->error('删除失败');
}
}

//更新状态
public function update_status(){
$id = I('get.id');
$status = I('get.status');
if(!$id){
$this->error('参数错误');
}
$res = M('member')->where(array('id'=>$id))->save(array('status'=>$status));
if($res){
$this->success('更新成功');
}else{
$this->error('更新失败');
}
}

//更新状态
public function update_type(){
$id = I('get.id');
$type = I('get.type');
if(!$id){
$this->error('参数错误');
}
$res = M('member')->where(array('id'=>$id))->save(array('type'=>$type));
if($res){
$this->success('更新成功');
}else{
$this->error('更新失败');
}
}

//更新状态
public function update_is_check(){
$id = I('get.id');
$is_check = I('get.is_check');
if(!$id){
$this->error('参数错误');
}
$res = M('member')->where(array('id'=>$id))->save(array('is_check'=>$is_check));
if($res){
$this->success('更新成功');
}else{
$this->error('更新失败');
}
}

//更新状态
public function update_is_lock(){
$id = I('get.id');
$is_lock = I('get.is_lock');
if(!$id){
$this->error('参数错误');
}
$res = M('member')->where(array('id'=>$id))->save(array('is_lock'=>$is_lock));
if($res){
$this->success('更新成功');
}else{
$this->error('更新失败');
}
}

//更新状态
public function update_is_vip(){
$id = I('get.id');
$is_vip = I('get.is_vip');
if(!$id){
$this->error('参数错误');
}
$res = M('member')->where(array('id'=>$id))->save(array('is_vip'=>$is_vip));
if($res){
$this->success('更新成功');
}else{
$this->error('更新失败');
}
}

//更新状态
public function update_is_admin(){
$id = I('get.id');
$is_admin = I('get.is_admin');
if(!$id){
$this->error('参数错误');
}
$res = M('member')->where(array('id'=>$id))->save(array('is_admin'=>$is_admin));
if($res){
$this->success('更新成功');
}else{
$this->error('更新失败');
}
}

//更新状态
public function update_is_agent(){
$id = I('get.id');
$is_agent = I('get.is_agent');
if(!$id){
$this->error('参数错误');
}
$res = M('member')->where(array('id'=>$id))->save(array('is_agent'=>$is_agent));
if($res){
$this->success('更新成功');
}else{
$this->error('更新失败');
}
}

//更新状态
public function update_is_partner(){
$id = I('get.id');
$is_partner = I('get.is_partner');
if(!$id){
$this->error('参数错误');
}
$res = M('member')->where(array('id'=>$id))->save(array('is_partner'=>$is_partner));
if($res){
$this->success('更新成功');
}else{
$this->error('更新失败');
}
}

//更新状态
public function update_is_
phpcms获取省份

2、php获取地理位置

 这篇文章主要介绍了php利用腾讯ip分享计划获取地理位置示例,大家参考使用吧

代码如下: <?php funct运形ion getIPLoc_QQ($queryIP){     $url = 'http://ip.qq.com/cgi-bin/searchip?searchip1='.$queryIP;     $ch = curl_init($url);     curl_setopt($ch,CURLOPT_ENCODING ,'gb2312');   curl_setopt婷冷标够社过轻($ch, CURLOPT_TIMEOUT, 10);    curl_seto存职料灯三来里pt($ch, CURLOPT_RETURNTRANSFER, true) ; // 获取数据返回   $result = curl_exec($ch);     $result = mb_convert_encoding($result, "utf-8", "gb2312"); // 编码转换,否则乱码  curl_close($ch);    preg_match("@<span>(.*)</span></p>@iU",$result,$ipArray);     $loc = $ipArray[1];     return $loc;  }  //使用 ec史ho getIPLoc_QQ("183.37.209.57"); //即可得到IP地址所在的地址位置。    ?>  
php获取地理位置

3、php获取域名

行业热门话题:

【php获取地理位置】【php获取域名】【php获取地址栏参数】【php获取当前位置】【php获取当前ip地址】【php获取位置信息】【php获取当前页面地址】【php获取当前url】【php获取useragent】【php获取当前url中的参数值】
phpcms获取省份完!

相关推荐:

phpcms获取省份

phpcms获取省份,php获取地址栏参数,php获取地理位置

作者:整理来源:搜狗问问,时间:2023-02-25 14:30,浏览:43



关键词文章生成器,点击查看演示目录:http://www.wskqs.cn/shisange/


淮北软文营销首推创狐企推不错| 营销软文必备 什么叫营销软文| 网络注册设计接单| 袁市容易被接受的软文营销特征-容易被接受的软文营销特征有哪些| phpcms系统参考| 专利权期限 专利权期限的起算日| 海珠seo优化代运营报价| 分享软文营销四大技巧 分享软文营销四大技巧有哪些| 帝国cms怎么刷新列表,帝国cms自动刷新| 我的世界末影箱有什么用 我的世界末影箱有什么用?|
投稿| 1024(定向养站+文章采集+ai聚合)目录程序| 1888(定向养站+文章采集+ai聚合)泛目录版| 淘客文章带货| 双标题| 挖关键词| 违禁词删除| 伪原创| 免费配图| 自助解答| 站长变现| 今日头条| 问答聚合| 818(今日头条资讯聚合演示)| 1024(采集聚合+ai聚合)| 1024 (AI定向养站目录程序)| 定向养站目录程序| ai写作目录程序

苏ICP备2021004623号 (免责声明:本网站部分内容由用户自行上传,如权利人发现存在侵犯其权益情形,请及时与本站联系。)(版权所有:昆山市一路火信息技术服务中心) 友情导航 网络警察提醒您 中国互联网辟谣平台 中国文明网传播文明 中国互联网举报中心