Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
quxiu
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
冷斌
quxiu
Commits
b688b5f1
Commit
b688b5f1
authored
Apr 09, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d2864631
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
292 additions
and
0 deletions
+292
-0
admin/themes/simplebootx/Admin/Dynamic/edit.html
+58
-0
admin/themes/simplebootx/Admin/Dynamic/index.html
+49
-0
admin/themes/simplebootx/Admin/Dynamic/report.html
+51
-0
application/Admin/Controller/DynamicController.class.php
+134
-0
No files found.
admin/themes/simplebootx/Admin/Dynamic/edit.html
0 → 100644
View file @
b688b5f1
<admintpl
file=
"header"
/>
</head>
<body>
<div
class=
"wrap"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"{:U('dynamic/edit',array('id'=>$id))}"
>
编辑
</a></li>
</ul>
<form
method=
"post"
class=
"form-horizontal js-ajax-form"
action=
"{:U('dynamic/edit_post')}"
>
<fieldset>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
举报时间
</label>
<div
class=
"controls"
>
<input
type=
"text"
value=
"{$addtime}"
>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
举报内容
</label>
<div
class=
"controls"
>
<textarea
type=
"text"
value=
""
>
{$dynamic.content}
</textarea>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
发布人
</label>
<div
class=
"controls"
>
<input
type=
"text"
value=
"{$userinfo2.user_nicename}"
>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
举报人
</label>
<div
class=
"controls"
>
<input
type=
"text"
value=
"{$userinfo.user_nicename}"
>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
举报理由
</label>
<div
class=
"controls"
>
<input
type=
"text"
value=
"{$report.content}"
>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
审核状态
</label>
<div
class=
"controls"
>
<label
class=
"radio inline"
for=
"status_2"
><input
type=
"radio"
name=
"status"
value=
"2"
id=
"status_2"
<
if
condition=
"$report['status'] eq '2'"
>
checked
</if>
>驳回
</label>
<label
class=
"radio inline"
for=
"status_0"
><input
type=
"radio"
name=
"status"
value=
"0"
id=
"status_0"
<
if
condition=
"$report['status'] eq '0'"
>
checked
</if>
>处理中
</label>
<label
class=
"radio inline"
for=
"status_1"
><input
type=
"radio"
name=
"status"
value=
"1"
id=
"status_1"
<
if
condition=
"$report['status'] eq '1'"
>
checked
</if>
>通过
</label>
</div>
</div>
</fieldset>
<div
class=
"form-actions"
>
<input
type=
"hidden"
name=
"id"
value=
"{$id}"
/>
<button
type=
"submit"
class=
"btn btn-primary js-ajax-submit"
>
{:L('SAVE')}
</button>
<a
class=
"btn"
href=
"{:U('dynamic/report')}"
>
{:L('BACK')}
</a>
</div>
</form>
</div>
<script
src=
"__PUBLIC__/js/common.js"
></script>
</body>
</html>
admin/themes/simplebootx/Admin/Dynamic/index.html
0 → 100644
View file @
b688b5f1
<admintpl
file=
"header"
/>
</head>
<body>
<div
class=
"wrap js-check-wrap"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"{:U('dynamic/index')}"
>
列表
</a></li>
</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"
>
<thead>
<tr>
<th
width=
"50"
>
ID
</th>
<th>
发布人
</th>
<th>
发布时间
</th>
<th>
发布内容
</th>
<th>
点赞数
</th>
<th
width=
"120"
>
{:L('ACTIONS')}
</th>
</tr>
</thead>
<tbody>
<php>
$user_statuses=array("0"=>L('USER_STATUS_BLOCKED'),"1"=>L('USER_STATUS_ACTIVATED'),"2"=>L('USER_STATUS_UNVERIFIED'));
</php>
<foreach
name=
"users"
item=
"vo"
>
<tr>
<td>
{$vo.id}
</td>
<td>
{$vo.user_nicename}( {$vo['uid']} )
</td>
<td>
{$vo.addtime}
</td>
<td>
{$vo.content}
</td>
<td>
{$vo.zan}
</td>
<td>
<a
class=
"js-ajax-delete"
href=
"{:U('dynamic/delete',array('id'=>$vo['id']))}"
>
{:L('DELETE')}
</a>
</td>
</tr>
</foreach>
</tbody>
</table>
<div
class=
"pagination"
>
{$page}
</div>
</div>
<script
src=
"__PUBLIC__/js/common.js"
></script>
</body>
</html>
admin/themes/simplebootx/Admin/Dynamic/report.html
0 → 100644
View file @
b688b5f1
<admintpl
file=
"header"
/>
</head>
<body>
<div
class=
"wrap js-check-wrap"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"{:U('dynamic/report')}"
>
列表
</a></li>
</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"
>
<thead>
<tr>
<th
width=
"50"
>
ID
</th>
<th>
举报时间
</th>
<th>
举报内容
</th>
<th>
发布人
</th>
<th>
举报人
</th>
<th>
举报理由
</th>
<th>
处理状态
</th>
<th
width=
"120"
>
{:L('ACTIONS')}
</th>
</tr>
</thead>
<tbody>
<php>
$user_statuses=array("0"=>L('USER_STATUS_BLOCKED'),"1"=>L('USER_STATUS_ACTIVATED'),"2"=>L('USER_STATUS_UNVERIFIED'));
</php>
<foreach
name=
"users"
item=
"vo"
>
<tr>
<td>
{$vo.id}
</td>
<td>
{$vo.addtime}
</td>
<td>
{$vo.content2}
</td>
<td>
{$vo.user_nicename2}
</td>
<td>
{$vo.user_nicename}( {$vo['uid']} )
</td>
<td>
{$vo.content}
</td>
<td>
{$vo.result}
</td>
<td>
<a
href=
'{:U("dynamic/edit",array("id"=>$vo["id"]))}'
>
{:L('EDIT')}
</a>
</td>
</tr>
</foreach>
</tbody>
</table>
<div
class=
"pagination"
>
{$page}
</div>
</div>
<script
src=
"__PUBLIC__/js/common.js"
></script>
</body>
</html>
application/Admin/Controller/DynamicController.class.php
0 → 100644
View file @
b688b5f1
<?php
namespace
Admin\Controller
;
use
Common\Controller\AdminbaseController
;
class
DynamicController
extends
AdminbaseController
{
function
_initialize
()
{
parent
::
_initialize
();
$this
->
dynamic_model
=
D
(
"Common/Dynamic"
);
}
public
function
index
()
{
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'
]
=
array
(
"like"
,
"%"
.
$_REQUEST
[
'keyword'
]
.
"%"
);
$_GET
[
'keyword'
]
=
$_REQUEST
[
'keyword'
];
}
$count
=
$this
->
dynamic_model
->
where
(
$map
)
->
count
();
$page
=
$this
->
page
(
$count
,
20
);
$results
=
$this
->
dynamic_model
->
where
(
$map
)
->
order
(
"addtime DESC"
)
->
limit
(
$page
->
firstRow
.
','
.
$page
->
listRows
)
->
select
();
foreach
(
$results
as
$key
=>
$v
)
{
$userinfo
=
getUserInfo
(
$v
[
'uid'
]);
$results
[
$key
][
'user_nicename'
]
=
$userinfo
[
'user_nicename'
];
$zan2
=
M
(
"users_dynamic"
)
->
where
(
'dynamic_id = '
.
$v
[
'id'
])
->
select
();
$results
[
$key
][
'zan'
]
=
count
(
$zan2
);
$results
[
$key
][
'addtime'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'addtime'
]);
}
$this
->
assign
(
"page"
,
$page
->
show
());
$this
->
assign
(
"users"
,
$results
);
$this
->
assign
(
'formget'
,
$_GET
);
$this
->
display
();
}
public
function
delete
()
{
$id
=
intval
(
I
(
"get.id"
));
if
(
$this
->
dynamic_model
->
where
(
"id=
{
$id
}
"
)
->
delete
()
!==
false
)
{
M
(
"users_dynamic"
)
->
where
(
"dynamic_id=
{
$id
}
"
)
->
delete
();
M
(
"users_report_dynamic"
)
->
where
(
"dynamic_id=
{
$id
}
"
)
->
delete
();
$this
->
success
(
"删除成功!"
);
}
else
{
$this
->
error
(
"删除失败!"
);
}
}
public
function
report
()
{
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'
]
=
array
(
"like"
,
"%"
.
$_REQUEST
[
'keyword'
]
.
"%"
);
$_GET
[
'keyword'
]
=
$_REQUEST
[
'keyword'
];
}
$report
=
M
(
"users_report_dynamic"
);
$count
=
$report
->
where
(
$map
)
->
count
();
$page
=
$this
->
page
(
$count
,
20
);
$results
=
$report
->
where
(
$map
)
->
order
(
"addtime DESC"
)
->
limit
(
$page
->
firstRow
.
','
.
$page
->
listRows
)
->
select
();
$status
=
[
'待处理'
,
'通过'
,
'驳回'
];
foreach
(
$results
as
$key
=>
$v
)
{
$results
[
$key
][
'addtime'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'addtime'
]);
$userinfo
=
getUserInfo
(
$v
[
'uid'
]);
$dynamic
=
$this
->
dynamic_model
->
where
(
"id=
{
$v
[
'dynamic_id'
]
}
"
)
->
find
();
$userinfo2
=
getUserInfo
(
$dynamic
[
'uid'
]);
$results
[
$key
][
'user_nicename'
]
=
$userinfo
[
'user_nicename'
];
$results
[
$key
][
'content2'
]
=
$dynamic
[
'content'
];
$results
[
$key
][
'user_nicename2'
]
=
$userinfo2
[
'user_nicename'
];
$results
[
$key
][
'result'
]
=
$status
[
$v
[
'status'
]];
}
$this
->
assign
(
"page"
,
$page
->
show
());
$this
->
assign
(
"users"
,
$results
);
$this
->
assign
(
'formget'
,
$_GET
);
$this
->
display
();
}
public
function
edit
()
{
$id
=
intval
(
I
(
"get.id"
));
$report
=
M
(
"users_report_dynamic"
)
->
where
(
"id=
$id
"
)
->
find
();
$dynamic
=
$this
->
dynamic_model
->
where
(
"id=
{
$report
[
'dynamic_id'
]
}
"
)
->
find
();
$userinfo
=
getUserInfo
(
$report
[
'uid'
]);
$userinfo2
=
getUserInfo
(
$dynamic
[
'uid'
]);
$this
->
assign
(
"id"
,
$id
);
$this
->
assign
(
'addtime'
,
date
(
'Y-m-d H:i:s'
,
$report
[
'addtime'
]));
$this
->
assign
(
"report"
,
$report
);
$this
->
assign
(
"dynamic"
,
$dynamic
);
$this
->
assign
(
"userinfo"
,
$userinfo
);
$this
->
assign
(
"userinfo2"
,
$userinfo2
);
$this
->
display
();
}
public
function
edit_post
()
{
if
(
IS_POST
)
{
$rid
=
$_POST
[
'id'
];
M
(
"users_report_dynamic"
)
->
save
(
$_POST
);
if
(
$_POST
[
'status'
]
==
1
)
{
$report
=
M
(
"users_report_dynamic"
)
->
where
(
"id=
$rid
"
)
->
find
();
$id
=
$report
[
'dynamic_id'
];
$this
->
dynamic_model
->
where
(
"id=
{
$id
}
"
)
->
delete
();
M
(
"users_dynamic"
)
->
where
(
"dynamic_id=
{
$id
}
"
)
->
delete
();
M
(
"users_report_dynamic"
)
->
where
(
"dynamic_id=
{
$id
}
"
)
->
delete
();
}
$this
->
success
(
"更新成功!"
,
U
(
'dynamic/report'
));
}
}
}
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