Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
xiaozhan
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
冷斌
xiaozhan
Commits
d9ddf235
Commit
d9ddf235
authored
Feb 19, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
5349c03c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
10 deletions
+23
-10
admin/themes/simplebootx/Admin/Welfare/index.html
+3
-9
application/Admin/Controller/WelfareController.class.php
+20
-1
No files found.
admin/themes/simplebootx/Admin/Welfare/index.html
View file @
d9ddf235
...
@@ -8,18 +8,14 @@
...
@@ -8,18 +8,14 @@
<li
class=
"active"
><a
>
列表
</a></li>
<li
class=
"active"
><a
>
列表
</a></li>
<li><a
href=
"{:U('Luckrate/add',array('giftid'=>$giftid))}"
>
添加
</a></li>
<li><a
href=
"{:U('Luckrate/add',array('giftid'=>$giftid))}"
>
添加
</a></li>
</ul>
</ul>
<form
class=
"well form-search"
name=
"form1"
method=
"post"
action=
""
>
{$giftinfo['giftname']}
</form>
<form
method=
"post"
class=
"js-ajax-form"
>
<form
method=
"post"
class=
"js-ajax-form"
>
<table
class=
"table table-hover table-bordered"
>
<table
class=
"table table-hover table-bordered"
>
<thead>
<thead>
<tr>
<tr>
<th
align=
"center"
>
ID
</th>
<th
align=
"center"
>
ID
</th>
<th>
礼物名称
</th>
<th>
数量
</th>
<th>
数量
</th>
<th>
倍数
</th>
<th>
中奖概率
</th>
<th>
中奖概率
</th>
<th>
是否全站通知
</th>
<th
align=
"center"
>
{:L('ACTIONS')}
</th>
<th
align=
"center"
>
{:L('ACTIONS')}
</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -28,10 +24,9 @@
...
@@ -28,10 +24,9 @@
<tr>
<tr>
<td
align=
"center"
>
{$vo.id}
</td>
<td
align=
"center"
>
{$vo.id}
</td>
<td>
{$vo['nums']}
</td>
<td>
{$vo['nums']}
</td>
<td>
{$vo['times']}
</td>
<td>
{$vo['rate']}%
</td>
<td>
{$vo['rate']}%
</td>
<td><if
condition=
"$vo['isall'] eq 1"
>
是
<else/>
否
</if></td>
<td><if
condition=
"$vo['isall'] eq 1"
>
是
<else/>
否
</if></td>
<td
align=
"center"
>
<td
align=
"center"
>
<a
href=
"{:U('Luckrate/edit',array('id'=>$vo['id']))}"
>
编辑
</a>
<a
href=
"{:U('Luckrate/edit',array('id'=>$vo['id']))}"
>
编辑
</a>
|
|
<a
href=
"{:U('Luckrate/del',array('id'=>$vo['id']))}"
class=
"js-ajax-dialog-btn"
data-msg=
"您确定要删除吗?"
>
删除
</a>
<a
href=
"{:U('Luckrate/del',array('id'=>$vo['id']))}"
class=
"js-ajax-dialog-btn"
data-msg=
"您确定要删除吗?"
>
删除
</a>
...
@@ -45,4 +40,4 @@
...
@@ -45,4 +40,4 @@
</div>
</div>
<script
src=
"__PUBLIC__/js/common.js"
></script>
<script
src=
"__PUBLIC__/js/common.js"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
application/Admin/Controller/WelfareController.class.php
View file @
d9ddf235
...
@@ -7,6 +7,25 @@ use Common\Controller\AdminbaseController;
...
@@ -7,6 +7,25 @@ use Common\Controller\AdminbaseController;
class
WelfareController
extends
AdminbaseController
class
WelfareController
extends
AdminbaseController
{
{
function
getGift
(){
$key
=
'getGiftList'
;
$list
=
getcache
(
$key
);
if
(
empty
(
$list
))
{
$rs
=
M
(
'gift'
)
->
field
(
"id,type,mark,giftname,needcoin,gifticon"
)
->
order
(
"orderno asc,addtime desc"
)
->
select
();
foreach
(
$rs
as
$k
=>
$v
){
$list
[
$k
][
'gifticon'
]
=
get_upload_path
(
$v
[
'gifticon'
]);
}
if
(
!
empty
(
$list
)){
setcaches
(
$key
,
$list
);
}
}
return
$list
;
}
var
$numslist
=
[
'1'
,
'10'
,
'66'
,
'88'
,
'100'
,
'520'
,
'1314'
];
var
$numslist
=
[
'1'
,
'10'
,
'66'
,
'88'
,
'100'
,
'520'
,
'1314'
];
function
index
(){
function
index
(){
$giftid
=
76
;
$giftid
=
76
;
...
@@ -28,12 +47,12 @@ class WelfareController extends AdminbaseController
...
@@ -28,12 +47,12 @@ class WelfareController extends AdminbaseController
$this
->
assign
(
'lists'
,
$lists
);
$this
->
assign
(
'lists'
,
$lists
);
$this
->
assign
(
'giftid'
,
$giftid
);
$this
->
assign
(
'giftid'
,
$giftid
);
$this
->
assign
(
'giftinfo'
,
$giftinfo
);
$this
->
assign
(
"page"
,
$page
->
show
(
'Admin'
));
$this
->
assign
(
"page"
,
$page
->
show
(
'Admin'
));
$this
->
display
();
$this
->
display
();
}
}
function
del
(){
function
del
(){
$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