Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
pingan-marathon
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
58a560ed
authored
Nov 15, 2019
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
a404810d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
20 deletions
+49
-20
Application/Admin/Controller/InfoController.class.php
+1
-1
Application/Admin/View/default/Info_index.tpl
+36
-19
Application/Home/Controller/IndexController.class.php
+2
-0
Application/Tools/AdminController.class.php
+10
-0
No files found.
Application/Admin/Controller/
Prize
Controller.class.php
→
Application/Admin/Controller/
Info
Controller.class.php
View file @
58a560ed
...
...
@@ -9,7 +9,7 @@ class PrizeController extends AdminController
{
public
function
index
()
{
$sql
=
"select
p.id,u.name,u.tel,u.address,p.add_time,p.prize_name from prize as p,user as u where p.uid=u.id and p.is_get=1
"
;
$sql
=
"select
id,nickname,headimgurl,poster_url,headposter_url from user where poster_url is not NULL or headposter_url is not NULL
"
;
$list
=
M
()
->
query
(
$sql
);
$this
->
assign
(
'list'
,
$list
);
$this
->
display
();
...
...
Application/Admin/View/default/Info_index.tpl
View file @
58a560ed
...
...
@@ -2,6 +2,20 @@
{:block name="header_css" append}
<link
rel=
"stylesheet"
href=
"/Public/static/admin/lib/DataTables-1.10.12/media/css/dataTables.bootstrap4.min.css"
>
<link
rel=
"stylesheet"
href=
"/Public/static/admin/lib/DataTables-1.10.12/extensions/Buttons/css/buttons.bootstrap4.css"
>
<style
type=
"text/css"
>
.headimgUrl
{
width
:
300px
;
height
:
300px
;
}
.headposter_url
{
width
:
300px
;
height
:
300px
;
}
.poster_url
{
width
:
309px
;
height
:
500px
;
}
</style>
{:/block}
{:block name="content_title"}
{:/block}
...
...
@@ -20,15 +34,13 @@
<table
class=
"table table-striped table-bordered"
id=
"users_table"
>
<thead>
<tr>
<th>
编号
</th>
<th>
姓名
</th>
<th>
性别
</th>
<th>
年龄
</th>
<th>
电话
</th>
<th>
是否参加过马拉松
</th>
<th
class=
"order"
>
最好成绩({:$a})
</th>
<th>
上传图片
</th>
<th>
提交时间
</th>
<th>
ID
</th>
<th>
微信昵称
</th>
<th>
微信头像
</th>
<th>
生成的头像
</th>
<th>
生成头像时间
</th>
<th>
生成的海报
</th>
<th>
生成海报时间
</th>
</tr>
</thead>
<tbody
class=
"text-left"
>
...
...
@@ -36,20 +48,25 @@
<tr>
<td>
{:$item['id']}
</td>
<td>
{:$item['name']}
</td>
<td>
{:$item['sex']}
</td>
<td>
{:$item['age']}
</td>
<td>
{:$item['tel']}
</td>
<td>
{:$item['status']}
</td>
<td>
{:$item['score']}
</td>
<td>
{:$item['nickname']}
</td>
<td><img
class=
"headimgUrl"
style=
"width:100px;height:100px;object-fit:contain;"
src=
"{:$item['headimgurl']}"
/></td>
<td>
{:if $item['
imgU
rl']}
<img
class=
"
imgUrl"
style=
"width:100px;height:100px;object-fit:contain;"
src=
"{:$item['imgU
rl']}"
/>
<span
style=
"display:none"
>
{:$item['
imgU
rl']}
</span>
{:if $item['
headposter_u
rl']}
<img
class=
"
headposter_url"
style=
"width:100px;height:100px;object-fit:contain;"
src=
"{:$item['headposter_u
rl']}"
/>
<span
style=
"display:none"
>
{:$item['
headposter_u
rl']}
</span>
{:/if}
</td>
<td
>
{:$item.update_time|date_format:'%Y-%m-%d %H:%M:%S'}
</td>
<td
>
{:$item.headposter_times|date_format:'%Y-%m-%d %H:%M:%S'}
</td>
<td>
{:if $item['poster_url']}
<img
class=
"poster_url"
style=
"width:100px;height:100px;object-fit:contain;"
src=
"{:$item['poster_url']}"
/>
<span
style=
"display:none"
>
{:$item['poster_url']}
</span>
{:/if}
</td>
<td
>
{:$item.poster_times|date_format:'%Y-%m-%d %H:%M:%S'}
</td>
</tr>
{:/foreach}
</tbody>
...
...
Application/Home/Controller/IndexController.class.php
View file @
58a560ed
...
...
@@ -107,6 +107,7 @@ class IndexController extends Controller
{
M
(
'User'
)
->
where
([
'id'
=>
$user
[
'id'
]])
->
save
([
'poster_url'
=>
$url
,
'poster_times'
=>
time
()
]);
$this
->
ajaxReturn
(
array
(
'status'
=>
1
,
...
...
@@ -119,6 +120,7 @@ class IndexController extends Controller
{
M
(
'User'
)
->
where
([
'id'
=>
$user
[
'id'
]])
->
save
([
'headposter_url'
=>
$url
,
'headposter_times'
=>
time
()
]);
$this
->
ajaxReturn
(
array
(
'status'
=>
1
,
...
...
Application/Tools/AdminController.class.php
View file @
58a560ed
...
...
@@ -31,6 +31,16 @@ class AdminController extends Controller {
'auth_path'
=>
'1'
,
'auth_level'
=>
'1'
,
'auth_src'
=>
'0'
],
[
'auth_id'
=>
'2'
,
'auth_name'
=>
'用户信息'
,
'auth_pid'
=>
'0'
,
'auth_c'
=>
'Info'
,
'auth_a'
=>
'index'
,
'auth_path'
=>
'1'
,
'auth_level'
=>
'1'
,
'auth_src'
=>
'0'
]
];
$menu
=
[];
...
...
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