Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
haishi
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
haishi
Commits
1b8e7642
Commit
1b8e7642
authored
Apr 23, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
46471779
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
208 additions
and
208 deletions
+208
-208
admin/themes/simplebootx/Admin/Charge/index.html
+2
-2
application/Admin/Controller/ChargeController.class.php
+206
-206
No files found.
admin/themes/simplebootx/Admin/Charge/index.html
View file @
1b8e7642
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
</ul>
</ul>
<form
class=
"well form-search"
name=
"form1"
method=
"post"
style=
"float:left"
action=
""
>
<form
class=
"well form-search"
name=
"form1"
method=
"post"
style=
"float:left"
action=
""
>
<!--
<if condition="$showlevel eq 0">
<if condition="$showlevel eq 0">
代理商:
代理商:
<select class="select_2" name="proxyid" id="proxyid">
<select class="select_2" name="proxyid" id="proxyid">
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</volist>
</volist>
</select>
</select>
</if>
</if>
-->
订单状态:
订单状态:
<select
class=
"select_2"
name=
"status"
>
<select
class=
"select_2"
name=
"status"
>
<option
value=
""
>
全部
</option>
<option
value=
""
>
全部
</option>
...
...
application/Admin/Controller/ChargeController.class.php
View file @
1b8e7642
...
@@ -24,186 +24,26 @@ class ChargeController extends AdminbaseController {
...
@@ -24,186 +24,26 @@ class ChargeController extends AdminbaseController {
)
)
);
);
// function index(){
// $adminid=$_SESSION['ADMIN_ID'];
// $role_id=$_SESSION['role_id'];
//
// $isshowset=1;
// if(!sp_auth_check($adminid,'admin/charge/setpay')){
// $isshowset=0;
// }
// $this->assign('isshowset', $isshowset);
//
// $Proxy=M('users_proxy');
//
// /* 代理业务员 */
//
// $showlevel='0';
// if($role_id==6){//一级代理
// $showlevel='1';
//
// $where['u.user_type']='1';
// $where['r.role_id']='7';
// $path=setpath($adminid);
// $uids=$Proxy->where("type=-1 and path like '%{$path}%'")->getField('uid',true);
// if(!$uids){
// $uids=[];
// array_push($uids,'0');
// }
// $where['u.id'] = array('in',$uids);
//
// $promoterlist=M('users u')
// ->join('__ROLE_USER__ r ON r.user_id = u.id')
// ->field('u.id,u.user_login,user_nicename')
// ->where($where)
// ->order("u.create_time DESC")
// ->select();
// foreach($promoterlist as $k=>$v){
// if($v['user_nicename']==''){
// $v['user_nicename']=$v['user_login'];
// }
// $promoterlist[$k]=$v;
// }
// }else if($role_id==8){//二级dial
//
// }else if($role_id==7){//业务员
// $showlevel='2';
// }else if($role_id==9){//主播
//
// $where['u.user_type']='1';
// $where['r.role_id']='6';
// $proxylistj=[];
// $proxylist=M('users u')
// ->join('__ROLE_USER__ r ON r.user_id = u.id')
// ->field('u.id,u.user_login,u.user_nicename')
// ->where($where)
// ->order("u.create_time DESC")
// ->select();
// foreach($proxylist as $k=>$v){
// if($v['user_nicename']==''){
// $v['user_nicename']=$v['user_login'];
// }
// $where2['user_type']='1';
// $path=setpath($v['id']);
// $uids=$Proxy->where("type=-1 and path like '%{$path}%'")->getField('uid',true);
// if(!$uids){
// $uids=[];
// array_push($uids,'0');
// }
//
// $where2['id'] = array('in',$uids);
// $promoterlistj=[];
// $promoterlist2=M('users')
// ->field('id,user_login,user_nicename')
// ->where($where2)
// ->order("create_time DESC")
// ->select();
// foreach($promoterlist2 as $k2=>$v2){
// if($v2['user_nicename']==''){
// $v2['user_nicename']=$v2['user_login'];
// }
// $promoterlistj[$v2['id']]=$v2;
// }
// $v['list']=$promoterlistj;
// $proxylistj[$v['id']]=$v;
// }
// }
//
// $this->assign('proxylistj', json_encode($proxylistj));
// $this->assign('promoterlist', $promoterlist);
// $this->assign('showlevel', $showlevel);
//
// if($role_id==6 || $role_id==7 || $role_id==8 || $role_id==9 || $_REQUEST['proxyid']!='' || $_REQUEST['promoterid']!=''){
//
// if($_REQUEST['proxyid']!=''){
// $adminid=$_REQUEST['proxyid'];
// $_GET['proxyid']=$_REQUEST['proxyid'];
// }
//
// if($_REQUEST['promoterid']!=''){
// $adminid=$_REQUEST['promoterid'];
// $_GET['promoterid']=$_REQUEST['promoterid'];
// }
//
// $path=setpath($adminid);
// $uids=$Proxy->where("type=0 and path like '%{$path}%'")->getField('uid',true);
// if(!$uids){
// $uids=[];
// array_push($uids,'0');
// }
// $map['uid'] = array('in',$uids);
// }
//
// if($_REQUEST['status']!=''){
// $map['status']=$_REQUEST['status'];
// $_GET['status']=$_REQUEST['status'];
// }
// if($_REQUEST['start_time']!=''){
// $map['addtime']=array("gt",strtotime($_REQUEST['start_time']));
// $_GET['start_time']=$_REQUEST['start_time'];
// }
//
// if($_REQUEST['end_time']!=''){
//
// $map['addtime']=array("lt",strtotime($_REQUEST['end_time']));
// $_GET['end_time']=$_REQUEST['end_time'];
// }
// if($_REQUEST['start_time']!='' && $_REQUEST['end_time']!='' ){
//
// $map['addtime']=array("between",array(strtotime($_REQUEST['start_time']),strtotime($_REQUEST['end_time']. ' 23:59:59')));
// $_GET['start_time']=$_REQUEST['start_time'];
// $_GET['end_time']=$_REQUEST['end_time'];
// }
//
// if($_REQUEST['keyword']!=''){
// $map['uid|orderno|trade_no']=array("like","%".$_REQUEST['keyword']."%");
// $_GET['keyword']=$_REQUEST['keyword'];
// }
//
// $charge=M("users_charge");
// $count=$charge->where($map)->count();
// $page = $this->page($count, 20);
// $lists = $charge
// ->where($map)
// ->order("addtime DESC")
// ->limit($page->firstRow . ',' . $page->listRows)
// ->select();
//
// $moneysum = $charge
// ->where($map)
// ->sum("money");
//
// foreach($lists as $k=>$v){
// $userinfo=M("users")->field("user_nicename")->where("id='$v[uid]'")->find();
// $lists[$k]['userinfo']= $userinfo;
//
// }
//
//
// $this->assign('moneysum', $moneysum);
// $this->assign('lists', $lists);
// $this->assign('formget', $_GET);
// $this->assign("page", $page->show('Admin'));
//
// $this->assign('status', $this->status);
// $this->assign('type', $this->type);
// $this->assign('ambient', $this->ambient);
//
// $this->display();
// }
function
index
(){
function
index
(){
$adminid
=
$_SESSION
[
'ADMIN_ID'
];
$adminid
=
$_SESSION
[
'ADMIN_ID'
];
$role_id
=
$_SESSION
[
'role_id'
];
$role_id
=
$_SESSION
[
'role_id'
];
$isshowset
=
1
;
if
(
!
sp_auth_check
(
$adminid
,
'admin/charge/setpay'
)){
$isshowset
=
0
;
}
$this
->
assign
(
'isshowset'
,
$isshowset
);
$Proxy
=
M
(
'users_proxy'
);
$Proxy
=
M
(
'users_proxy'
);
/* 代理业务员 */
$showlevel
=
'0'
;
$showlevel
=
'0'
;
if
(
$role_id
==
6
){
//一级代理
if
(
$role_id
==
6
){
//一级代理
$showlevel
=
'1'
;
$showlevel
=
'1'
;
$where
[
'u.user_type'
]
=
'1'
;
$where
[
'u.user_type'
]
=
'1'
;
$where
[
'r.role_id'
]
=
'7'
;
$where
[
'r.role_id'
]
=
'7'
;
$path
=
setpath
(
$adminid
);
$path
=
setpath
(
$adminid
);
$uids
=
$Proxy
->
where
(
"type=-1 and path like '%
{
$path
}
%'"
)
->
getField
(
'uid'
,
true
);
$uids
=
$Proxy
->
where
(
"type=-1 and path like '%
{
$path
}
%'"
)
->
getField
(
'uid'
,
true
);
if
(
!
$uids
){
if
(
!
$uids
){
...
@@ -224,9 +64,12 @@ class ChargeController extends AdminbaseController {
...
@@ -224,9 +64,12 @@ class ChargeController extends AdminbaseController {
}
}
$promoterlist
[
$k
]
=
$v
;
$promoterlist
[
$k
]
=
$v
;
}
}
}
else
if
(
$role_id
==
7
){
}
else
if
(
$role_id
==
8
){
//二级dial
}
else
if
(
$role_id
==
7
){
//业务员
$showlevel
=
'2'
;
$showlevel
=
'2'
;
}
else
{
}
else
if
(
$role_id
==
9
){
//主播
$where
[
'u.user_type'
]
=
'1'
;
$where
[
'u.user_type'
]
=
'1'
;
$where
[
'r.role_id'
]
=
'6'
;
$where
[
'r.role_id'
]
=
'6'
;
$proxylistj
=
[];
$proxylistj
=
[];
...
@@ -265,22 +108,30 @@ class ChargeController extends AdminbaseController {
...
@@ -265,22 +108,30 @@ class ChargeController extends AdminbaseController {
$proxylistj
[
$v
[
'id'
]]
=
$v
;
$proxylistj
[
$v
[
'id'
]]
=
$v
;
}
}
}
}
$this
->
assign
(
'proxylistj'
,
json_encode
(
$proxylistj
));
$this
->
assign
(
'promoterlist'
,
$promoterlist
);
$this
->
assign
(
'showlevel'
,
$showlevel
);
if
(
$role_id
==
6
||
$role_id
==
7
||
$role_id
==
8
||
$role_id
==
9
||
$_REQUEST
[
'proxyid'
]
!=
''
||
$_REQUEST
[
'promoterid'
]
!=
''
){
if
(
$role_id
==
6
||
$role_id
==
7
||
$role_id
==
8
||
$role_id
==
9
||
$_REQUEST
[
'proxyid'
]
!=
''
||
$_REQUEST
[
'promoterid'
]
!=
''
){
if
(
$_REQUEST
[
'proxyid'
]
!=
''
){
if
(
$_REQUEST
[
'proxyid'
]
!=
''
){
$adminid
=
$_REQUEST
[
'proxyid'
];
$adminid
=
$_REQUEST
[
'proxyid'
];
$_GET
[
'proxyid'
]
=
$_REQUEST
[
'proxyid'
];
$_GET
[
'proxyid'
]
=
$_REQUEST
[
'proxyid'
];
}
}
if
(
$_REQUEST
[
'promoterid'
]
!=
''
){
if
(
$_REQUEST
[
'promoterid'
]
!=
''
){
$adminid
=
$_REQUEST
[
'promoterid'
];
$adminid
=
$_REQUEST
[
'promoterid'
];
$_GET
[
'promoterid'
]
=
$_REQUEST
[
'promoterid'
];
$_GET
[
'promoterid'
]
=
$_REQUEST
[
'promoterid'
];
}
}
$path
=
setpath
(
$adminid
);
$path
=
setpath
(
$adminid
);
$uids
=
$Proxy
->
where
(
"path like '%
{
$path
}
%'"
)
->
getField
(
'uid'
,
true
);
$uids
=
$Proxy
->
where
(
"
type=0 and
path like '%
{
$path
}
%'"
)
->
getField
(
'uid'
,
true
);
if
(
!
$uids
){
if
(
!
$uids
){
$uids
=
[];
$uids
=
[];
array_push
(
$uids
,
'0'
);
array_push
(
$uids
,
'0'
);
}
}
$map
[
'
to
uid'
]
=
array
(
'in'
,
$uids
);
$map
[
'uid'
]
=
array
(
'in'
,
$uids
);
}
}
if
(
$_REQUEST
[
'status'
]
!=
''
){
if
(
$_REQUEST
[
'status'
]
!=
''
){
...
@@ -291,57 +142,206 @@ class ChargeController extends AdminbaseController {
...
@@ -291,57 +142,206 @@ class ChargeController extends AdminbaseController {
$map
[
'addtime'
]
=
array
(
"gt"
,
strtotime
(
$_REQUEST
[
'start_time'
]));
$map
[
'addtime'
]
=
array
(
"gt"
,
strtotime
(
$_REQUEST
[
'start_time'
]));
$_GET
[
'start_time'
]
=
$_REQUEST
[
'start_time'
];
$_GET
[
'start_time'
]
=
$_REQUEST
[
'start_time'
];
}
}
if
(
$_REQUEST
[
'end_time'
]
!=
''
){
if
(
$_REQUEST
[
'end_time'
]
!=
''
){
$map
[
'addtime'
]
=
array
(
"lt"
,
strtotime
(
$_REQUEST
[
'end_time'
]));
$map
[
'addtime'
]
=
array
(
"lt"
,
strtotime
(
$_REQUEST
[
'end_time'
]));
$_GET
[
'end_time'
]
=
$_REQUEST
[
'end_time'
];
$_GET
[
'end_time'
]
=
$_REQUEST
[
'end_time'
];
}
}
if
(
$_REQUEST
[
'start_time'
]
!=
''
&&
$_REQUEST
[
'end_time'
]
!=
''
){
if
(
$_REQUEST
[
'start_time'
]
!=
''
&&
$_REQUEST
[
'end_time'
]
!=
''
){
$map
[
'addtime'
]
=
array
(
"between"
,
array
(
strtotime
(
$_REQUEST
[
'start_time'
]),
strtotime
(
$_REQUEST
[
'end_time'
])));
$map
[
'addtime'
]
=
array
(
"between"
,
array
(
strtotime
(
$_REQUEST
[
'start_time'
]),
strtotime
(
$_REQUEST
[
'end_time'
]
.
' 23:59:59'
)));
$_GET
[
'start_time'
]
=
$_REQUEST
[
'start_time'
];
$_GET
[
'start_time'
]
=
$_REQUEST
[
'start_time'
];
$_GET
[
'end_time'
]
=
$_REQUEST
[
'end_time'
];
$_GET
[
'end_time'
]
=
$_REQUEST
[
'end_time'
];
}
}
if
(
$_REQUEST
[
'keyword'
]
!=
''
){
if
(
$_REQUEST
[
'keyword'
]
!=
''
){
$map
[
'uid|orderno'
]
=
array
(
"like"
,
"%"
.
$_REQUEST
[
'keyword'
]
.
"%"
);
$map
[
'uid|orderno
|trade_no
'
]
=
array
(
"like"
,
"%"
.
$_REQUEST
[
'keyword'
]
.
"%"
);
$_GET
[
'keyword'
]
=
$_REQUEST
[
'keyword'
];
$_GET
[
'keyword'
]
=
$_REQUEST
[
'keyword'
];
}
}
$map
[
'is_sure'
]
=
1
;
$charge
=
M
(
"users_charge"
);
$count
=
$charge
->
where
(
$map
)
->
count
();
$page
=
$this
->
page
(
$count
,
20
);
$lists
=
$charge
->
where
(
$map
)
->
order
(
"addtime DESC"
)
->
limit
(
$page
->
firstRow
.
','
.
$page
->
listRows
)
->
select
();
$charge
=
M
(
"users_charge2"
);
$moneysum
=
$charge
$count
=
$charge
->
where
(
$map
)
->
count
();
->
where
(
$map
)
$page
=
$this
->
page
(
$count
,
20
);
->
sum
(
"money"
);
$lists
=
$charge
->
where
(
$map
)
->
order
(
"addtime DESC"
)
->
limit
(
$page
->
firstRow
.
','
.
$page
->
listRows
)
->
select
();
foreach
(
$lists
as
$k
=>
$v
){
foreach
(
$lists
as
$k
=>
$v
){
$userinfo
=
M
(
"users"
)
->
field
(
"user_nicename"
)
->
where
(
"id='
$v[uid]
'"
)
->
find
();
$userinfo
=
M
(
"users"
)
->
field
(
"user_nicename"
)
->
where
(
"id='
$v[uid]
'"
)
->
find
();
$lists
[
$k
][
'userinfo'
]
=
$userinfo
;
$lists
[
$k
][
'userinfo'
]
=
$userinfo
;
$userinfo2
=
M
(
"users"
)
->
field
(
"user_nicename"
)
->
where
(
"id='
$v[touid]
'"
)
->
find
();
if
(
empty
(
$userinfo2
)){
}
$userinfo3
=
'平台'
;
}
else
{
$userinfo3
=
$userinfo2
[
'user_nicename'
]
.
' ( '
.
$v
[
'touid'
]
.
' )'
;
}
$lists
[
$k
][
'userinfo2'
]
=
$userinfo3
;
}
$moneysum
=
$charge
->
where
(
$map
)
->
sum
(
"money"
);
$this
->
assign
(
'moneysum'
,
$moneysum
);
$this
->
assign
(
'moneysum'
,
$moneysum
);
$this
->
assign
(
'lists'
,
$lists
);
$this
->
assign
(
'lists'
,
$lists
);
$this
->
assign
(
'formget'
,
$_GET
);
$this
->
assign
(
'formget'
,
$_GET
);
$this
->
assign
(
"page"
,
$page
->
show
(
'Admin'
));
$this
->
assign
(
"page"
,
$page
->
show
(
'Admin'
));
$this
->
assign
(
'status'
,
array
(
"0"
=>
"未确认"
,
"1"
=>
"已确认"
));
$this
->
assign
(
'status'
,
$this
->
status
);
$this
->
assign
(
'type'
,
$this
->
type
);
$this
->
assign
(
'ambient'
,
$this
->
ambient
);
$this
->
display
(
'index2'
);
$this
->
display
(
);
}
}
// function index(){
//
// $adminid=$_SESSION['ADMIN_ID'];
// $role_id=$_SESSION['role_id'];
// $Proxy=M('users_proxy');
// $showlevel='0';
// if($role_id==6){//一级代理
// $showlevel='1';
//
// $where['u.user_type']='1';
// $where['r.role_id']='7';
//
// $path=setpath($adminid);
// $uids=$Proxy->where("type=-1 and path like '%{$path}%'")->getField('uid',true);
// if(!$uids){
// $uids=[];
// array_push($uids,'0');
// }
// $where['u.id'] = array('in',$uids);
//
// $promoterlist=M('users u')
// ->join('__ROLE_USER__ r ON r.user_id = u.id')
// ->field('u.id,u.user_login,user_nicename')
// ->where($where)
// ->order("u.create_time DESC")
// ->select();
// foreach($promoterlist as $k=>$v){
// if($v['user_nicename']==''){
// $v['user_nicename']=$v['user_login'];
// }
// $promoterlist[$k]=$v;
// }
// }else if($role_id==7){
// $showlevel='2';
// }else{
// $where['u.user_type']='1';
// $where['r.role_id']='6';
// $proxylistj=[];
// $proxylist=M('users u')
// ->join('__ROLE_USER__ r ON r.user_id = u.id')
// ->field('u.id,u.user_login,u.user_nicename')
// ->where($where)
// ->order("u.create_time DESC")
// ->select();
// foreach($proxylist as $k=>$v){
// if($v['user_nicename']==''){
// $v['user_nicename']=$v['user_login'];
// }
// $where2['user_type']='1';
// $path=setpath($v['id']);
// $uids=$Proxy->where("type=-1 and path like '%{$path}%'")->getField('uid',true);
// if(!$uids){
// $uids=[];
// array_push($uids,'0');
// }
//
// $where2['id'] = array('in',$uids);
// $promoterlistj=[];
// $promoterlist2=M('users')
// ->field('id,user_login,user_nicename')
// ->where($where2)
// ->order("create_time DESC")
// ->select();
// foreach($promoterlist2 as $k2=>$v2){
// if($v2['user_nicename']==''){
// $v2['user_nicename']=$v2['user_login'];
// }
// $promoterlistj[$v2['id']]=$v2;
// }
// $v['list']=$promoterlistj;
// $proxylistj[$v['id']]=$v;
// }
// }
// if($role_id==6 || $role_id==7 || $role_id==8 || $role_id==9 || $_REQUEST['proxyid']!='' || $_REQUEST['promoterid']!=''){
// if($_REQUEST['proxyid']!=''){
// $adminid=$_REQUEST['proxyid'];
// $_GET['proxyid']=$_REQUEST['proxyid'];
// }
// if($_REQUEST['promoterid']!=''){
// $adminid=$_REQUEST['promoterid'];
// $_GET['promoterid']=$_REQUEST['promoterid'];
// }
// $path=setpath($adminid);
// $uids=$Proxy->where("path like '%{$path}%'")->getField('uid',true);
// if(!$uids){
// $uids=[];
// array_push($uids,'0');
// }
// $map['touid'] = array('in',$uids);
// }
//
// if($_REQUEST['status']!=''){
// $map['status']=$_REQUEST['status'];
// $_GET['status']=$_REQUEST['status'];
// }
// if($_REQUEST['start_time']!=''){
// $map['addtime']=array("gt",strtotime($_REQUEST['start_time']));
// $_GET['start_time']=$_REQUEST['start_time'];
// }
// if($_REQUEST['end_time']!=''){
// $map['addtime']=array("lt",strtotime($_REQUEST['end_time']));
// $_GET['end_time']=$_REQUEST['end_time'];
// }
// if($_REQUEST['start_time']!='' && $_REQUEST['end_time']!='' ){
// $map['addtime']=array("between",array(strtotime($_REQUEST['start_time']),strtotime($_REQUEST['end_time'])));
// $_GET['start_time']=$_REQUEST['start_time'];
// $_GET['end_time']=$_REQUEST['end_time'];
// }
// if($_REQUEST['keyword']!=''){
// $map['uid|orderno']=array("like","%".$_REQUEST['keyword']."%");
// $_GET['keyword']=$_REQUEST['keyword'];
// }
//
// $map['is_sure'] = 1;
//
// $charge=M("users_charge2");
// $count=$charge->where($map)->count();
// $page = $this->page($count, 20);
// $lists = $charge
// ->where($map)
// ->order("addtime DESC")
// ->limit($page->firstRow . ',' . $page->listRows)
// ->select();
//
// foreach($lists as $k=>$v){
// $userinfo=M("users")->field("user_nicename")->where("id='$v[uid]'")->find();
// $lists[$k]['userinfo']= $userinfo;
// $userinfo2=M("users")->field("user_nicename")->where("id='$v[touid]'")->find();
// if(empty($userinfo2)){
// $userinfo3 = '平台';
// } else {
// $userinfo3 = $userinfo2['user_nicename'] . ' ( '.$v['touid'].' )';
// }
// $lists[$k]['userinfo2'] = $userinfo3;
// }
//
// $moneysum = $charge
// ->where($map)
// ->sum("money");
//
// $this->assign('moneysum', $moneysum);
// $this->assign('lists', $lists);
// $this->assign('formget', $_GET);
// $this->assign("page", $page->show('Admin'));
//
// $this->assign('status', array("0"=>"未确认","1"=>"已确认"));
//
// $this->display('index2');
// }
function
setPay2
(){
function
setPay2
(){
$id
=
intval
(
$_GET
[
'id'
]);
$id
=
intval
(
$_GET
[
'id'
]);
if
(
$id
){
if
(
$id
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment