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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!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>
        <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 src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
        <title>后台管理</title>
    </head>
 
    <body class="body_ifm">
        <div class="infoboxp">
 
            <div class="tty-tishi_top">
                <div class="admin_new_search_box">
                    <form action="index.php" name="myform" method="get">
                        <input name="m" value="admin_prepaid" type="hidden" />
                        <div class="admin_new_search_name">搜索类型:</div>
 
                        <div class="admin_Filter_text formselect" did="dctype">
                            <input type="button" {yun:}if $smarty.get.ctype=='2' {/yun} value="使用者" {yun:}else{/yun} value="编号" {yun:}/if{/yun}
                             class="admin_Filter_but" id="bctype">
                            <input type="hidden" name="ctype" id="ctype" />
 
                            <div class="admin_Filter_text_box" style="display:none" id="dctype">
                                <ul>
                                    <li><a href="javascript:void(0)" onClick="formselect('1','ctype','编号')">编号</a></li>
                                    <li><a href="javascript:void(0)" onClick="formselect('2','ctype','使用者')">使用者</a></li>
                                </ul>
                            </div>
                        </div>
                        <input class="admin_Filter_search" type="text" name="keyword" size="25" placeholder="请输入你要搜索的关键字">
 
                        <input class="admin_Filter_bth" type="submit" name="news_search" style="cursor:pointer;" value="搜索" />
 
                        <a href="javascript:void(0)" onclick="$('.admin_screenlist_box').toggle();" class="admin_new_search_gj">高级搜索</a>
 
                        <a href="index.php?m=admin_prepaid&c=add" class="admin_new_cz_tj" style="width:118px;">+ 批量生成充值卡</a>
                        <a href="javascript:ExportCard();" class="admin_new_cz_tj" style="width:118px;">导出</a>
                    </form>
                    {yun:}include file="admin/admin_search.htm"{/yun}
                </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="admin_prepaid">
                            <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="20"><label for="chkall"><input type="checkbox" id='chkAll' onclick='CheckAll(this.form)' /></label></th>
                                        <th align="left">编号</th>
                                        <th >密码</th>
                                        <th>抵用额度</th>
                                        <th>有效期</th>
                                        <th align="left">使用者/使用时间</th>
                                        <th>是否可用</th>
                                        <th class="admin_table_th_bg" width="80">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
 
                                    {yun:}foreach item=v key=key from=$rows{/yun}
                                    <tr  {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}" class="check_all" name='del[]' onclick='unselectall()'
                                             rel="del_chk" /></td>
                                        <td align="left"><span>{yun:}$v.card{/yun}</span></td>
                                        <td align="center">{yun:}$v.password{/yun}</td>
                                        <td align="center">{yun:}$v.quota{/yun}</td>
                                        <td align="center">
                                            {yun:}if $v.username{/yun}
                                            <font color="green">已使用</font>
                                            {yun:}elseif $v.etime lt time(){/yun}
                                            <font color="red">已过期</font>
                                            {yun:}else{/yun}
                                            {yun:}$v.stime|date_format:'%Y-%m-%d %H:%M:%S'{/yun} 至 {yun:}$v.etime|date_format:'%Y-%m-%d %H:%M:%S'{/yun}
                                            {yun:}/if{/yun}
                                        </td>
                                        <td >
                                            {yun:}if $v.username{/yun}
                                            {yun:}$v.username{/yun}
                                            {yun:}/if{/yun}
                                            {yun:}if $v.utime{/yun}
                                            <br />{yun:}$v.utime|date_format:'%Y-%m-%d %H:%M:%S'{/yun}
                                            {yun:}/if{/yun}
                                        </td>
                                        <td  align="center" id="type{yun:}$v.id{/yun}">
                                            {yun:}if $v.type=="1"{/yun}
                                            <a href="javascript:void(0);" onClick="rec_up('index.php?m=admin_prepaid&c=rec','{yun:}$v.id{/yun}','2','type');">
                                                <img src="../config/ajax_img/doneico.gif"></a>
                                            {yun:}else{/yun}
                                            <a href="javascript:void(0);" onClick="rec_up('index.php?m=admin_prepaid&c=rec','{yun:}$v.id{/yun}','1','type');">
                                                <img src="../config/ajax_img/errorico.gif"></a>
                                            {yun:}/if{/yun}
                                        </td>
                                        <td  align="center"><div style="width:130px;">
                                            {yun:}if $v.statue!="2"&& !$v.username{/yun}
                                            <a href="index.php?m=admin_prepaid&c=upcard&id={yun:}$v.id{/yun}" class="admin_new_c_bth admin_n_sc mt5">修改</a>
                                            {yun:}/if{/yun}
 
                                            <a href="javascript:void(0)" class="admin_new_c_bth admin_new_c_bth_sc mt5" onClick="layer_del('确定要删除?', 'index.php?m=admin_prepaid&c=del&del={yun:}$v.id{/yun}');">删除</a></div>
                                        </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>
        </div>
 
        <div id="export" style="display:none;">
            <div style="margin-top:10px;">
                <form action="index.php?m=admin_prepaid&c=xls" target="supportiframe" method="post" id="formstatus" class="myform">
                    <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
                    <input type="hidden" name="where" value="{yun:}$where{/yun}">
                    <input name="pid" value="0" type="hidden">
                    <div class="admin_resume_dc">
                        <label>
                            <span class="admin_resume_dc_s">
                                <input type="checkbox" class="type" name="type[]" value="card">充值卡编号
                            </span>
                        </label>
                        <label>
                            <span class="admin_resume_dc_s">
                                <input type="checkbox" class="type" name="type[]" value="password">充值卡密码
                            </span>
                        </label>
                        <label>
                            <span class="admin_resume_dc_s">
                                <input type="checkbox" class="type" name="type[]" value="quota">抵用额度
                            </span>
                        </label>
                        <label>
                            <span class="admin_resume_dc_s">
                                <input type="checkbox" class="type" name="type[]" value="stime">开始时间
                            </span>
                        </label>
                        <label>
                            <span class="admin_resume_dc_s">
                                <input type="checkbox" class="type" name="type[]" value="etime">截止时间
                            </span>
                        </label>
                        <label>
                            <span class="admin_resume_dc_s">
                                <input type="checkbox" class="type" name="type[]" value="username">使用者
                            </span>
                        </label>
                        <label>
                            <span class="admin_resume_dc_s">
                                <input type="checkbox" class="type" name="type[]" value="uid">使用者UID
                            </span>
                        </label>
 
                        <label>
                            <span class="admin_resume_dc_s">
                                <input type="checkbox" class="type" name="type[]" value="utime">使用时间
                            </span>
                        </label>
                    </div>
 
                    <div class="admin_resume_dc_sub" style="width:390px; margin-top:10px;">
                        <input type="button" onClick="check_xls();" value='确认' class="admin_resume_dc_bth1">
                        <input type="button" onClick="layer.closeAll();" class="admin_resume_dc_bth2" value='取消'>
                    </div>
                </form>
            </div>
        </div>
        </div>
 
        <script>
            layui.use(['laydate'], function() {
                var laydate = layui.laydate,
                    $ = layui.$;
 
                laydate.render({
                    elem: '#time'
                });
 
                laydate.render({
                    elem: '#time_end'
                });
            });
 
            function ExportCard() {
                var codewebarr = "";
                $(".check_all:checked").each(function() { //由于复选框一般选中的是多个,所以可以循环输出
                    if (codewebarr == "") {
                        codewebarr = $(this).val();
                    } else {
                        codewebarr = codewebarr + "," + $(this).val();
                    }
                });
                if (codewebarr == "") {
                    parent.layer.msg("请选择需要导出数据!", 2, 8);
                    return false;
                } else {
                    $("input[name=pid]").val(codewebarr);
                    add_class('确认导出', '390', '240', '#export', '');
                }
            }
 
            function check_xls() {
                var type = "";
 
                $(".type:checked").each(function() { //由于复选框一般选中的是多个,所以可以循环输出
                    if (type == "") {
                        type = $(this).val();
                    } else {
                        type = type + "," + $(this).val();
                    }
                });
                if (type == "") {
                    parent.layer.msg("请选择导出字段!", 2, 8);
                    return false;
                }
                setTimeout(function() {
                    $('.myform').submit()
                }, 0);
                layer.closeAll();
            }
        </script>
    </body>
</html>