Application/Erpadmin/Controller/RegionController.class.php
(开头部分) 31KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/*******************************************************************\
| |
| 房哨(多中介管理运营平台系统) |
| |
| © 2018-2023 http://www.kaidandashi.com/ All rights reserved. |
| |
| 本系统由淮南市银泰软件科技有限公司提供技术支持 |
| |
| QQ号:984784483 |
| |
\*******************************************************************/
namespace Erpadmin\Controller;
use Think\Controller;
class RegionController extends ErpadminbaseController {
/**
* [index 省份列表]
* @Author L
* @DateTime 2018-09-25
*/
public function index() {
if (I('is_ajax')) {
$field = I('field');//排序字段名
$order = I('order');//排序方式 asc desc
$limit = I('limit',30,'int');//每页条数
$limit = $limit > 150 ? 150 : $limit;
$where['level'] = 1;
$keyword = I('keyword');
if ($keyword) {
$where['name'] = array('like',"%{$keyword}%");
}
$region_count = M('region')->where($where)->count();
$Page = new \Think\Page($region_count,$limit);
$region_select = M('region')->where($where)->limit($Page->firstRow.",".$Page->listRows)->select();
$return = array(
'code'=>0,
'msg'=>'',
'count'=>$region_count,
'data'=>$region_select
);
$this->ajaxReturn($return);
} else {
$this->display();
}
}
public function addSheng() {
if (IS_POST) {
$add_data['name'] = I('name');
$add_data['level'] = 1;
$add_data['pid'] = 0;
$add_return = M('region')->add($add_data);
if (!$add_return) {
$this->error('添加失败!');
} else {
$this->success('添加成功!');
后面还有 872 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
