chengkun
2025-05-12 b6bc92ec11e1e280185ce7682d17589cb45c20f3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        <link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
        <script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
        <script src="js/show_pub.js?v={yun:}$config.cachecode{/yun}"></script>
        <link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet"
         type="text/css" />
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui/custom_layer.js?v={yun:}$config.cachecode{/yun}"></script>
        <script>
            function keywords(name,amount,time,scope,id){
    $("#id").val(id);
    $("#name").val(name);
    $("#amount").val(amount);
    $("#time").val(time);
    $("#scope").val(scope);
    add_class('优惠券管理','360','auto','#status_div','');
</script>
        <title>后台管理</title>
    </head>
    <body class="body_ifm">
        <div id="status_div" style="display:none;padding-bottom: 10px;">
            <div id="infobox">
                <form action="index.php?m=coupon&c=save" target="supportiframe" method="post">
                    <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
                    <table cellspacing='1' cellpadding='1' class="admin_examine_table">
                        <tr>
                            <th>优惠券名称:</th>
                            <td><input id="name" class="tty_input t_w160" type="text" size="30" name="name"></td>
                        </tr>
                        <tr>
                            <th>金额:</th>
                            <td><input class="tty_input t_w80" type="text" id="amount" name="amount" size="20" value="" />&nbsp;&nbsp;元</td>
                        </tr>
                        <tr>
                            <th>有效期:</th>
                            <td><input class="tty_input t_w80" type="text" id="time" name="time" size="20" value="" />&nbsp;&nbsp;天</td>
                        </tr>
                        <tr>
                            <th>使用条件:</th>
                            <td><input class="tty_input t_w80" type="text" id="scope" name="scope" size="12" value="" />&nbsp;&nbsp;元( 至少消费 )</td>
                        </tr>
                        <tr>
                            <td colspan='2' align="center"> <input type="submit" value='确认' class="admin_examine_bth">
                                &nbsp;&nbsp;<input type="button" onClick="layer.closeAll();" class="admin_examine_bth_qx" value='取消'></td>
                        </tr>
                    </table>
                    <input type="hidden" name="id" id="id" value="" />
                </form>
            </div>
        </div>
 
        <div class="infoboxp">
            <div class="tty-tishi_top">
                <div class="admin_new_tip">
                    <a href="javascript:;" class="admin_new_tip_close"></a>
                    <a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
                    <div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
                    <div class="admin_new_tip_list_cont">
                        <div class="admin_new_tip_list">添加优惠劵:主要为了解决运营需求,开通会员套餐或注册企业增送优惠劵可以提升网站用户互动粘贴度和提升刺激网站销售量。</div>
                    </div>
                </div>
                <div class="clear"></div>
                <div class="admin_new_search_box">
                    <a href="javascript:void(0)" onClick="keywords('','','','','');" class="admin_new_cz_tj" style="margin-left:0px;">+
                        添加优惠券</a>
                </div>
                <div class="clear"></div>
            </div>
 
            <div class="tty_table-bom">
                <div class="table-list">
                    <div class="admin_table_border">
                        <iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
                        <form action="index.php" name="myform" method="get" target="supportiframe" id='myform'>
                            <input type="hidden" name="m" value="coupon">
                            <input type="hidden" name="c" value="del">
                            <input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
                            <table width="100%">
                                <thead>
                                    <tr class="admin_table_top">
                                        <th width="5%"><label for="chkall"><input type="checkbox" id='chkAll' onclick='CheckAll(this.form)' /></label></th>
                                        <th>
                                            {yun:}if $smarty.get.t=="id" && $smarty.get.order=="asc"{/yun}
                                            <a href="{yun:}searchurl order=desc t=id m=coupon untype='order,t'{/yun}">编号<img src="images/sanj.jpg" /></a>
                                            {yun:}else{/yun}
                                            <a href="{yun:}searchurl order=asc t=id m=coupon untype='order,t'{/yun}">编号<img src="images/sanj2.jpg" /></a>
                                            {yun:}/if{/yun}
                                        </th>
                                        <th align="left">名称</th>
                                        <th>金额</th>
                                        <th>有效期</th>
                                        <th>使用条件</th>
                                        <th class="admin_table_th_bg" width="150">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {yun:}foreach item=v key=key from=$rows{/yun}
                                    <tr align="center" {yun:}if ($key+1)%2=='0' {/yun}class="admin_com_td_bg"{yun:}/if{/yun} id="list{yun:}$v.id{/yun}">
                                        <td><input type="checkbox" value="{yun:}$v.id{/yun}" name='del[]' onclick='unselectall()' rel="del_chk" /></td>
                                        <td><span>{yun:}$v.id{/yun}</span></td>
                                        <td align="left">{yun:}$v.name{/yun}</td>
                                        <td>{yun:}$v.amount{/yun}元</td>
                                        <td>{yun:}$v.time{/yun}天</td>
                                        <td>消费{yun:}$v.scope{/yun}元</td>
 
                                        <td><span style="cursor:pointer;" onClick="keywords('{yun:}$v.name{/yun}','{yun:}$v.amount{/yun}','{yun:}$v.time{/yun}','{yun:}$v.scope{/yun}','{yun:}$v.id{/yun}')"
                                             class="admin_new_c_bth admin_n_sc mt5">修改</span>
                                            <a href="javascript:void(0)" class="admin_new_c_bth admin_new_c_bth_sc" onClick="layer_del('确定要删除?', 'index.php?m=coupon&c=del&del={yun:}$v.id{/yun}');">删除</a></td>
                                    </tr>
                                    {yun:}/foreach{/yun}
                                    <tr>
                                        <td align="center"><input type="checkbox" id='chkAll2' onclick='CheckAll2(this.form)' /></td>
                                        <td colspan="10">
                                            <label for="chkAll2">全选</label>&nbsp;
                                            <input class="admin_button" type="button" name="delsub" value="删除所选" onclick="return really('del[]')" /></td>
                                    </tr>
                                    {yun:}if $total > $config.sy_listnum {/yun}
                                    <tr>
                                        {yun:}if $pagenum==1{/yun}
                                        <td colspan="3"> 从 1 到 {yun:}$config.sy_listnum {/yun} ,总共 {yun:}$total{/yun} 条</td>
                                        {yun:}else if $pagenum > 1 && $pagenum < $pages{/yun} <td colspan="3"> 从 {yun:}($pagenum-1) *
                                            $config.sy_listnum + 1{/yun} 到 {yun:}$pagenum * $config.sy_listnum{/yun} ,总共 {yun:}$total{/yun} 条</td>
                                            {yun:}else if $pagenum == $pages{/yun}
                                            <td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$total{/yun} ,总共
                                                {yun:}$total{/yun} 条</td>
                                            {yun:}/if{/yun}
                                            <td colspan="8" class="digg">{yun:}$pagenav{/yun}</td>
                                    </tr>
                                    {yun:}/if{/yun}
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div>
            <div id="bg" class="admin_bg"></div>
    </body>
</html>