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
b7b5c008
Commit
b7b5c008
authored
Feb 17, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
a83684ea
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
4 deletions
+48
-4
admin/themes/simplebootx/Admin/Dynamic/index.html
+10
-0
admin/themes/simplebootx/Admin/Dynamic/report.html
+8
-0
application/Admin/Controller/DynamicController.class.php
+30
-4
No files found.
admin/themes/simplebootx/Admin/Dynamic/index.html
View file @
b7b5c008
...
@@ -5,6 +5,16 @@
...
@@ -5,6 +5,16 @@
<ul
class=
"nav nav-tabs"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"{:U('dynamic/index')}"
>
列表
</a></li>
<li
class=
"active"
><a
href=
"{:U('dynamic/index')}"
>
列表
</a></li>
</ul>
</ul>
<form
class=
"well form-search"
name=
"form1"
method=
"post"
style=
"float:left"
action=
""
>
提交时间:
<input
type=
"text"
name=
"start_time"
class=
"js-date date"
id=
"start_time"
value=
"{$formget.start_time}"
style=
"width: 80px;"
autocomplete=
"off"
>
-
<input
type=
"text"
class=
"js-date date"
name=
"end_time"
id=
"end_time"
value=
"{$formget.end_time}"
style=
"width: 80px;"
autocomplete=
"off"
>
关键字:
<input
type=
"text"
name=
"keyword"
style=
"width: 200px;"
value=
"{$formget.keyword}"
placeholder=
"发布人id."
>
<input
type=
"button"
class=
"btn btn-primary"
value=
"搜索"
onclick=
"form1.action='{:U('Dynamic/index')}';form1.submit();"
/>
</form>
<table
class=
"table table-hover table-bordered"
>
<table
class=
"table table-hover table-bordered"
>
<thead>
<thead>
<tr>
<tr>
...
...
admin/themes/simplebootx/Admin/Dynamic/report.html
View file @
b7b5c008
...
@@ -5,6 +5,14 @@
...
@@ -5,6 +5,14 @@
<ul
class=
"nav nav-tabs"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"{:U('dynamic/report')}"
>
列表
</a></li>
<li
class=
"active"
><a
href=
"{:U('dynamic/report')}"
>
列表
</a></li>
</ul>
</ul>
<form
class=
"well form-search"
name=
"form1"
method=
"post"
style=
"float:left"
action=
""
>
提交时间:
<input
type=
"text"
name=
"start_time"
class=
"js-date date"
id=
"start_time"
value=
"{$formget.start_time}"
style=
"width: 80px;"
autocomplete=
"off"
>
-
<input
type=
"text"
class=
"js-date date"
name=
"end_time"
id=
"end_time"
value=
"{$formget.end_time}"
style=
"width: 80px;"
autocomplete=
"off"
>
关键字:
<input
type=
"text"
name=
"keyword"
style=
"width: 200px;"
value=
"{$formget.keyword}"
placeholder=
"举报人id"
>
<input
type=
"button"
class=
"btn btn-primary"
value=
"搜索"
onclick=
"form1.action='{:U('Dynamic/report')}';form1.submit();"
/>
</form>
<table
class=
"table table-hover table-bordered"
>
<table
class=
"table table-hover table-bordered"
>
<thead>
<thead>
<tr>
<tr>
...
...
application/Admin/Controller/DynamicController.class.php
View file @
b7b5c008
...
@@ -14,9 +14,21 @@ class DynamicController extends AdminbaseController
...
@@ -14,9 +14,21 @@ class DynamicController extends AdminbaseController
public
function
index
()
public
function
index
()
{
{
$count
=
$this
->
dynamic_model
->
count
();
if
(
$_REQUEST
[
'start_time'
]
!=
''
){
$map
[
'addtime'
]
=
array
(
"gt"
,
strtotime
(
$_REQUEST
[
'start_time'
]));
}
if
(
$_REQUEST
[
'end_time'
]
!=
''
){
$map
[
'addtime'
]
=
array
(
"lt"
,
strtotime
(
$_REQUEST
[
'end_time'
]));
}
if
(
$_REQUEST
[
'start_time'
]
!=
''
&&
$_REQUEST
[
'end_time'
]
!=
''
){
$map
[
'addtime'
]
=
array
(
"between"
,
array
(
strtotime
(
$_REQUEST
[
'start_time'
]),
strtotime
(
$_REQUEST
[
'end_time'
])));
}
if
(
$_REQUEST
[
'keyword'
]
!=
''
){
$map
[
'uid'
]
=
array
(
"like"
,
"%"
.
$_REQUEST
[
'keyword'
]
.
"%"
);
}
$count
=
$this
->
dynamic_model
->
where
(
$map
)
->
count
();
$page
=
$this
->
page
(
$count
,
20
);
$page
=
$this
->
page
(
$count
,
20
);
$results
=
$this
->
dynamic_model
->
order
(
"addtime DESC"
)
->
limit
(
$page
->
firstRow
.
','
.
$page
->
listRows
)
->
select
();
$results
=
$this
->
dynamic_model
->
where
(
$map
)
->
order
(
"addtime DESC"
)
->
limit
(
$page
->
firstRow
.
','
.
$page
->
listRows
)
->
select
();
foreach
(
$results
as
$key
=>
$v
)
{
foreach
(
$results
as
$key
=>
$v
)
{
$userinfo
=
getUserInfo
(
$v
[
'uid'
]);
$userinfo
=
getUserInfo
(
$v
[
'uid'
]);
$results
[
$key
][
'user_nicename'
]
=
$userinfo
[
'user_nicename'
];
$results
[
$key
][
'user_nicename'
]
=
$userinfo
[
'user_nicename'
];
...
@@ -26,6 +38,7 @@ class DynamicController extends AdminbaseController
...
@@ -26,6 +38,7 @@ class DynamicController extends AdminbaseController
}
}
$this
->
assign
(
"page"
,
$page
->
show
());
$this
->
assign
(
"page"
,
$page
->
show
());
$this
->
assign
(
"users"
,
$results
);
$this
->
assign
(
"users"
,
$results
);
$this
->
assign
(
'formget'
,
$_GET
);
$this
->
display
();
$this
->
display
();
}
}
public
function
delete
()
public
function
delete
()
...
@@ -42,10 +55,22 @@ class DynamicController extends AdminbaseController
...
@@ -42,10 +55,22 @@ class DynamicController extends AdminbaseController
public
function
report
()
public
function
report
()
{
{
if
(
$_REQUEST
[
'start_time'
]
!=
''
){
$map
[
'addtime'
]
=
array
(
"gt"
,
strtotime
(
$_REQUEST
[
'start_time'
]));
}
if
(
$_REQUEST
[
'end_time'
]
!=
''
){
$map
[
'addtime'
]
=
array
(
"lt"
,
strtotime
(
$_REQUEST
[
'end_time'
]));
}
if
(
$_REQUEST
[
'start_time'
]
!=
''
&&
$_REQUEST
[
'end_time'
]
!=
''
){
$map
[
'addtime'
]
=
array
(
"between"
,
array
(
strtotime
(
$_REQUEST
[
'start_time'
]),
strtotime
(
$_REQUEST
[
'end_time'
])));
}
if
(
$_REQUEST
[
'keyword'
]
!=
''
){
$map
[
'uid'
]
=
array
(
"like"
,
"%"
.
$_REQUEST
[
'keyword'
]
.
"%"
);
}
$report
=
M
(
"users_report_dynamic"
);
$report
=
M
(
"users_report_dynamic"
);
$count
=
$report
->
count
();
$count
=
$report
->
where
(
$map
)
->
count
();
$page
=
$this
->
page
(
$count
,
20
);
$page
=
$this
->
page
(
$count
,
20
);
$results
=
$report
->
order
(
"addtime DESC"
)
->
limit
(
$page
->
firstRow
.
','
.
$page
->
listRows
)
->
select
();
$results
=
$report
->
where
(
$map
)
->
order
(
"addtime DESC"
)
->
limit
(
$page
->
firstRow
.
','
.
$page
->
listRows
)
->
select
();
$status
=
[
'待处理'
,
'通过'
,
'驳回'
];
$status
=
[
'待处理'
,
'通过'
,
'驳回'
];
foreach
(
$results
as
$key
=>
$v
)
{
foreach
(
$results
as
$key
=>
$v
)
{
$results
[
$key
][
'addtime'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'addtime'
]);
$results
[
$key
][
'addtime'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'addtime'
]);
...
@@ -59,6 +84,7 @@ class DynamicController extends AdminbaseController
...
@@ -59,6 +84,7 @@ class DynamicController extends AdminbaseController
}
}
$this
->
assign
(
"page"
,
$page
->
show
());
$this
->
assign
(
"page"
,
$page
->
show
());
$this
->
assign
(
"users"
,
$results
);
$this
->
assign
(
"users"
,
$results
);
$this
->
assign
(
'formget'
,
$_GET
);
$this
->
display
();
$this
->
display
();
}
}
...
...
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