diff --git a/Addons/SiteStat/info.html b/Addons/SiteStat/info.html
index 15b21c7da..5b25cc243 100644
--- a/Addons/SiteStat/info.html
+++ b/Addons/SiteStat/info.html
@@ -389,10 +389,10 @@ $(document).ready(function () {
-
- 系统名称 |
- 溪谷手游管理系统v5.0.0 |
-
+
+
+
+
操作系统 |
Linux |
@@ -422,24 +422,24 @@ $(document).ready(function () {
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php
index 687ec4204..239e890ab 100644
--- a/Application/Admin/Common/function.php
+++ b/Application/Admin/Common/function.php
@@ -528,3 +528,17 @@ function getServerType($serverType)
return (($serverType == 1) ? '专服' : '混服');
}
+//获取合作方
+function getPartnerList($id = 0)
+{
+ if ($id > 0) {
+ return M('Partner', 'tab_')->field('id,partner')->find($id);
+ } else {
+ return M('Partner', 'tab_')->field('id,partner')->where(array('status' => 1))->select();
+ }
+}
+
+function getPartnerName($id = 0)
+{
+ return M('Partner', 'tab_')->where(array('id' => intval($id)))->getField('partner');
+}
\ No newline at end of file
diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php
new file mode 100644
index 000000000..651c8c01a
--- /dev/null
+++ b/Application/Admin/Controller/PartnerController.class.php
@@ -0,0 +1,196 @@
+
+ */
+class PartnerController extends ThinkController
+{
+ private $modelName = 'Partner';
+
+ //列表
+ public function lists()
+ {
+ $model = M($this->modelName, 'tab_');
+ $map = [];
+ $id = intval(I('id', 0));
+ if (!empty($id)) {
+ $map['tab_partner.id'] = $id;
+ $parameter['id'] = $id;
+ }
+
+ if (isset($_REQUEST['status']) && $_REQUEST['status'] !== '') {
+ $status = intval($_REQUEST['status']);
+ $map['tab_partner.status'] = $status;
+ $parameter['status'] = $status;
+ }
+
+ $page = intval(I('get.p', 0));
+ $page = $page ? $page : 1; //默认显示第一页数据
+ $row = intval(I('row', 0));
+ $row = empty($row) ? 10 : $row;//每页条数
+
+ $data = $model
+ ->field('tab_partner.id,tab_partner.partner,tab_partner.status,tab_partner.create_time,sys_member.nickname')
+ ->join('left join sys_member on sys_member.uid = tab_partner.uid')
+ ->where($map)
+ ->order('id desc')
+ ->page($page, $row)
+ ->select();
+
+ /* 查询记录总数 */
+ $count = $model
+ ->where($map)
+ ->count();
+
+ if (!empty($data)) {
+ foreach ($data as &$list) {
+ $list['status'] = ($list['status'] == 0) ? '已关闭' : '已开启';
+ $list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
+ }
+ }
+
+ //分页
+ $parameter['p'] = $page;
+ $parameter['row'] = $row;
+ $page = set_pagination($count, $row, $parameter);
+ if ($page) {
+ $this->assign('_page', $page);
+ }
+
+ $this->assign('listData', $data);
+ $this->assign('count', $count);
+ $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/lists'])->find());
+ $this->meta_title = '合作方管理';
+ $this->display();
+ }
+
+ //添加
+ public function add()
+ {
+ if ($_POST) {
+ $partner = I('post.partner', '');
+ $status = intval(I('post.status', 1));
+
+ if (empty($partner)) {
+ $this->error('请输入合作方名称');
+ }
+ if (!in_array($status, [0, 1])) {
+ $this->error('参数异常');
+ }
+
+ $model = M($this->modelName, 'tab_');
+ $map['partner'] = $partner;
+ $res = $model->where($map)->getField('id');
+ if ($res) {
+ $this->error('合作方已存在');
+ }
+
+ $time = time();
+ $save['partner'] = $partner;
+ $save['status'] = $status;
+ $save['uid'] = UID;
+ $save['create_time'] = $time;
+ $save['last_up_time'] = $time;
+
+ $res = $model->add($save);
+ if ($res) {
+ \Think\Log::actionLog('Partner/add', 'partner', $res);
+ $this->success('保存成功', U('lists'));
+ } else {
+ $this->error('保存失败');
+ }
+ } else {
+ $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/add'])->find());
+ $this->meta_title = '新增合作方';
+ $this->display();
+ }
+ }
+
+ //编辑
+ public function edit()
+ {
+ $model = M($this->modelName, 'tab_');
+
+ if ($_POST) {
+ $partner = I('post.partner', '');
+ $status = intval(I('post.status', 1));
+ $id = intval(I('post.id', 0));
+
+ if (empty($partner)) {
+ $this->error('请输入合作方名称');
+ }
+ if (!in_array($status, [0, 1]) || $id == 0) {
+ $this->error('参数异常');
+ }
+
+ $data = $model->field('id,partner')->find($id);
+ if (empty($data)) {
+ $this->error('数据异常');
+ }
+
+ $map['partner'] = $partner;
+ $res = $model->where($map)->getField('id');
+ if ($res && $res != $id) {
+ $this->error('合作方已存在');
+ }
+
+ $time = time();
+ $save['id'] = $id;
+ $save['partner'] = $partner;
+ $save['status'] = $status;
+ $save['last_up_time'] = $time;
+
+ $res = $model->save($save);
+ if ($res === false) {
+ $this->error('保存失败');
+ } else {
+ \Think\Log::actionLog('Partner/edit', 'partner', $id);
+ $this->success('保存成功', U('lists'));
+ }
+ } else {
+ $id = intval(I('get.id', 0));
+ $map['id'] = $id;
+ $data = $model->field('id,partner,status')->find($id);
+ if (empty($data)) {
+ $this->error('数据异常', U('lists'));
+ }
+
+ $this->assign('data', $data);
+ $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/edit'])->find());
+ $this->meta_title = '编辑合作方';
+ $this->display();
+ }
+ }
+
+ //删除
+ public function del()
+ {
+ if ($_POST['ids']) {
+ if (!is_array($_POST['ids'])) {
+ $this->error('参数异常');
+ }
+
+ $id = implode(',', $_POST['ids']);
+ } else {
+ $id = intval(I('get.id', 0));
+ if ($id == 0) {
+ $this->error('参数异常');
+ }
+ }
+
+ $res = M($this->modelName, 'tab_')->delete($id);
+ if ($res === false) {
+ $this->error('删除失败');
+ }
+
+ $this->success('删除成功', U('lists'));
+ }
+}
diff --git a/Application/Admin/Controller/PersonalMenusController.class.php b/Application/Admin/Controller/PersonalMenusController.class.php
index c5ac9f2d9..597eac534 100644
--- a/Application/Admin/Controller/PersonalMenusController.class.php
+++ b/Application/Admin/Controller/PersonalMenusController.class.php
@@ -12,7 +12,7 @@ class PersonalMenusController extends ThinkController{
{
foreach($config as $k => $v)
{
- $config[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon'];
+ $config[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon'];
}
}
$this->assign('list',$config);
@@ -95,7 +95,7 @@ class PersonalMenusController extends ThinkController{
{
if($v['id'] == $id)
{
- $v['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon'];
+ $v['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon'];
$data = $v;
break;
}
diff --git a/Application/Admin/Controller/SdkMenuController.class.php b/Application/Admin/Controller/SdkMenuController.class.php
index 43c9d8c52..f8f73fb12 100644
--- a/Application/Admin/Controller/SdkMenuController.class.php
+++ b/Application/Admin/Controller/SdkMenuController.class.php
@@ -12,7 +12,7 @@ class SdkMenuController extends ThinkController{
{
foreach($config as $k => $v)
{
- $config[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon'];
+ $config[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon'];
}
}
$this->assign('list',$config);
@@ -93,7 +93,7 @@ class SdkMenuController extends ThinkController{
{
if($v['id'] == $id)
{
- $v['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon'];
+ $v['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon'];
$data = $v;
break;
}
diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php
index e05b25b6c..538bfd9e1 100644
--- a/Application/Admin/Controller/TestResourceController.class.php
+++ b/Application/Admin/Controller/TestResourceController.class.php
@@ -32,14 +32,14 @@ class TestResourceController extends ThinkController
$map['tab_test_resource.role_name']=['like','%'.I('role_name').'%'];
}
if(!empty(I('user_account'))){
- $map['tab_test_resource.user_account']=I('user_account');
+ $map['tab_test_resource.user_account']=['like','%'.I('user_account').'%'];
}
if(!empty(I('promote_name'))){
- $map['tab_test_resource.promote_account']=I('promote_name');
+ $map['tab_test_resource.promote_account']=['like','%'.I('promote_name').'%'];
}
$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')
+ ->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,lock_status as check_status')
->join('left join tab_user as user on tab_test_resource.user_id = user.id')
->where($map)
->page($page,$row)
@@ -47,11 +47,11 @@ class TestResourceController extends ThinkController
->select();
foreach ($data as $key => $value) {
- $data[$key]['create_time'] = date('Y-m-d H:m:i',$value['create_time']);
+ $data[$key]['create_time'] = date('Y-m-d H:i:s',$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')
+ ->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,lock_status as check_status')
->join('left join tab_user as user on tab_test_resource.user_id = user.id')
->where($map)
->select();
@@ -73,7 +73,7 @@ class TestResourceController extends ThinkController
}
$data = [
- 'check_status' => 0
+ 'lock_status' => 0
];
$isFreeze = M('user','tab_')->where("id=".$supportId)->save($data);
@@ -92,7 +92,7 @@ class TestResourceController extends ThinkController
}
$data = [
- 'check_status' => 1
+ 'lock_status' => 1
];
$isFreeze = M('user','tab_')->where("id=".$supportId)->save($data);
@@ -201,7 +201,7 @@ class TestResourceController extends ThinkController
if ($logId) {
$logRead = M('protect_log_read','tab_')
- ->where("log_id IN({$logId}) and promote_id = {$promote_id}")
+ ->where("log_id IN({$logId})")
->select();
}
else {
@@ -213,7 +213,7 @@ class TestResourceController extends ThinkController
$addData = [];
$k = 0;
foreach($arrUserId as $key => $value) {
- if (in_array($value['id'],$upsetData)) {
+ if (in_array($value,$upsetData)) {
continue;
} else {
$addData[$k]['log_id'] = $value;
@@ -353,9 +353,9 @@ class TestResourceController extends ThinkController
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)) {
+ $user=M('user', 'tab_')->field('promote_id,promote_account,password,phone')->where(['account'=>$i_account])->find();
+// $promote = $this->get_all_promote();
+ if (!$user) {
M('test_resource', 'tab_')->rollback();//回滚
$this->error($i_account.'账号不存在');
}
@@ -414,14 +414,14 @@ class TestResourceController extends ThinkController
$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['apply_name']=$user['promote_account'];
+ $data['apply_id']=$user['promote_id'];
// $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['promote_id']=$user['promote_id'];
+ $data['promote_account']=$user['promote_account'];
$data['create_time']=time();
$data['apply_type']=0;
@@ -533,10 +533,10 @@ class TestResourceController extends ThinkController
// $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('申请失败');
- }
+// 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'];
@@ -552,13 +552,13 @@ class TestResourceController extends ThinkController
$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['apply_name']=$support['promote_account'];
+ $data['apply_id']=$support['promote_id'];
// $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['promote_id']=$support['promote_id'];
+ $data['promote_account']=$support['promote_account'];
$data['create_time']=time();
$data['apply_type']=1;
@@ -609,7 +609,7 @@ class TestResourceController extends ThinkController
unset($_REQUEST['start']);unset($_REQUEST['end']);
}
- $map['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid'];
+// $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);
diff --git a/Application/Admin/View/Game/add.html b/Application/Admin/View/Game/add.html
index a967b6986..e4a8cb55b 100644
--- a/Application/Admin/View/Game/add.html
+++ b/Application/Admin/View/Game/add.html
@@ -188,6 +188,17 @@
+
+ 合作方: |
+
+
+ |
+
游戏详细介绍: |
diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html
index b97ee5d7e..dace2644c 100644
--- a/Application/Admin/View/Game/edit.html
+++ b/Application/Admin/View/Game/edit.html
@@ -196,6 +196,19 @@
|
+
+ 合作方: |
+
+
+ |
+
游戏详细介绍: |
diff --git a/Application/Admin/View/Game/lists.html b/Application/Admin/View/Game/lists.html
index eae185a53..56fac7fac 100644
--- a/Application/Admin/View/Game/lists.html
+++ b/Application/Admin/View/Game/lists.html
@@ -138,6 +138,7 @@ text-indent:0;
| 游戏类型 |
游戏Appid |
推荐状态 |
+ 合作方 |
显示状态 |
支付状态 |
下载次数 |
@@ -163,6 +164,7 @@ text-indent:0;
{:get_game_type_name($data['game_type_id'])} |
{$data.game_appid} |
{:get_info_status($data['recommend_status'],1)} |
+ {:getPartnerName($data['partner_id'])} |
@@ -254,6 +256,7 @@ text-indent:0;
运营平台 |
游戏类型 |
游戏来源 |
+ 合作方 |
排序设置 |
审核状态 |
显示状态 |
@@ -276,6 +279,7 @@ text-indent:0;
{:get_systems_name($data['sdk_version'])} |
{:get_game_type_name($data['game_type_id'])} |
{:get_developer_name($data['developers'])} |
+ {:getPartnerName($data['partner_id'])} |
{$data.sort}
diff --git a/Application/Admin/View/Partner/add.html b/Application/Admin/View/Partner/add.html
new file mode 100644
index 000000000..c499967a0
--- /dev/null
+++ b/Application/Admin/View/Partner/add.html
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {$meta_title}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/Admin/View/Partner/edit.html b/Application/Admin/View/Partner/edit.html
new file mode 100644
index 000000000..8bfa4e180
--- /dev/null
+++ b/Application/Admin/View/Partner/edit.html
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {$meta_title}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/Admin/View/Partner/lists.html b/Application/Admin/View/Partner/lists.html
new file mode 100644
index 000000000..223a2403e
--- /dev/null
+++ b/Application/Admin/View/Partner/lists.html
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+ {$meta_title}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {$_page|default=''}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/Admin/View/Public/base.html b/Application/Admin/View/Public/base.html
index 0e5548f8e..3e1e3ff9b 100644
--- a/Application/Admin/View/Public/base.html
+++ b/Application/Admin/View/Public/base.html
@@ -40,7 +40,7 @@
- - 帮助
+
-
主题
diff --git a/Application/Admin/View/Public/login.html b/Application/Admin/View/Public/login.html
index 910a0e2f0..00d8215cd 100644
--- a/Application/Admin/View/Public/login.html
+++ b/Application/Admin/View/Public/login.html
@@ -70,7 +70,7 @@
-
+
| |