Merge branch 'release' of 47.111.118.107:wmtx/platform into feature/PlatFormCoinData

master
sunke 5 years ago
commit 88109eb0cd

@ -2221,7 +2221,6 @@ function a_array_unique($array){
*/
function addOperationLog($options)
{
return;
$checkarr = ['op_type','url','key'];
foreach ($checkarr as $v) {
if(!array_key_exists($v,$options)){

@ -0,0 +1,237 @@
<?php
namespace Admin\Controller;
class AmericaIpForbitController extends ThinkController
{
public function index($p = 1) {
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$map = [];
if ($_REQUEST['user_account']) {
$map['user_account'] = ['like',"%{$_REQUEST['user_account']}%"];
}
$data = M('forbit_ip','tab_')
->where($map)
->page($page,$row)
->order('create_time DESC')
->select();
foreach ( $data as $key => $value ) {
$data[$key]['create_time'] = date('Y-m-d H:i:s',$value['create_time']);
}
$count = M('forbit_ip','tab_')
->where($map)
->count();
$appleInteriorBuyStatus = M('tool','tab_')->where(['name'=>'apple_interior_buy'])->getField('status');
$setAppleInteriorBuyStatus = $appleInteriorBuyStatus?0:1;
$page = set_pagination($count, $row);
$this->assign('_page', $page);
$this->assign('apple_interior_buy',$appleInteriorBuyStatus);
$this->assign('set_apple_interior_buy',$setAppleInteriorBuyStatus);
$this->assign('data',$data);
$this->display();
}
public function export() {
$xlsName = 'ip限制白名单';
$xlsCell = array(
"玩家账号", "区域", '状态', '添加人', '添加时间'
);
$map = [];
if ($_REQUEST['user_account']) {
$map['user_account'] = ['like',"%{$_REQUEST['user_account']}%"];
}
$csvFileName = $xlsName.'.csv';
//设置好告诉浏览器要下载excel文件的headers
header('Content-Description: File Transfer');
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
$fp = fopen('php://output', 'a');//打开output流
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
$accessNum = M('forbit_ip','tab_')
->where($map)
->count();
$accessNum =$accessNum['count'];
$perSize = 2000;//每次查询的条数
$pages = ceil($accessNum / $perSize);
for($i = 1; $i <= $pages; $i++) {
$xlsData = M('forbit_ip','tab_')
->field('user_account,area,status,admin_account,create_time')
->where($map)
->limit(($i-1)*$perSize ,$perSize)
->order('create_time DESC')
->select();
foreach($xlsData as $value) {
$value['create_time'] = date("Y-m-d H:i:s",$value['create_time']);
if ($value['status'] == 0) {
$value['status'] = '限制';
} else {
$value['status'] = '不限制';
}
mb_convert_variables('GBK', 'UTF-8', $value);
fputcsv($fp, $value);
}
unset($xlsData);//释放变量的内存
//刷新输出缓冲到浏览器
ob_flush();
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
}
fclose($fp);
$getData = $_GET;
unset($getData['id']);
unset($getData['xlsname']);
}
public function operateIp() {
if (!I('id')) {
$this->ajaxReturn(['code'=>1,'msg'=>'ID未选择']);
} else {
$id = I('id');
}
if (I('status')) {
$status = I('status');
} else {
$status = 0;
}
$map['id'] = ['in',$id];
$is_change = M('forbit_ip','tab_')->where(['id'=>['in',$id]])->save(['status'=>$status]);
if ($is_change) {
$this->ajaxReturn(['code'=>1]);
} else {
$this->ajaxReturn(['code'=>0]);
}
}
public function del() {
if (!I('id')) {
$this->ajaxReturn(['code'=>1,'msg'=>'ID未选择']);
} else {
$id = I('id');
}
$is_del = $is_change = M('forbit_ip','tab_')->where(['id'=>['in',$id]])->delete();
if ($is_del) {
$this->ajaxReturn(['code'=>1]);
} else {
$this->ajaxReturn(['code'=>0]);
}
}
public function add() {
$this->display();
}
public function addUser() {
$insert = [];
$hav_user = M('user','tab_')->where(['account'=>I('account')])->find();
$auth = $_SESSION['onethink_admin']['user_auth'];
if (!$hav_user) {
$this->error('用户不存在');
}
$hav_firbit = M('forbit_ip','tab_')->where(['user_account'=>I('account')])->find();
if ($hav_firbit) {
$this->error('该用户已添加封禁');
}
$insert['user_id'] = $hav_user['id'];
$insert['user_account'] = I('account');
$insert['area'] = I('area');
$insert['status'] = I('status');
$insert['admin_id'] = $auth['uid'];
$insert['admin_account'] = $auth['username'];
$insert['create_time'] = time();
$insert['remarks'] = '';
$is_insert = M('forbit_ip','tab_')->add($insert);
if ($is_insert) {
$this->success('添加成功',U('AmericaIpForbit/index'));
} else {
$this->error('添加失败');
}
}
public function setAppleInteriorBuyStatus() {
$status = I('status');
if (!$status && $status!='0') {
$this->ajaxReturn(['code'=>0]);
}
$is_success = M('tool','tab_')->where(['name'=>'apple_interior_buy'])->save(['status'=>$status]);
if ($is_success) {
$this->ajaxReturn(['code'=>1]);
} else {
$this->ajaxReturn(['code'=>0]);
}
}
}

@ -274,7 +274,7 @@ class ApplyController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']);
addOperationLog(['op_type'=>1,'key'=>$value['promote_account'].'/'.$value['game_name'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']);
}
@ -455,7 +455,7 @@ class ApplyController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-审核游戏分包']);
addOperationLog(['op_type'=>1,'key'=>$value['promote_account'].'/'.$value['game_name'],'op_name'=>'审核游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-删除游戏分包']);
}
@ -493,7 +493,7 @@ class ApplyController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']);
addOperationLog(['op_type'=>1,'key'=>$value['promote_account'].'/'.$value['game_name'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']);
}
@ -550,7 +550,7 @@ class ApplyController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['game_name'].$value['promote_account'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']);
addOperationLog(['op_type'=>1,'key'=>$value['game_name'].'/'.$value['promote_account'],'op_name'=>'打包游戏分包','url'=>U('Apply/and_lists'),'menu'=>'推广员-推广员管理-游戏分包-打包游戏分包']);
}

@ -146,12 +146,20 @@ class MendController extends ThinkController {
if(!empty($create['remark'])){
$params['remark'] = $create['remark'];
}
// dump($create);die();
$res = $promoteService->addShiftTask($params);
if($res['status']){
$userData = M('user','tab_')->field('account')->where(['id'=>$create['user_id']])->find();
$promoteToData = M('promote','tab_')->field('account')->where(['id'=>$create['prmoote_id_to']])->find();
$promoteFromData = M('promote','tab_')->field('account')->where(['id'=>$create['promote_id']])->find();
if ($create['promote_id'] == '0') {
$promoteFromData['account'] = '官方渠道';
}
addOperationLog(['op_type'=>1,'key'=>$userData['account'],'op_name'=>'编辑推广补链','url'=>U('Mend/edit',['id'=>$create['user_id']]),'menu'=>'推广员-推广员管理-推广补链-编辑推广补链']);
addOperationLog(['op_type'=>1,'key'=>$userData['account'].'/'.$promoteFromData['account'].'/'.$promoteToData['account'],'op_name'=>'编辑推广补链','url'=>U('Mend/edit',['id'=>$create['user_id']]),'menu'=>'推广员-推广员管理-推广补链-编辑推广补链']);
$this->success('补链成功', U('lists'), 2);
}else{

@ -236,7 +236,7 @@ class PresidentDepositController extends ThinkController
$data['update_time'] = time();
M('president_deposit', 'tab_')->add($data);
addOperationLog(['op_type'=>0,'key'=>$promoteData['account'].$amount,'op_name'=>'新增会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-奖罚记录管理-新增会长押金']);
addOperationLog(['op_type'=>0,'key'=>$promoteData['account'].'/'.$amount,'op_name'=>'新增会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-奖罚记录管理-新增会长押金']);
return $this->success('保存成功', U('PresidentDeposit/records'));
}
@ -271,7 +271,7 @@ class PresidentDepositController extends ThinkController
$data['update_time'] = time();
M('president_deposit', 'tab_')->where(['promote_id' => $promoteId])->save($data);
addOperationLog(['op_type'=>1,'key'=>$promoteData['account'].$amount,'op_name'=>'编辑会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-会长押金管理-编辑会长押金']);
addOperationLog(['op_type'=>1,'key'=>$promoteData['account'].'/'.$amount,'op_name'=>'编辑会长押金','url'=>U('PresidentDeposit/edit',['id'=>$promoteId]),'menu'=>'推广员-结算单管理-会长押金管理-编辑会长押金']);
return $this->success('保存成功');
}
@ -352,7 +352,7 @@ class PresidentDepositController extends ThinkController
foreach ($promoteData as $key => $value) {
if ($value['amount']) {
addOperationLog(['op_type'=>1,'key'=>$value['account'].$value['amount'],'op_name'=>'编辑押金已退款','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-押金已退款']);
addOperationLog(['op_type'=>1,'key'=>$value['account'].'/'.$value['amount'],'op_name'=>'编辑押金已退款','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-押金已退款']);
}
}
@ -402,7 +402,7 @@ class PresidentDepositController extends ThinkController
foreach ($promoteData as $key => $value) {
if ($value['amount']) {
addOperationLog(['op_type'=>1,'key'=>$value['account'].$value['amount'],'op_name'=>'编辑确认押金到账','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-确认押金到账']);
addOperationLog(['op_type'=>1,'key'=>$value['account'].'/'.$value['amount'],'op_name'=>'编辑确认押金到账','url'=>U('PresidentDeposit/records'),'menu'=>'推广员-结算单管理-会长押金管理-确认押金到账']);
}
}

@ -388,7 +388,7 @@ class PromoteController extends ThinkController
}
addOperationLog(['op_type'=>1,
'key'=>$data['account'].$data['password'].$data['second_pwd'].$data['status'].$data['child_game_permission'].$data['mark1'].$data['mark2'],
'key'=>$data['account'],
'op_name'=>'编辑推广员',
'url'=>U('Promote/edit',['id'=>$_POST['id']]),
'menu'=>'推广员-推广员管理-推广员列表-编辑推广员']);

@ -206,7 +206,7 @@ class PromoteGameRatioController extends ThinkController
$GetData = $_GET;
unset($GetData['export']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出公会分成管理','url'=>U('PromoteGameRatio/lists',$GetData),'menu'=>'统计-结算管理-公会分成管理']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出公会分成管理','url'=>U('PromoteGameRatio/lists',$GetData),'menu'=>'统计-结算管理-公会分成管理-导出数据']);
data2csv($records,$csvTitle, $field);
exit;
@ -337,7 +337,7 @@ class PromoteGameRatioController extends ThinkController
}
}
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).getrelationGameName($promoteGameRatio['game_id']),'op_name'=>'修改游戏分成比例申请','url'=>U('PromoteGameRatio/applyRatio',['id'=>$promoteGameRatio['id']]),'menu'=>'推广员-结算单管理-公会分成管理']);
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['game_id']),'op_name'=>'修改游戏分成比例申请','url'=>U('PromoteGameRatio/applyRatio',['id'=>$promoteGameRatio['id']]),'menu'=>'推广员-结算单管理-公会分成管理']);
} else {//新增
if (empty($params['promote_id'])) {
@ -392,7 +392,7 @@ class PromoteGameRatioController extends ThinkController
}
M()->commit();
addOperationLog(['op_type'=>0,'key'=>getPromoteName($promoteId).getrelationGameName($relationGameId),'op_name'=>'生成游戏分成比例申请','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-生成游戏分成比例申请']);
addOperationLog(['op_type'=>0,'key'=>getPromoteName($promoteId).'/'.getrelationGameName($relationGameId),'op_name'=>'生成游戏分成比例申请','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-生成游戏分成比例申请']);
}
@ -541,10 +541,10 @@ class PromoteGameRatioController extends ThinkController
$spendSave['selle_ratio'] = $promoteGameRatio['ratio'];
M('spend', 'tab_')->where($spendMap)->save($spendSave);
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核通过']);
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核通过']);
}
} else {
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核拒绝']);
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['relation_game_id']),'op_name'=>'审核游戏分成比例订单','url'=>U('PromoteGameRatio/lists'),'menu'=>'推广员-结算单管理-公会分成管理-审核拒绝']);
}
}

@ -398,7 +398,7 @@ class SettlementController extends ThinkController
$GetData = $_POST;
addOperationLog(['op_type'=>0,'key'=>getNowDate(),'op_name'=>'生成汇总结算单','url'=>U('settlement/generateSettlementSheet',$GetData),'menu'=>'推广员-结算单管理-生成汇总结算单']);
addOperationLog(['op_type'=>0,'key'=>$data['orderid'],'op_name'=>'生成汇总结算单','url'=>U('settlement/generateSettlementSheet',$GetData),'menu'=>'推广员-结算单管理-生成汇总结算单']);
return $res ? $this->success('生成成功', true, true) : $this->error('生成失败', true, true);
}

@ -55,12 +55,13 @@ class StatementController extends ThinkController
{
if(!isset($_REQUEST['id'])) $this->error("参数错误");
$id = $_REQUEST['id'];
$statementData = M('statement','tab_')->where(['id'=>$id])->find();
$res = M("statement","tab_")->where("id = '{$id}'")->delete();
if($res !== false){
$statementData = M('statement','tab_')->where(['id'=>$id])->find();
addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].date('YmdHis',$statementData['statement_begin_time']).date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除上游对账单']);
addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].'/'.date('YmdHis',$statementData['statement_begin_time']).'/'.date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除上游对账单']);
$this->ajaxReturn(array("success"=>"ok","code"=>0));
}else{
@ -325,12 +326,12 @@ class StatementController extends ThinkController
);
if($id == 0){
// var_dump(1);die();
addOperationLog(['op_type'=>0,'key'=>$company['partner'].getNowDate(),'op_name'=>'新增上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增上游对账单']);
addOperationLog(['op_type'=>0,'key'=>$company['partner'].'/'.getNowDate(),'op_name'=>'新增上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增上游对账单']);
$res = M("statement","tab_")->add($adddata);
}else{
addOperationLog(['op_type'=>1,'key'=>$company['partner'].getNowDate(),'op_name'=>'编辑上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑上游对账单']);
addOperationLog(['op_type'=>1,'key'=>$company['partner'].'/'.getNowDate(),'op_name'=>'编辑上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑上游对账单']);
$res = M("statement","tab_")->where("id = '{$id}'")->save($adddata);
}

@ -157,7 +157,7 @@ class StatementMangementController extends ThinkController
if (!(M('statement','tab_')->where(['ext_field'=>$_REQUEST['ext_field']])->find())) {
addOperationLog(['op_type'=>0,'key'=>$second_party_info['partner'].getNowDate(),'op_name'=>'新增下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']);
addOperationLog(['op_type'=>0,'key'=>$second_party_info['partner'].'/'.getNowDate(),'op_name'=>'新增下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']);
M('statement','tab_')->add($insert);
$this->ajaxReturn(['code'=>1, 'msg'=>'生成结算单成功']);
@ -216,7 +216,7 @@ class StatementMangementController extends ThinkController
if ((M('statement','tab_')->where(['ext_field'=>$_REQUEST['ext_field']])->save($insert))) {
addOperationLog(['op_type'=>1,'key'=>$second_party_info['partner'].getNowDate(),'op_name'=>'编辑下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']);
addOperationLog(['op_type'=>1,'key'=>$second_party_info['partner'].'/'.getNowDate(),'op_name'=>'编辑下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-新增下游对账单']);
$this->ajaxReturn(['code'=>1, 'msg'=>'结算单编辑成功']);
} else {
@ -230,14 +230,13 @@ class StatementMangementController extends ThinkController
if (!$id) {
$this->ajaxReturn(['code'=>2000,'error'=>'no']);
}
$statementData = M('statement','tab_')->where(['id'=>$id])->find();
$is_del = M('statement','tab_')->where(['id'=>$id])->delete();
if ($is_del) {
$statementData = M('statement','tab_')->where(['id'=>$id])->find();
addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].date('YmdHis',$statementData['statement_begin_time']).date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除下游对账单']);
addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].'/'.date('YmdHis',$statementData['statement_begin_time']).'/'.date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除下游对账单']);
$this->ajaxReturn(['code'=>0,'success'=>'ok']);
} else {
@ -305,6 +304,7 @@ class StatementMangementController extends ThinkController
'remark' => I('remark'),
'reward_time' => strtotime(I('reward_time'))
];
$accounts = I('account');
$user_types = I('user_type');
if ($accounts) {
@ -335,8 +335,8 @@ class StatementMangementController extends ThinkController
if ($upt === false) {
$this->error('保存失败');
} else {
addOperationLog(['op_type'=>1,'key'=>$data['reward_type'].$data['company_type'].$data['money'],'op_name'=>'修改奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
$companyName = M('partner','tab_')->field('partner')->where(['id'=>$data['company_id']])->find();
addOperationLog(['op_type'=>1,'key'=>$companyName['partner'].'/'.(($data['reward_type']==1)?'奖励':'惩罚').'/'.$data['money'],'op_name'=>'修改奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理-修改奖惩记录']);
$this->success('保存成功', U('StatementMangement/rewardManageList'));
}
@ -345,7 +345,8 @@ class StatementMangementController extends ThinkController
$data['creater_id'] = is_login();
$ins = M('reward_record', 'tab_')->add($data);
addOperationLog(['op_type'=>0,'key'=>$data['reward_type'].$data['company_type'].$data['money'],'op_name'=>'新增奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
$companyName = M('partner','tab_')->field('partner')->where(['id'=>$data['company_id']])->find();
addOperationLog(['op_type'=>0,'key'=>$companyName['partner'].'/'.(($data['reward_type']==1)?'奖励':'惩罚').'/'.$data['money'],'op_name'=>'新增奖惩记录','url'=>U('Query/settlement'),'menu'=>'推广员-结算单管理-奖罚记录管理-新增奖惩记录']);
return $ins ? $this->success('新增成功', U('StatementMangement/rewardManageList')) : $this->error('新增失败');
}
@ -359,7 +360,9 @@ class StatementMangementController extends ThinkController
$upt = M('reward_record', 'tab_')->where(['id'=>$id])->delete();
addOperationLog(['op_type'=>2,'key'=>$rewardRecordData['reward_type'].$rewardRecordData['company_type'].$rewardRecordData['money'],'op_name'=>'删除奖惩记录','url'=>U('StatementMangement/rewardManageList'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
$companyName = M('partner','tab_')->field('partner')->where(['id'=>$rewardRecordData['company_id']])->find();
addOperationLog(['op_type'=>2,'key'=>$companyName['partner'].'/'.(($rewardRecordData['reward_type']==1)?'奖励':'惩罚').'/'.$rewardRecordData['money'],'op_name'=>'删除奖惩记录','url'=>U('StatementMangement/rewardManageList'),'menu'=>'推广员-结算单管理-奖罚记录管理']);
return $upt ? $this->success('删除成功') : $this->error('删除失败');
} else {
@ -607,7 +610,7 @@ class StatementMangementController extends ThinkController
if ($is_save) {
addOperationLog(['op_type'=>0,'key'=>'个人结算单'.getNowDate(),'op_name'=>'生成下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-生成下游个人结算单']);
addOperationLog(['op_type'=>0,'key'=>'个人结算单'.'/'.getNowDate(),'op_name'=>'生成下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-生成下游个人结算单']);
$this->ajaxReturn(['status'=>1,'msg'=>'生成成功']);
} else {
@ -837,7 +840,7 @@ class StatementMangementController extends ThinkController
if ($is_save) {
addOperationLog(['op_type'=>1,'key'=>'个人结算单'.getNowDate(),'op_name'=>'编辑下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑下游个人结算单']);
addOperationLog(['op_type'=>1,'key'=>'个人结算单'.'/'.getNowDate(),'op_name'=>'编辑下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑下游个人结算单']);
$this->ajaxReturn(['status'=>1,'msg'=>'修改成功']);
} else {
@ -884,7 +887,7 @@ class StatementMangementController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['company_name'].date('YmdHis',$value['statement_begin_time']).date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']);
addOperationLog(['op_type'=>1,'key'=>$value['company_name'].'/'.date('YmdHis',$value['statement_begin_time']).'/'.date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']);
}
@ -912,7 +915,7 @@ class StatementMangementController extends ThinkController
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['company_name'].date('YmdHis',$value['statement_begin_time']).date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']);
addOperationLog(['op_type'=>1,'key'=>$value['company_name'].'/'.date('YmdHis',$value['statement_begin_time']).'/'.date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']);
}

@ -95,7 +95,7 @@ class SupportController extends ThinkController {
->where(['tab_test_resource.id'=>$map['id']])
->find();
addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].$resourceData['user_account'],'op_name'=>'资源发放审核','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放审核']);
addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].'/'.$resourceData['user_account'],'op_name'=>'资源发放审核','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放审核']);
$this->ajaxReturn(['status'=>1,'msg'=>'操作成功!']);
}else{
@ -124,7 +124,7 @@ class SupportController extends ThinkController {
->where(['tab_test_resource.id'=>$map['id']])
->find();
addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].$resourceData['user_account'],'op_name'=>'资源发放拒绝','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放拒绝']);
addOperationLog(['op_type'=>1,'key'=>$resourceData['promote_account'].'/'.$resourceData['user_account'],'op_name'=>'资源发放拒绝','url'=>U('Support/lists'),'menu'=>'推广员-推广员管理-推广补链-资源发放拒绝']);
$this->ajaxReturn(['status'=>1,'msg'=>'操作成功!']);
}else{

@ -487,7 +487,7 @@ class TestResourceController extends ThinkController
}
}
addOperationLog(['op_type'=>0,'key'=>$i_account.'-'.I('game_name').'-'.I('server_name'),'op_name'=>'新增测试账号','url'=>U('testResource/index'),'menu'=>'推广员-测试资源-测试资源申请-新增测试账号']);
addOperationLog(['op_type'=>0,'key'=>$i_account.'/'.I('game_name').'/'.I('server_name'),'op_name'=>'新增测试账号','url'=>U('testResource/index'),'menu'=>'推广员-测试资源-测试资源申请-新增测试账号']);
}
if (session('apply_status')==0) {
@ -603,7 +603,7 @@ class TestResourceController extends ThinkController
$userData = M('test_resource','tab_')->where($map)->find();
addOperationLog(['op_type'=>1,'key'=>$userData['user_account'].'-'.$userData['game_name'].'-'.$userData['server_name'],'op_name'=>'测试资源申请编辑','url'=>U('TestResource/edit',['id'=>$userData['id']]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请编辑']);
addOperationLog(['op_type'=>1,'key'=>$userData['user_account'].'/'.$userData['game_name'].'/'.$userData['server_name'],'op_name'=>'测试资源申请编辑','url'=>U('TestResource/edit',['id'=>$userData['id']]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请编辑']);
$this->success('更新成功', U('index'));
}
@ -695,7 +695,7 @@ class TestResourceController extends ThinkController
//成功
}
addOperationLog(['op_type'=>0,'key'=>$support['user_account'].'-'.$support['game_name'].'-'.$support['server_name'],'op_name'=>'测试资源申请后续','url'=>U('TestResource/apply',['id'=>$value]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请后续']);
addOperationLog(['op_type'=>0,'key'=>$support['user_account'].'/'.$support['game_name'].'/'.$support['server_name'],'op_name'=>'测试资源申请后续','url'=>U('TestResource/apply',['id'=>$value]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请后续']);
}
M('test_resource','tab_')->commit(); //提交事物

@ -167,6 +167,8 @@ class TestWhiteListController extends ThinkController
$data['add_user'] = $_SESSION['onethink_admin']['user_auth']['username'];
$data['create_ime'] = time();
M('user','tab_')->where(array('id'=>$data['user_id']))->save(['check_status'=>$data['show_status']]);
$whiteList = M('test_white_list','tab_')->add($data);
if($whiteList) {
//操作日志

@ -241,7 +241,7 @@ class WithdrawModel extends Model{
return -1;
}
addOperationLog(['op_type'=>1,'key'=>$promote['account'].$data['begin_time'].$data['end_time'].$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']);
addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.date('YmdHis',$data['begin_time']).'/'.date('YmdHis',$data['end_time']).'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']);
M()->commit();//事物提交
return 1;
@ -385,6 +385,8 @@ class WithdrawModel extends Model{
return -1;
}
addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.date('YmdHis',$data['begin_time']).'/'.date('YmdHis',$data['end_time']).'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']);
M()->commit();//事物提交
return 1;
}
@ -496,7 +498,7 @@ class WithdrawModel extends Model{
if (!$withdrawId) {
return 0;//补点失败
}
addOperationLog(['op_type'=>1,'key'=>$promote['account'].'/'.date('YmdHis',$data['begin_time']).'/'.date('YmdHis',$data['end_time']).'/'.$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']);
return 1;
}

@ -0,0 +1,139 @@
<extend name="Public/base" />
<block name="body">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script><!--
<script type="text/javascript" src="__STATIC__/provincecityarea/jquery-1.7.min.js"></script> -->
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">新增IP限制账号</h3>
<p class="description_text">说明此功能是新增IP限制白名单</p>
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="tab-content tabcon1711">
<!-- 表单 -->
<form id="form" action="{:U('addUser?model='.$model['id'])}" method="post" class="form-horizontal">
<!-- 基础文档模型 -->
<div id="tab1" class="tab-pane in tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">玩家账号:</td>
<td class="r">
<input type="text" class="txt" name="account" value="" placeholder="输入玩家账号" onKeyUp="value=value.replace(/[^\w\.\/]/ig,'')">
</td>
</tr>
<tr>
<td class="l">状态:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label >
<input type="radio" value="0" name="status" checked="checked"> 限制
</label >
<label >
<input type="radio" value="1" name="status" > 不限制
</label>
</span>
</td>
</tr>
<tr>
<td class="l">区域</td>
<td class="r">
<select name="area" id="area">
<option value="">请选择区域</option>
<option value="美国">美国</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" name="id" value="{$data['id']}" />
<div class="form-item cf">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" >
返回
</a>
</div>
</form>
</div>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Promote/lists/type/1">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script><script type="text/javascript" src="__STATIC__/provincecityarea/area1.js"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('AmericaIpForbit/index')}');
Think.setValue("game_type_id", {$data.game_type_id|default = 0});
Think.setValue("category", {$data.category|default = 0});
$(function(){
showTab();
prov="{:substr($data['bank_area'],0,2)}";
city="{:substr($data['bank_area'],2,2)}";
ciarea="{:substr($data['bank_area'],4,2)}";
$("input[name=company_belong]").click(function () {
if ($(this).val() == 1) {
$('#company_relation').show();
} else {
$('#company_relation').hide();
}
});
});
//得到地区码
function getAreaID(){
var area = 0;
if($("#seachdistrict").val() != "0"){
area = $("#seachdistrict").val();
}else if ($("#seachcity").val() != "0"){
area = $("#seachcity").val();
}else{
area = $("#seachprov").val();
}
return area;
}
//根据地区码查询地区名
function getAreaNamebyID(areaID){
var areaName = "";
if(areaID.length == 2){
areaName = area_array[areaID];
}else if(areaID.length == 4){
var index1 = areaID.substring(0, 2);
areaName = area_array[index1] + " " + sub_array[index1][areaID];
}else if(areaID.length == 6){
var index1 = areaID.substring(0, 2);
var index2 = areaID.substring(0, 4);
areaName = area_array[index1] + " " + sub_array[index1][index2] + " " + sub_arr[index2][areaID];
}
return areaName;
}
</script>
</block>

@ -0,0 +1,546 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.tooltip {
position: relative;
display: inline-block;
color: #056dae;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 250%;
background-color: #fff;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 80%;
left: 0;
margin-left: -70%;
border: #000 solid 1px;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: black transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
color: #000;
visibility: visible;
line-height: 20px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.layui-layer-dialog .layui-layer-content{color:red}
.butnbox {padding:10px 0 10px;}
.butnbox .butnlist {overflow:hidden;clear:both;}
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
.butnbox .butnlist .butn.last {background:#009900;}
.butnbox .butnlist .butn~.butn {margin-left:20px;}
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
.layui-layer-title {
text-align: center;
height: 80px;
line-height: 80px;
font-weight: 600;
font-size: 18px;
}
.chk_1,.chk_2,.chk_3,.chk_4 {
display: none;
}
/*******STYLE 3*******/
.chk_3 + label {
background-color: #fafbfa;
padding: 9px;
border-radius: 50px;
display: inline-block;
position: relative;
margin-right: 30px;
-webkit-transition: all 0.1s ease-in;
transition: all 0.1s ease-in;
width: 40px;
height: 15px;
}
.chk_3 + label:after {
content: ' ';
position: absolute;
top: 0;
-webkit-transition: box-shadow 0.1s ease-in;
transition: box-shadow 0.1s ease-in;
left: 0;
width: 100%;
height: 100%;
border-radius: 100px;
box-shadow: inset 0 0 0 0 #eee, 0 0 1px rgba(0,0,0,0.4);
}
.chk_3 + label:before {
content: ' ';
position: absolute;
background: white;
top: 1px;
left: 1px;
z-index: 999999;
width: 31px;
-webkit-transition: all 0.1s ease-in;
transition: all 0.1s ease-in;
height: 31px;
border-radius: 100px;
box-shadow: 0 3px 1px rgba(0,0,0,0.05), 0 0px 1px rgba(0,0,0,0.3);
}
.chk_3:active + label:after {
box-shadow: inset 0 0 0 20px #eee, 0 0 1px #eee;
}
.chk_3:active + label:before {
width: 37px;
}
.chk_3:checked:active + label:before {
width: 37px;
left: 20px;
}
.chk_3 + label:active {
box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px 1px 3px rgba(0,0,0,0.1);
}
.chk_3:checked + label:before {
content: ' ';
position: absolute;
left: 26px;
border-radius: 100px;
}
.chk_3:checked + label:after {
content: ' ';
font-size: 1.5em;
position: absolute;
background: #4cda60;
box-shadow: 0 0 1px #4cda60;
}
#checkbox_d2 + label:after, #checkbox_d2 + label:before, #checkbox label {
-webkit-transition: all 0.1s ease-in;
transition: all 0.1s ease-in;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">ip限制白名单</h3>
<p class="description_text">说明:苹果内购白名单,名单中的用户支付成功可通知游戏</p>
<div class="demo">
<div class="wrap" ><span style="float: right;margin-top: 7px;margin-right: 120px"></span>
<input type="checkbox" id="checkbox_c2" class="chk_3" <if condition="$apple_interior_buy eq 1">checked</if> /><label for="checkbox_c2" style="float: right;margin-right: 5px" onclick="setAppleInteriorBuyStatus({$set_apple_interior_buy})"></label>
<span style="float: right;margin-top: 7px;margin-right: 5px"></span>
<span style="float: right;margin-top: 7px;margin-right: 30px">全游戏苹果内购支付成功通知默认限制</span>
</div>
</div>
<!-- <div class="fr">-->
<!-- <a class="tabchose" href="">游戏充值统计</a>-->
<!-- <a class="" href="{:U('Finance/payTypeStatistics')}">充值方式统计</a>-->
<!-- </div>-->
</div>
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<!--游戏类型搜索END-->
<div class="input-list">
<input type="text" id="user_account" name="user_account" class="" value="{:I('user_account')}" placeholder="玩家账号" autocomplete="off"/>
</div>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search"
style="width: 100px;border: #3C95C8 solid 1px; " url="{:U('AmericaIpForbit/index','model='.$model['name'].'&row='.I('row'),false)}">搜索</a>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="forbit"
style="width: 150px;background: #fff;color: #000;border:1px solid #000;">批量限制</a>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="noforbit"
style="width: 150px;background: #fff;color: #000;border:1px solid #000;">批量不限制</a>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="delete"
style="width: 150px;background: #fff;color: #000;border:1px solid #000;">批量删除</a>
</div>
<div class="input-list">
<a class="sch-btn" href="{:U('AmericaIpForbit/add')}"
style="width: 150px;background: #fff;color: #000;border:1px solid #000;">添加玩家账号</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<empty name="show_status">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th class="" style="width: 50px;">
<input class="check-all" type="checkbox">
</th>
<th >玩家账号</th>
<th >区域</th>
<th >状态</th>
<th >添加人</th>
<th >添加时间</th>
<th >操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<style>
.data-table thead th, .data-table tbody td{text-align:center}
.data-table tbody td{border-right:1px solid #DDDDDD;}
.d_list .drop-down ul {z-index:999;}
</style>
<if condition = "empty($data)">
<tr>
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td ><input class="ids" type="checkbox" value="{$data.id}" name="ids[]"></td>
<td >{$data.user_account}</td>
<td>{$data.area}</td>
<td ><if condition="$data.status eq 1">不限制<else/>限制</if></td>
<td >{$data.admin_account}</td>
<td >{$data.create_time}</td>
<td >
<a href="javascript:;" onclick="del({$data.id})">删除 </a>
<if condition="$data.status eq 1">
<a class="ajax-get" href="javascript:;" onclick="limit({$data.id},0)">限制 </a>
<else />
<a href="javascript:;" id="lock" onclick="limit({$data.id},1)">不限制</a>
</if>
</td>
</tr>
</volist>
</notemtpy>
</tbody>
</table>
</div>
</empty>
</div>
<div class="page">
<if condition="$is_admin eq true ">
<a class="sch-btn export-btn"
href="{:U('AmericaIpForbit/export',array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
<!-- <a class="sch-btn" href="{:U('Export/expUser',array_merge(['id'=>3,'xlsname'=>'玩家_玩家列表_'.(I('get.type')==2?'第三方玩家':'本站玩家')],I('get.')))}">导出</a> -->
</if>
{$_page|default=''}
</div>
</block>
<block name="script">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('AmericaIpForbit/index')}');
$('#forbit').click(function () {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get().join(",");
layer.confirm('【警告】是否确认此操作', {
btn: ['确认','取消'],
title:false
}, function(index) {
if (!text) {
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
return;
}
$.ajax({
url: "{:U('AmericaIpForbit/operateIp')}",
type: "get",
data: {id: text,status:0},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
layer.msg("<em style='color:white'>" + '批量限制失败' + "</em>");
} else {
layer.msg("<em style='color:white'>" + '批量限制成功' + "</em>")
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
});
});
//搜索功能
$("#search").click(function(){
var starttime = $.trim($('#time-start').val());
var endtime = $.trim($('#time-end').val());
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
$('#noforbit').click(function () {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get().join(",");
layer.confirm('【警告】是否确认此操作', {
btn: ['确认','取消'],
title:false
}, function(index) {
if (!text) {
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
return;
}
$.ajax({
url: "{:U('AmericaIpForbit/operateIp')}",
type: "get",
data: {id: text,status:1},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
layer.msg("<em style='color:white'>" + '批量不限制失败' + "</em>");
} else {
layer.msg("<em style='color:white'>" + '批量不限制成功' + "</em>")
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
});
});
$('#delete').click(function () {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get().join(",");
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(index) {
if (!text) {
layer.msg("<em style='color:white'>" + '请选择后再进行操作' + "</em>");
return;
}
$.ajax({
url: "{:U('AmericaIpForbit/del')}",
type: "get",
data: {id: text},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
layer.msg("<em style='color:white'>" + '批量删除失败' + "</em>");
} else {
layer.msg("<em style='color:white'>" + '批量删除成功' + "</em>")
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
});
});
$('#add').click(function () {
});
function limit(id,status) {
layer.confirm('【警告】是否确认此操作', {
btn: ['确认','取消'],
title:false
}, function(index) {
$.ajax({
url: "{:U('AmericaIpForbit/operateIp')}",
type: "get",
data: {id: id,status: status},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
layer.msg("<em style='color:white'>" + '操作失败' + "</em>");
} else {
layer.msg("<em style='color:white'>" + '操作成功' + "</em>")
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
});
}
function del(id) {
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(index) {
$.ajax({
url: "{:U('AmericaIpForbit/del')}",
type: "get",
data: {id: id},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
layer.msg("<em style='color:white'>" + '操作失败' + "</em>");
} else {
layer.msg("<em style='color:white'>" + '操作成功' + "</em>")
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
});
}
function setAppleInteriorBuyStatus(status) {
layer.confirm('【警告】是否确认打开全游戏苹果内购支付成功通知', {
btn: ['确认','取消'],
area: ['380px','120px'],
title: false
}, function(index) {
$.ajax({
url: "{:U('AmericaIpForbit/setAppleInteriorBuyStatus')}",
type: "get",
data: {status: status},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
layer.msg("<em style='color:white'>" + '操作失败' + "</em>");
} else {
layer.msg("<em style='color:white'>" + '操作成功' + "</em>")
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
});
}
</script>
</block>

@ -1995,6 +1995,8 @@ function getPrmoteChlidAccount($id=0,$field="*")
$map['status'] = 1;
$map["chain"] = array("LIKE","%{$self['chain']}%");
$map["level"] = array("GT",$self['level']);
$data = $promote->field($field)->where($map)->select();
if(empty($data)){return array();}
return $data;

@ -1469,6 +1469,21 @@ ALTER TABLE `tab_spend`
ADD INDEX `pay_channel`(`pay_way`, `pay_status`, `game_id`) USING BTREE,
ADD INDEX `pay_channel_type`(`pay_status`, `pay_way`) USING BTREE;
-- 2020-03-16 zyx 添加ip限制白名单表内购tool表状态配置列
INSERT INTO `tab_tool`(`name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('apple_interior_buy', '苹果内购通知开启', NULL, NULL, 1, 0, 1584345308);
CREATE TABLE `tab_forbit_ip` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NULL DEFAULT 0 COMMENT '用户id',
`user_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '用户账号',
`area` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '区域',
`status` tinyint(2) NULL DEFAULT 1 COMMENT '状态 1:不限制 0:限制',
`admin_id` int(11) NULL DEFAULT 1 COMMENT '管理员账号id',
`admin_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '管理员账号',
`create_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '创建时间',
`remarks` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
-- 为游戏统计新增spend索引 chenzhi 2020/03/11
ALTER TABLE `tab_spend`
ADD INDEX `game_time`(`game_id`,`pay_time`) USING BTREE;
@ -1479,5 +1494,5 @@ ADD INDEX `promote_time`(`promote_id`,`pay_time`) USING BTREE;
-- liaojinling 用户重复标识
ALTER TABLE `tab_user`
ADD INDEX `index_device_ip` (`device_number`, `last_login_ip`) USING BTREE ;
ALTER TABLE `tab_user`
ALTER TABLE `tab_user`
ADD COLUMN `is_repeat` tinyint(1) not null default 0 comment '是否重复用户[设备/IP]';

Loading…
Cancel
Save