diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php new file mode 100644 index 000000000..bfe155bea --- /dev/null +++ b/Application/Admin/Controller/TestResourceController.class.php @@ -0,0 +1,627 @@ +field('tab_test_resource.id,tab_test_resource.user_id,tab_test_resource.game_name,tab_test_resource.server_name,tab_test_resource.user_account,tab_test_resource.promote_account,tab_test_resource.role_name,tab_test_resource.create_time,device_number,check_status') + ->join('left join tab_user as user on tab_test_resource.user_id = user.id') + ->where($map) + ->page($page,$row) + ->order('tab_test_resource.create_time DESC') + ->select(); + + foreach ($data as $key => $value) { + $data[$key]['create_time'] = date('Y-m-d H:m:i',$value['create_time']); + } + + $count = M('test_resource','tab_') + ->field('tab_test_resource.game_name,tab_test_resource.server_name,tab_test_resource.user_account,tab_test_resource.promote_account,tab_test_resource.role_name,tab_test_resource.create_time,device_number,check_status') + ->join('left join tab_user as user on tab_test_resource.user_id = user.id') + ->where($map) + ->select(); + $count = count($count); + + $page = set_pagination($count,$row); + if($page) {$this->assign('_page', $page);} + $this->meta_title = '扶持号管理'; + $this->assign('data',$data); + + $this->display(); + + } + + public function freezeSupport() { + $supportId = I('support_id', 0); + if ($supportId == 0) { + $this->ajaxReturn(['status'=>0,'msg'=>"参数错误"]); + } + + $data = [ + 'check_status' => 0 + ]; + + $isFreeze = M('user','tab_')->where("id=".$supportId)->save($data); + + if ($isFreeze) { + $this->ajaxReturn(['status'=>1, 'msg'=> '冻结成功']); + } else { + $this->ajaxReturn(['status'=>0, 'msg'=> '冻结失败']); + } + } + + public function unfreezeSupport() { + $supportId = I('support_id', 0); + if ($supportId == 0) { + $this->ajaxReturn(['status'=>0,'msg'=>"参数错误"]); + } + + $data = [ + 'check_status' => 1 + ]; + + $isFreeze = M('user','tab_')->where("id=".$supportId)->save($data); + + if ($isFreeze) { + $this->ajaxReturn(['status'=>1, 'msg'=> '启用成功']); + } else { + $this->ajaxReturn(['status'=>0, 'msg'=> '启用失败']); + } + } + + public function rechangePassward() { + $supportId = I('support_id', 0); + if ($supportId == 0) { + $this->ajaxReturn(['status'=>0,'msg'=>"参数错误"]); + } + + $password = $this->getRandomPassword(6); + $data = [ + 'password' => md5(sha1($password) . UC_AUTH_KEY) + ]; + + $passward = M('user','tab_')->where("id=".$supportId)->save($data); + if ($passward) { + $this->ajaxReturn(['status'=>1, 'msg'=> '新密码:'.$password]); + } else { + $this->ajaxReturn(['status'=>0, 'msg'=> '重置密码失败']); + } + } + + private function getRandomPassword($length, $special = true){ + $chars = array( + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', + 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', + 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', + '3', '4', '5', '6', '7', '8', '9' + ); + +// if($special){ +// $chars = array_merge($chars, array( +// '!', '@', '#', '$', '?', '|', '{', '/', ':', ';', +// '%', '^', '&', '*', '(', ')', '-', '_', '[', ']', +// '}', '<', '>', '~', '+', '=', ',', '.' +// )); +// } + + $charsLen = count($chars) - 1; + shuffle($chars); + + $password = ''; + for($i=0; $i<$length; $i++){ + $password .= $chars[mt_rand(0, $charsLen)]; + } + return $password; + } + + public function protectLogList($p = 1) { + $promote_id = get_pid(); + $page = intval($p); + $page = $page ? $page : 1; //默认显示第一页数据 + $row=10; + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + + $map = []; + if(!empty(I('server_name'))){ + $map['server_name']=I('server_name'); + } + if(!empty(I('game_name'))){ + $map['game_name']=I('game_name'); + } + if(!empty(I('nickname'))){ + $map['nickname']=['like','%'.I('nickname').'%']; + } + if(!empty(I('user_account'))){ + $map['user_account']=I('user_account'); + } + if(!empty($_REQUEST['start'])&&empty($_REQUEST['end'])){ + $map['create_time'] = array('GT',strtotime($_REQUEST['start'])); + unset($_REQUEST['start']); + } + if(empty($_REQUEST['start'])&&!empty($_REQUEST['end'])){ + $map['create_time'] = array('LT',strtotime($_REQUEST['end'])+24*60*60-1); + unset($_REQUEST['end']); + } + if(!empty($_REQUEST['start'])&&!empty($_REQUEST['end'])){ + $map['create_time'] = array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1)); + unset($_REQUEST['start']);unset($_REQUEST['end']); + } + if(!empty(I('types'))){ + $map['type']=I('types'); + } + + $field = 'id,game_name,server_name,user_account,nickname,promote_account,detail'; + $order = 'id DESC'; + + $data = D('protect_log')->getProtectLog($field,$map,'',$order,$page,$row); + + $count = D('protect_log')->getProtectLog($field,$map,'',$order); + + M('protect_log_read', 'tab_')->startTrans(); //事物 + try { + $arrUserId = array_column($data,'id'); + $logId = implode(',',$arrUserId); + + $logRead = M('protect_log_read','tab_') + ->where("log_id IN({$logId}) and promote_id = {$promote_id}") + ->select(); + + $upsetData = array_column($logRead,'log_id'); + + $addData = []; + $k = 0; + foreach($arrUserId as $key => $value) { + if (in_array($value['id'],$upsetData)) { + continue; + } else { + $addData[$k]['log_id'] = $value; + $addData[$k]['promote_id'] = $promote_id; + $addData[$k]['create_time'] = time(); + $k++; + } + } + + M('protect_log_read','tab_')->addAll($addData); + + } catch (OssException $e) { + M('protect_log_read', 'tab_')->rollback();//回滚 + } + M('protect_log_read', 'tab_')->commit(); //提交事物 + + $count = count($count); + $page = set_pagination($count,$row); + $this->meta_title = '日志管理'; + if($page) {$this->assign('_page', $page);} + + $this->assign('data',$data); + + $this->display(); + } + + protected function _initialize() + { + parent::_initialize(); + $map['id'] = get_pid(); + $pro = M("promote", "tab_")->where($map)->find(); + if ($pro['parent_id']!=0) { + $this->error('无权操作!'); + } + } + + public function index($p=0) + { + $page = intval($p); + $page = $page ? $page : 1; //默认显示第一页数据 + $row=10; + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + $map =array(); + if(!empty(I('role_name'))){ + $map['role_name']=['like','%'.I('role_name').'%']; + } + if(!empty(I('server_name'))){ + $map['server_name']=I('server_name'); + } + if(!empty(I('game_name'))){ + $map['game_name']=I('game_name'); + } + if(!empty(I('user_account'))){ + $map['user_account']=['like','%'.I('user_account').'%']; + } + if(!empty($_REQUEST['start'])&&empty($_REQUEST['end'])){ + $map['create_time'] = array('GT',strtotime($_REQUEST['start'])); + unset($_REQUEST['start']); + } + if(empty($_REQUEST['start'])&&!empty($_REQUEST['end'])){ + $map['create_time'] = array('LT',strtotime($_REQUEST['end'])+24*60*60-1); + unset($_REQUEST['end']); + } + if(!empty($_REQUEST['start'])&&!empty($_REQUEST['end'])){ + $map['create_time'] = array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1)); + unset($_REQUEST['start']);unset($_REQUEST['end']); + } + // + $res = D("test_resource")->getResourceCout($map,$page,$row); + // dump($res); + $parameter =I('get.'); + $parameter['p']=I('get.p',1); + $parameter['row']=I('get.row'); + + + $page = set_pagination($res["count"],$row,$parameter); + if($page) {$this->assign('_page', $page);} +// var_dump($res['list']);die(); + $this->meta_title = '测试资源'; + $this->m_title = '测试资源申请'; + $this->assign('data',$res['list']); + $this->assign('count',$res["count"]); + $this->display(); + # code... + } + /** + * 获取区服列表 + * @param $game_id + */ + public function getServer($game_id="") + { + $map['game_id']=$game_id; + $map['start_time']=['lt',time()]; + if (I('status')==2) { + $map['show_status']=1; + } + $data = M('server', 'tab_') + ->field('tab_server.id,tab_server.server_name,support_quota') + ->where($map) + ->join('join tab_game tg ON tg.id=tab_server.game_id') + ->select(); + + $this->AjaxReturn($data); + } + //获取当前和当前子渠道的渠道id + public function get_all_promote(){ + $pro_id=get_prmoote_chlid_account(get_pid()); +// var_dump($pro_id);die(); + foreach ($pro_id as $key => $value) { + $pro_id1[]=$value['id']; + } + if(!empty($pro_id1)){ + $pro_id2=array_merge($pro_id1,array(get_pid())); + }else{ + $pro_id2=array(get_pid()); + } + return $pro_id2; + } + /** + * 系统非常规MD5加密方法 + * @param string $str 要加密的字符串 + * @return string + */ + public function think_ucenter_md5($str, $key = 'ThinkUCenter'){ + return '' === $str ? '' : md5(sha1($str) . $key); + } + //新增扶持 + public function add() + { + // dump(I('post.')); + if (IS_POST) { + $count=count(I('user_account')); + session('apply_status', 0); + + (empty(I('server_id')) || I('server_id')<1) && $this->error('请选择区服!');; + M('test_resource', 'tab_')->startTrans(); //事物 + for ($i=0; $i < $count ; $i++) { + $i_account=I('user_account')[$i]; + if (!empty($i_account)) { + $user=M('user', 'tab_')->field('promote_id,password,phone')->where(['account'=>$i_account])->find(); + $promote = $this->get_all_promote(); + if (!in_array($user['promote_id'], $promote)) { + M('test_resource', 'tab_')->rollback();//回滚 + $this->error($i_account.'账号不存在'); + } + if (empty(I('user_password')[$i])) { + M('test_resource', 'tab_')->rollback();//回滚 + $this->error(I('user_account')[$i].'请输入密码'); + } + if ($user['password']!=$this->think_ucenter_md5(I('user_password')[$i], UC_AUTH_KEY)) { + M('test_resource', 'tab_')->rollback();//回滚 + $this->error($i_account.'密码不正确'); + } + if (empty(I('role_name')[$i])) { + M('test_resource', 'tab_')->rollback();//回滚 + $this->error(I('user_account')[$i].'请输入角色名'); + } + + $supportNum = I('apply_resource')[$i]; + if (empty($supportNum)) { + M('test_resource', 'tab_')->rollback();//回滚 + $this->error(I('user_account')[$i].'请输入资源数量'); + } + if ($supportNum<0 || !preg_match('/^[1-9]\d*$/', $supportNum)) { + M('test_resource', 'tab_')->rollback();//回滚 + $this->error(I('user_account')[$i].'请输入资源数量'); + } + + + $map['game_id']=I('game_id'); + $map['server_id']=I('server_id'); + $map['user_account']=I('user_account')[$i]; + // $map['apply_status']=['neq',0]; + $map['apply_type']=0; + $list= M('test_resource', 'tab_')->where($map)->find(); + if ($list) { + M('test_resource', 'tab_')->rollback();//回滚 + $this->error(I('user_account')[$i].'账号已存在'); + } + + // $support_quota = M('game', 'tab_')->field('support_quota')->find(get_game_id(I('game_name'))); + // if ($support_quota['support_quota'] < I('support_num')[$i]) { + // M('test_resource', 'tab_')->rollback();//回滚 + // $this->ajaxReturn(['msg'=>'超出申请额度' ,'status'=>0]); + // } + + $data['game_id']=I('game_id'); + $data['game_name']=I('game_name'); + $data['server_id']=I('server_id'); + $data['server_name']=I('server_name'); + $data['user_account']=I('user_account')[$i]; + $data['user_id']=get_user_id(I('user_account')[$i]); + $data['user_password']=base64_encode(I('user_password')[$i]); + $data['phone']=$user['phone']; + $data['role_name']=I('role_name')[$i]; + + + $data['apply_resource']=I('apply_resource')[$i]; + $data['apply_remark']=I('apply_remark')[$i]; + + $data['apply_name']=$_SESSION['onethink_home']['promote_auth']['account']; + $data['apply_id']=$_SESSION['onethink_home']['promote_auth']['pid']; + +// $data['promote_id']=session("promote_auth.pid"); +// $data['promote_account']=session("promote_auth.account"); + + $data['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid']; + $data['promote_account']=$_SESSION['onethink_home']['promote_auth']['account']; + + $data['create_time']=time(); + $data['apply_type']=0; + + $model = M('test_resource', 'tab_')->add($data); + if ($model) { + session('apply_status', 1); + } + } else { + if (I('user_password')[$i]) { + M('test_resource', 'tab_')->rollback();//回滚 + $this->error('请输入账号'); + } + } + } + if (session('apply_status')==0) { + session('apply_status', null); + $this->error('请输入账号'); + } + M('test_resource', 'tab_')->commit(); //提交事物 + $this->success('添加成功',U('TestResource/index')); + } else { + $this->meta_title = '新增测试账号'; + $this->display(); + } + } + + public function edit() { + + $id = I('id'); + //获取数据 + $data = M('test_resource','tab_')->where("id={$id}")->find(); + if (!$data) { + $this->error('数据不存在!'); + exit(); + } + + $this->assign('data', $data); + $this->meta_title = '编辑礼包'; + + $this->m_title = '礼包列表'; + + + $this->display(); + } + + //修改申请 + public function apply_edit(){ + $user=M('user','tab_')->field('password')->where(['account'=>I('user_account')])->find(); + if($user['password'] !== $this->think_ucenter_md5(I('user_password'), UC_AUTH_KEY)){ + $this->error('修改失败,密码不正确!'); + } + + $data['user_password']=base64_encode(I('user_password')); + $data['role_name']=I('role_name'); + $map = I("post."); + unset($map['user_password']); + unset($map['role_name']); + $res=M('test_resource','tab_')->where($map)->save($data); + if($res===false){ + $this->error('更新失败'); + }else{ + $this->success('更新成功', U('index')); + } + } + //后续申请 + public function apply(){ + $ids = explode(',', I('id')); + + foreach ($ids as $key => $value) { + $map['id']=$value; + $support=M('test_resource','tab_')->field('promote_id')->where($map)->find(); +// if($support['promote_id'] !=session("promote_auth.pid") || empty($support) ){ +// $this->error('数据错误'); +// } + } + $this->m_title = '推广员列表'; + $this->meta_title = '申请后续'; + $this->display(); + } + //申请新增扶持(单个或批量申请) + public function batch_apply(){ + $ids = explode(',', I('id')); + + M('test_resource','tab_')->startTrans(); //事物 + foreach ($ids as $key => $value) { + + $map['id']=$value; + $support=M('test_resource','tab_')->where($map)->find(); + if(I('apply_resource') <0 || !preg_match('/^[1-9]\d*$/', I('apply_resource', 0))){ + M('test_resource','tab_')->rollback();//回滚 + $this->error('申请资源数量有误'); + } + if(empty($support)){ + M('test_resource','tab_')->rollback();//回滚 + $this->error('数据有误'); + } + + // $max_quota=$this->max_quota($support['game_id'],$support['server_name']);//最大申请额度 + // if(count($ids)>1){ + // $map_s['game_id']=$support['game_id']; + // $map_s['server_name']=$support['server_name']; + // $map_s['id'] =['in',$ids]; + // $count=M('support','tab_')->where($map_s)->count(); + // $max_quota = floor($max_quota/$count); + // } + // if(I('support_num') > $max_quota){ + // M('support','tab_')->rollback();//回滚 + // $this->ajaxReturn(['status'=>0,'msg'=>'扶持申请额度不足,最大额度:'.$max_quota]); + // } + + if($support['promote_id'] !=$_SESSION['onethink_home']['promote_auth']['pid'] || empty($support) ){ + M('test_resource','tab_')->rollback();//回滚 + $this->error('申请失败'); + } + + $data['game_id']=$support['game_id']; + $data['game_name']=$support['game_name']; + $data['server_id']=$support['server_id']; + $data['server_name']=$support['server_name']; + $data['user_account']=$support['user_account']; + $data['user_id']=$support['user_id']; + $data['user_password']=$support['user_password']; + $data['phone']=$support['phone']; + $data['role_name']=$support['role_name']; + + + $data['apply_resource']=I('apply_resource'); + $data['apply_remark']=I('apply_remark'); + + $data['apply_name']=$_SESSION['onethink_home']['promote_auth']['account']; + $data['apply_id']=$_SESSION['onethink_home']['promote_auth']['pid']; + +// $data['promote_id']=session("promote_auth.pid"); +// $data['promote_account']=session("promote_auth.account"); + $data['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid']; + $data['promote_account']=$_SESSION['onethink_home']['promote_auth']['account']; + + $data['create_time']=time(); + $data['apply_type']=1; + // + $model = M('test_resource','tab_')->add($data); + if($model===false){ + M('test_resource','tab_')->rollback();//回滚 + $this->error('申请失败'); + }else{ + //成功 + } + } + M('test_resource','tab_')->commit(); //提交事物 + $this->success('申请成功',U('index')); + } + public function lists( $p = 1){ + $page = intval($p); + $page = $page ? $page : 1; //默认显示第一页数据 + $row=10; + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + + if(!empty(I('type'))||I('type')==='0'){ + $map['apply_status']=I('type'); + } + + if(!empty(I('role_name'))){ + $map['role_name']=['like','%'.I('role_name').'%']; + } + if(!empty(I('server_name'))){ + $map['server_name']=I('server_name'); + } + if(!empty(I('game_name'))){ + $map['game_name']=I('game_name'); + } + if(!empty(I('user_account'))){ + $map['user_account']=['like','%'.I('user_account').'%']; + } + if(!empty($_REQUEST['start'])&&empty($_REQUEST['end'])){ + $map['create_time'] = array('GT',strtotime($_REQUEST['start'])); + unset($_REQUEST['start']); + } + if(empty($_REQUEST['start'])&&!empty($_REQUEST['end'])){ + $map['create_time'] = array('LT',strtotime($_REQUEST['end'])+24*60*60-1); + unset($_REQUEST['end']); + } + if(!empty($_REQUEST['start'])&&!empty($_REQUEST['end'])){ + $map['create_time'] = array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1)); + unset($_REQUEST['start']);unset($_REQUEST['end']); + } + + $map['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid']; + $data=M('test_resource','tab_')->where($map)->order('id desc')->page($page,$row)->select(); + $count=M('test_resource','tab_')->field('id')->where($map)->select(); + $count = count($count); + + $parameter = I("get."); + $parameter['p']=I('get.p',1); + $parameter['row']=I('get.row'); + + + $page = set_pagination($count,$row,$parameter); + if($page) {$this->assign('_page', $page);} + + $this->meta_title = '测试资源申请记录'; + $this->assign('data',$data); + $this->assign('count',$count); + $this->display(); + } + + +} \ No newline at end of file diff --git a/Application/Admin/Model/ProtectLogModel.class.php b/Application/Admin/Model/ProtectLogModel.class.php new file mode 100644 index 000000000..5ae18d9e6 --- /dev/null +++ b/Application/Admin/Model/ProtectLogModel.class.php @@ -0,0 +1,71 @@ + +// +---------------------------------------------------------------------- + +namespace Admin\Model; +use Think\Model; + +/** + * 分类模型 + */ +class ProtectLogModel extends Model{ + + protected $_validate = array( + + ); + + protected $_auto = array( + ); + + /** + * 构造函数 + * @param string $name 模型名称 + * @param string $tablePrefix 表前缀 + * @param mixed $connection 数据库连接信息 + */ + public function __construct($name = '', $tablePrefix = '', $connection = '') { + /* 设置默认的表前缀 */ + $this->tablePrefix ='tab_'; + /* 执行构造方法 */ + parent::__construct($name, $tablePrefix, $connection); + } + + + /** + * 按照时间分组统计注册总数 + * @param string $field 需要的字段 + * @param string $where sql条件 + * @param string $group sqlGroup条件 + * @param string $order sql排序 + * @param string $page 页数 + * @param string $row 每页几条 + * @return array 详细数据 + * @author 鹿文学 + */ + public function getProtectLog($field = '*', $where = [], $group = '', $order='',$page = 0, $row = 0) { + + if ($page) { + $data = $this->field($field) + ->where($where) + ->page($page,$row) + ->group($group) + ->order($order) + ->select(); + } else { + $data = $this->field($field) + ->where($where) + ->group($group) + ->order($order) + ->select(); + } + + return $data; + } + + +} diff --git a/Application/Admin/Model/TestResourceModel.class.php b/Application/Admin/Model/TestResourceModel.class.php new file mode 100644 index 000000000..5b601848b --- /dev/null +++ b/Application/Admin/Model/TestResourceModel.class.php @@ -0,0 +1,80 @@ + +// +---------------------------------------------------------------------- + +namespace Admin\Model; +use Think\Model; + +/** + * 分类模型 + */ +class TestResourceModel extends Model{ + /** + * 构造函数 + * @param string $name 模型名称 + * @param string $tablePrefix 表前缀 + * @param mixed $connection 数据库连接信息 + */ + public function __construct($name = '', $tablePrefix = '', $connection = '') { + /* 设置默认的表前缀 */ + $this->tablePrefix ='tab_'; + /* 执行构造方法 */ + parent::__construct($name, $tablePrefix, $connection); + } + /** + * 获取统计 $map,$page,$row + */ + public function getResourceCout($map,$page,$row) { + $promote_id=session("promote_auth.pid"); + //获取基本信息 + $res = $this + ->table("tab_test_resource as test") + ->field("test.*,user.check_status") + ->join('tab_user user on test.user_id=user.id','left') + ->page($page,$row) + ->order("create_time desc") + ->where($map) + ->group("user_id,game_id,server_id") + ->select(); + //获取统计 + + if(empty($res)){ + return $res; + } + $rescount = $this + ->where($map) + ->group("user_id,game_id,server_id") + ->buildSql(); + $rescount = $this->table($rescount.' a')->count(); + //生成idstr + foreach ($res as $key => $value) { + $value['create_time'] = date("Y-m-d H:i:s", $value['create_time']); + //获取累计发放 + $where = array( + "user_id"=>$value['user_id'], + "game_id"=>$value['game_id'], + "server_id"=>$value['server_id'] + ); + $where1 = array( + "apply_status"=>2, + ); + //获取累计 + $verify_resource = $this->field("IFNULL(sum(verify_resource),0) verify_resource_count,count(*) verify_count")->where(array_merge($where,$where1))->find(); + //获取申请 + $where2 = array( + "apply_status"=>0, + ); + $apply_resource = $this->field("IFNULL(sum(apply_resource),0) apply_resource_count")->where(array_merge($where,$where2))->find(); + $res[$key] = array_merge($value,$verify_resource,$apply_resource); + } + return array("list"=>$res,"count"=>$rescount); + } + + + +} diff --git a/Application/Admin/View/TestResource/add.html b/Application/Admin/View/TestResource/add.html new file mode 100644 index 000000000..2e8c30fc9 --- /dev/null +++ b/Application/Admin/View/TestResource/add.html @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + + + +
+ +
+
+ +
+
+ +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
测试账号密码角色名称资源数量备注操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除 + 新增 +
+ +
+ +
+ +
+ +
+
+ +
+ + + +
+ + + + + + diff --git a/Application/Admin/View/TestResource/apply.html b/Application/Admin/View/TestResource/apply.html new file mode 100644 index 000000000..f6988eeaa --- /dev/null +++ b/Application/Admin/View/TestResource/apply.html @@ -0,0 +1,226 @@ + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + +
扶持数量: + +
备注: + +
+
+ + + +
+ + + 返回 + +
+
+
+
+ + + +
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + + + diff --git a/Application/Admin/View/TestResource/edit.html b/Application/Admin/View/TestResource/edit.html new file mode 100644 index 000000000..e45b88d2e --- /dev/null +++ b/Application/Admin/View/TestResource/edit.html @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
*游戏名称: + +
游戏区服: + +
账号: + +
密码: + +
角色名称: + +
+
+ + + +
+ + + 返回 + +
+
+
+
+ + + +
+ + + +if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + + + diff --git a/Application/Admin/View/TestResource/index.html b/Application/Admin/View/TestResource/index.html new file mode 100644 index 000000000..d6722b23a --- /dev/null +++ b/Application/Admin/View/TestResource/index.html @@ -0,0 +1,451 @@ + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ +
+
+ +
+
+ +   +
+
+ +   +
+
+ + - +
+ + +
+
+ + + +
+ 搜索 +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 产品名称区服测试账号所属推广员角色名称累计发放资源累计发放次数申请数量状态注册时间操作
aOh! 暂时还没有内容!
{$data.game_name}{$data.server_name}{$data.user_account}{$data.promote_account}{$data.role_name}{$data.verify_resource_count}{$data.verify_count}{$data.apply_resource_count} + + 正常 + + 冻结 + + {$data.create_time} + 编辑 + 申请 +
+
+ +
+ +
+
+ {$_page|default=''} +
+ + + +
+ + + + + + diff --git a/Application/Admin/View/TestResource/lists.html b/Application/Admin/View/TestResource/lists.html new file mode 100644 index 000000000..fd03b4c41 --- /dev/null +++ b/Application/Admin/View/TestResource/lists.html @@ -0,0 +1,445 @@ + + + + + + + + + + + + + + + +
+ + + + +
+
+ +
+
+ +
+
+ +
+
+ +   +
+
+ +   +
+
+ + - +
+ + +
+
+ + + +
+ 搜索 +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
游戏名称区服测试账号手机号角色名称申请数量实际发放备注审核状态审核意见申请人申请时间审核时间
aOh! 暂时还没有内容!
{$s.game_name}{$s.server_name}{$s.user_account}{$s.phone}{$s.role_name}{$s.apply_resource}{$s.verify_resource}{$s.apply_remark} + 审核未通过 + 审核通过 + 待审核 + + {$s.verify_remark}{$s.promote_account}{:date('Y-m-d H:i:s',$s['create_time'])}{:empty($s['verify_time'])?'':date('Y-m-d H:i:s',$s['verify_time'])}尚未审核
+
+ +
+ +
+
+ {$_page|default=''} +
+ + + +
+ + + + + + diff --git a/Application/Admin/View/TestResource/protectLogList.html b/Application/Admin/View/TestResource/protectLogList.html new file mode 100644 index 000000000..ecae288ac --- /dev/null +++ b/Application/Admin/View/TestResource/protectLogList.html @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ +
+
+ +
+
+ +   +
+
+ +   +
+
+ + - +
+ + +
+
+
+ + +
+ + + +
+ 搜索 +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
产品名称区服测试账号所属推广员角色名称异常内容
aOh! 暂时还没有内容!
{$s.game_name}{$s.server_name}{$s.user_account}{$s.promote_account}{$s.nickname}{$s.detail}
+
+ +
+ +
+
+ {$_page|default=''} +
+ + + +
+ + + + + + diff --git a/Application/Admin/View/TestResource/supportNumberList.html b/Application/Admin/View/TestResource/supportNumberList.html new file mode 100644 index 000000000..1e3f0ecd0 --- /dev/null +++ b/Application/Admin/View/TestResource/supportNumberList.html @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ +
+
+ +
+
+ +   +
+
+ +   +
+
+ +   +
+ + + +
+ 搜索 +
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
产品名称区服测试账号所属推广员角色名称设备信息状态创建时间操作
aOh! 暂时还没有内容!
{$s.game_name}{$s.server_name}{$s.user_account}{$s.promote_account}{$s.role_name} + 尚未登录,无设备号 + {$s.device_number} + + + 冻结 + 启用 + + {$s.create_time} + + 冻结 + + + 启用 + + + 重置密码 +
+
+ +
+ +
+
+ {$_page|default=''} +
+ + + +
+ + + + + + diff --git a/Application/Home/Controller/TestResourceController.class.php b/Application/Home/Controller/TestResourceController.class.php index 3c9ca4306..d20157bf8 100644 --- a/Application/Home/Controller/TestResourceController.class.php +++ b/Application/Home/Controller/TestResourceController.class.php @@ -37,6 +37,7 @@ class TestResourceController extends BaseController $map['tab_test_resource.promote_account']=I('promote_name'); } + $map['user.promote_id']=session("promote_auth.pid"); $data = M('test_resource','tab_') ->field('tab_test_resource.id,tab_test_resource.user_id,tab_test_resource.game_name,tab_test_resource.server_name,tab_test_resource.user_account,tab_test_resource.promote_account,tab_test_resource.role_name,tab_test_resource.create_time,device_number,check_status') ->join('left join tab_user as user on tab_test_resource.user_id = user.id') @@ -44,6 +45,7 @@ class TestResourceController extends BaseController ->page($page,$row) ->order('tab_test_resource.create_time DESC') ->select(); +// echo M('test_resource','tab_')->_sql();die(); foreach ($data as $key => $value) { $data[$key]['create_time'] = date('Y-m-d H:m:i',$value['create_time']); diff --git a/Application/Home/View/default/TestResource/supportNumberList.html b/Application/Home/View/default/TestResource/supportNumberList.html index 137979270..1843338e2 100644 --- a/Application/Home/View/default/TestResource/supportNumberList.html +++ b/Application/Home/View/default/TestResource/supportNumberList.html @@ -117,7 +117,7 @@

暂无数据

- + {$s.game_name} {$s.server_name} {$s.user_account} @@ -129,13 +129,13 @@ - 冻结 + 冻结 启用 {$s.create_time} - + 冻结 启用 @@ -377,25 +377,6 @@ } }) - $('.unfroze-btn').on({ - click: function() { - var id = $(this).parents('tr').eq(0).attr('data-id') - layer.confirm('是否确认启用帐号?', {icon: 3, title:'提示'}, function(index){ - $.ajax({ - url: "{:U('TestResource/unfreezeSupport')}", - data: {support_id: id}, - type: 'post', - dataType: 'json', - success: function(response) { - layer.msg(response.msg, {time: 1000}, function() { - window.location.href = window.location.href - }) - } - }) - }) - } - }) - $('.changePassward-btn').on({ click: function() { var id = $(this).attr('data-id')