Commit d9ddf235 by 冷斌

add

parent 5349c03c
......@@ -8,18 +8,14 @@
<li class="active"><a >列表</a></li>
<li><a href="{:U('Luckrate/add',array('giftid'=>$giftid))}">添加</a></li>
</ul>
<form class="well form-search" name="form1" method="post" action="">
{$giftinfo['giftname']}
</form>
<form method="post" class="js-ajax-form">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th align="center">ID</th>
<th>礼物名称</th>
<th>数量</th>
<th>倍数</th>
<th>中奖概率</th>
<th>是否全站通知</th>
<th align="center">{:L('ACTIONS')}</th>
</tr>
</thead>
......@@ -28,10 +24,9 @@
<tr>
<td align="center">{$vo.id}</td>
<td>{$vo['nums']}</td>
<td>{$vo['times']}</td>
<td>{$vo['rate']}%</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/del',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要删除吗?">删除</a>
......@@ -45,4 +40,4 @@
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
</html>
......@@ -7,6 +7,25 @@ use Common\Controller\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'];
function index(){
$giftid= 76;
......@@ -28,12 +47,12 @@ class WelfareController extends AdminbaseController
$this->assign('lists', $lists);
$this->assign('giftid', $giftid);
$this->assign('giftinfo', $giftinfo);
$this->assign("page", $page->show('Admin'));
$this->display();
}
function del(){
$id=intval($_GET['id']);
if($id){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment