|
|
|
@ -120,6 +120,13 @@ class AmericaIpForbitController extends ThinkController
|
|
|
|
|
}
|
|
|
|
|
fclose($fp);
|
|
|
|
|
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
"op_type"=>3,
|
|
|
|
|
"key"=> getNowDate(),
|
|
|
|
|
"menu"=>"游戏-游戏管理-ip限制白名单-导出",
|
|
|
|
|
"url"=>U("AmericaIpForbit/index")
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$getData = $_GET;
|
|
|
|
|
unset($getData['id']);
|
|
|
|
|
unset($getData['xlsname']);
|
|
|
|
@ -147,6 +154,23 @@ class AmericaIpForbitController extends ThinkController
|
|
|
|
|
$is_change = M('forbit_ip','tab_')->where(['id'=>['in',$id]])->save(['status'=>$status]);
|
|
|
|
|
|
|
|
|
|
if ($is_change) {
|
|
|
|
|
if (I('status')) {
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
"op_type"=>1,
|
|
|
|
|
"key"=> getNowDate(),
|
|
|
|
|
"menu"=>"游戏-游戏管理-ip限制白名单-开启",
|
|
|
|
|
"url"=>U("AmericaIpForbit/index")
|
|
|
|
|
));
|
|
|
|
|
} else{
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
"op_type"=>1,
|
|
|
|
|
"key"=> getNowDate(),
|
|
|
|
|
"menu"=>"游戏-游戏管理-ip限制白名单-关闭",
|
|
|
|
|
"url"=>U("AmericaIpForbit/index")
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->ajaxReturn(['code'=>1]);
|
|
|
|
|
} else {
|
|
|
|
|
$this->ajaxReturn(['code'=>0]);
|
|
|
|
@ -165,6 +189,14 @@ class AmericaIpForbitController extends ThinkController
|
|
|
|
|
$is_del = $is_change = M('forbit_ip','tab_')->where(['id'=>['in',$id]])->delete();
|
|
|
|
|
|
|
|
|
|
if ($is_del) {
|
|
|
|
|
$hav_firbit = M('forbit_ip','tab_')->where(['id'=>I('id')])->find();
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
"op_type"=>2,
|
|
|
|
|
"key"=> $hav_firbit['user_account'],
|
|
|
|
|
"menu"=>"游戏-游戏管理-ip限制白名单-删除",
|
|
|
|
|
"url"=>U("AmericaIpForbit/index")
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$this->ajaxReturn(['code'=>1]);
|
|
|
|
|
} else {
|
|
|
|
|
$this->ajaxReturn(['code'=>0]);
|
|
|
|
@ -208,6 +240,14 @@ class AmericaIpForbitController extends ThinkController
|
|
|
|
|
$is_insert = M('forbit_ip','tab_')->add($insert);
|
|
|
|
|
|
|
|
|
|
if ($is_insert) {
|
|
|
|
|
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
"op_type"=>0,
|
|
|
|
|
"key"=> I('account'),
|
|
|
|
|
"menu"=>"游戏-游戏管理-ip限制白名单-新增",
|
|
|
|
|
"url"=>U("AmericaIpForbit/index")
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$this->success('添加成功',U('AmericaIpForbit/index'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->error('添加失败');
|
|
|
|
|