public function blockall() { $citys = explode(',', '北京,浙江,天津,安徽,上海,福建,莆田,重庆,江西,山东,河南,内蒙古,湖北,新疆,湖南,宁夏,广东,西藏,海南,广西,四川,河北,贵州,山西,云南,辽宁,陕西, 吉林,甘肃,黑龙江,青海,江苏,' . $_POST['city_list']); SetSettValue('ipblock_city', serialize($citys)); cleanCache(); $this->jumpUrl = U('Ipblock/index'); $this->success('设置成功!'); }
public function nodelist() { if ($this->isPost()) { $access = $_POST['access']; SetSettValue('accessmode', $access); cleanCache(); $this->success("修改成功!"); } $this->access = GetSettValue('accessmode') ? GetSettValue('accessmode') : 'module'; $this->display(); }
function Payment() { $model = D('Payment'); $this->list = $model->order('sort desc')->findAll(); if ($this->isPost()) { $id = implode(',', (array) $_POST['id']); $map['id'] = array('in', $id); $list = $model->where($map)->getField('id,name'); $status = $_POST['status']; foreach ($list as $val) { SetSettValue($val . '_status', $status); } $count = count($list); cleanCache(); $this->success(($status ? '启用了' : '禁用了') . $count . '个付款方式!'); } $this->display(); }
function index() { if ($this->isPost()) { SetSettValue('365webcall_name', rawurlencode($_POST['365webcall_name'])); SetSettValue('365webcall_email', $_POST['365webcall_email']); SetSettValue('365webcall_accountid', '0594trade'); SetSettValue('365webcall_status', $_POST['365webcall_status']); SetSettValue('365webcall_password', rawurlencode($_POST['365webcall_password'])); SetSettValue('365webcall_url', $_SERVER['HTTP_HOST']); cleanCache(); $this->success('操作成功!'); } else { $this->name = GetSettValue('365webcall_name'); $this->email = GetSettValue('365webcall_email'); $this->accountid = GetSettValue('365webcall_accountid'); $this->pwd = GetSettValue('365webcall_password'); $this->url = GetSettValue('365webcall_url'); $this->name2 = rawurldecode(GetSettValue('365webcall_name')); $this->email2 = GetSettValue('365webcall_email'); $this->accountid2 = GetSettValue('365webcall_accountid'); $this->pwd2 = rawurldecode(GetSettValue('365webcall_accountid')); $this->display(); } }
function _list($map = null, $firstRow, $firstRow) { //排序字段 if (isset($_REQUEST['order'])) { $this->sort = $_REQUEST['order'] ? $_REQUEST['order'] : 'sort'; } //排序方式默认按照倒序排列 //接受 sost参数 0 表示倒序 非0都 表示正序 if (isset($_REQUEST['sort'])) { $this->sort = $this->sort . ' ' . ($_REQUEST['sort'] ? 'asc' : 'desc'); } if (!$this->sort) { $this->sort = "id desc"; } if (!empty($_REQUEST['listRows'])) { $listRows = $_REQUEST['listRows']; SetSettValue('listRows', $listRows); } elseif (GetSettValue('listRows', false)) { $listRows = GetSettValue('listRows', false); } else { $listRows = 20; } $count = $this->dao->where($map)->count(); import('ORG.Util.Page'); $page = new Page($count, $listRows); /*foreach ( $map as $key => $val ) { $page->parameter .= "key=" . urlencode ( $val ) . "&"; }*/ $list = $this->dao->where($map)->order($this->sort)->limit($firstRow . ',' . $firstRow)->findall(); if ($list) { $res['show'] = $page->show(); $res['list'] = $list; $res['msg'] = ''; $res['code'] = 0; return $res; } else { $res['msg'] = '没有记录'; $res['code'] = 1; return $res; } }