chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!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>
        <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/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
        <title>后台管理</title>
 
        <style>
            .admin_zph_img img {max-width:100%; width:expression(this.width > 200 ? "200px" : this.width); max-height:180px; height:expression(this.height > 180 ? "180px" : this.height);}
    </style>
 
    </head>
 
    <body class="body_ifm">
        <div class="infoboxp">
 
            <div class="tty-tishi_top">
                <div class="tabs_info">
                    <ul>
                        <li><a href="index.php?m=admin_company_pic{yun:}if $smarty.get.comid{/yun}&comid={yun:}$smarty.get.comid{/yun}{yun:}/if{/yun}">企业LOGO</a></li>
                        <li><a href="index.php?m=admin_company_pic&c=show{yun:}if $smarty.get.comid{/yun}&comid={yun:}$smarty.get.comid{/yun}{yun:}/if{/yun}">企业环境</a></li>
                        <li class="curr"><a href="index.php?m=admin_company_pic&c=banner{yun:}if $smarty.get.comid{/yun}&comid={yun:}$smarty.get.comid{/yun}{yun:}/if{/yun}">企业横幅</a></li>
                    </ul>
                </div>
                <div class="admin_new_search_box">
 
                    <div class="admin_new_search_name">搜索类型:</div>
                    <form action="index.php" name="myform" method="get">
                        <input type="hidden" name="m" value="admin_company_pic" />
                        <input type="hidden" name="c" value="banner" />
                        <div class="admin_Filter_text formselect" did="dcom_type">
                            <input type="button" {yun:}if $smarty.get.type=='1' ||$smarty.get.type=='' {/yun} value="企业全称" {yun:}elseif
                             $smarty.get.type=='2' {/yun} value="用户ID" {yun:}/if{/yun} class="admin_new_select_text" id="bcom_type">
                            <input type="hidden" name="type" id="com_type" value="{yun:}if $smarty.get.type{/yun}{yun:}$smarty.get.type{/yun}{yun:}else{/yun}1{yun:}/if{/yun}" />
 
                            <div class="admin_Filter_text_box" style="display:none" id="dcom_type">
                                <ul>
                                    <li><a href="javascript:void(0)" onClick="formselect('1','com_type','企业名称')">企业名称</a></li>
                                    <li><a href="javascript:void(0)" onClick="formselect('2','com_type','用户ID')">用户ID</a></li>
                                </ul>
                            </div>
                        </div>
                        <input type="text" placeholder="输入你要搜索的关键字" name="keyword" class="admin_new_text">
                        <input type="submit" name='news_search' value="搜索" class="admin_new_bth" />
                        <a href="javascript:void(0)" onclick="$('.admin_screenlist_box').toggle();" class="admin_new_search_gj">高级搜索</a>
                    </form>
                    {yun:}include file="admin/admin_search.htm"{/yun}
                </div>
 
                <div class="clear"></div>
            </div>
            <div class="main_tag mt10">
 
 
                <div class="tag_box">
 
                    <div class="clear"></div>
 
                    <form action="index.php" target="supportiframe" name="myform" id='myform' method="get">
 
                        <input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
                        <input name="m" value="admin_company_pic" type="hidden" />
                        <input name="c" value="del" type="hidden" />
                        <input name="type" value="banner" type="hidden" />
 
                        {yun:}foreach from=$rows item=list{/yun}
                        <div class="admin_com_img">
                            <div class="admin_com_img_box">
                                <div class="admin_com_img_box_img">
                                    <img src="{yun:}$list.pic{/yun}" lay-src="{yun:}$list.pic{/yun}" id="pix{yun:}$list.id{/yun}">
                                    <input type="checkbox" value="{yun:}$list.id{/yun}" name='del[]' onclick='unselectall()' rel="del_chk" class="admin_com_img_checkbox check_all">
                                    <div class="admin_zph_img_box_img_p">
                                    {yun:}$list.name{/yun}{yun:}if $list.status=='0'{/yun}
                                        <span><font color="#1bbe36">已审核</font></span>
                                        {yun:}else if $list.status=='1'{/yun}
                                        <span><font color="#f00"> 未审核</font></span>
                                        {yun:}else if $list.status=='2'{/yun}
                                        <span><font color="#f00"> 未通过</font></span>
                                        {yun:}/if{/yun}
                                    </div>
                                </div>
                                <div class="admin_com_img_box_p">
                                    <a href="javascript:void(0);" pid="{yun:}$list.id{/yun}" status="{yun:}$list.status{/yun}" class="admin_new_c_bth admin_new_c_bthsh status">审核</a>
                                    <a href="javascript:addImg('{yun:}$list.id{/yun}','{yun:}$list.name{/yun}','{yun:}$list.pic{/yun}')" class="admin_new_c_bth">修改</a>
                                    <a href="javascript:void(0)" onClick="layer_del('确定要删除?', 'index.php?m=admin_company_pic&c=del&type=banner&delid={yun:}$list.id{/yun}');"
                                     class="admin_new_c_bth admin_new_c_bth_sc">删除</a>
                                </div>
                            </div>
                        </div>
                        {yun:}/foreach{/yun}
                        
                        <div class="clear"></div>
 
                        <div class="admin_com_img_box_digg">
                            <span class="admin_com_img_box_qx">
                                {yun:}if $rows{/yun}
                                <input type="checkbox" id='chkAll2' onclick='CheckAll2(this.form)'><label for="chkAll2">全选</label>
                                <input type="button" name="delsub" value="删除所选" onClick="return really('del[]')" value="批量删除" class="admin_button">
                                <input type="button" name="delsub" onClick="StatusAll();" value="批量审核" class="admin_button">
                                {yun:}/if{/yun}
                            </span>
                        </div>
 
                        {yun:}if $total > 15 {/yun}
                        <div class="admin_com_img_box_digg">
                            {yun:}if $pagenum==1{/yun}
                            <span class="admin_com_img_box_qx"> 从 1 到 15 ,总共 {yun:}$total{/yun} 条</span>
                            {yun:}else if $pagenum > 1 && $pagenum < $pages{/yun} <span class="admin_com_img_box_qx"> 从 {yun:}($pagenum-1) *
                                15 + 1{/yun} 到 {yun:}$pagenum * 15{/yun} ,总共 {yun:}$total{/yun} 条</span>
                                {yun:}else if $pagenum == $pages{/yun}
                                <span class="admin_com_img_box_qx"> 从 {yun:}($pagenum-1) * 15 + 1{/yun} 到 {yun:}$total{/yun} ,总共
                                    {yun:}$total{/yun} 条</span>
                                {yun:}/if{/yun}
                                <div class="digg">{yun:}$pagenav{/yun}</div>
                        </div>
                        {yun:}/if{/yun}
                    </form>
                </div>
 
                <div class="clear"></div>
 
                <div class="subnav" id="addImage" style="display:none">
                    <div class="">
                        <iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
                        <form name="myform" target="supportiframe" action="index.php?m=admin_company_pic&c=uploadsave" method="post"
                         encType="multipart/form-data" onsubmit="return ckform()">
                            <input class="input-text" name="type" type="hidden" value="banner" />
                            <input type="hidden" name="pytoken" id="pytoken" value="{yun:}$pytoken{/yun}">
 
                            <div class="zph_tjlist">
                                <em class="zph_tjlist_s">企业全称:</em>
                                <input class="layui-input t_w250" id="comname" type="text" value="" disabled />
                            </div>
                            
                            
                            
                            <div class="zph_tjlist">
                                <em class="zph_tjlist_s">上传图片:</em>
 
                                <div class="admin_uppicbox" style="width: 100px;height: 100px;">
                                    <input type="hidden" id="laynoupload" value="1">
                                
                                    <div class="admin_uppicimg" id="imgparent" class="none">
                                        <img id="imgicon" width="100" height="100"/>
                                    </div>
                                
                                    <span>
                                        <button type="button" class="noupload adminupbtn"  lay-data="{imgid: 'imgicon',parentid: 'imgparent'}">重新上传</button>        
                                    </span>
                                </div>
                                
                            </div>
                            <div class="zph_tjlist tty_tc_botm">
                                <input class="admin_button" type="hidden" name="id" value="" />
                                <input class="admin_examine_bth" type="submit" name="update" value="修改" style="margin-left:0px;">
                            </div>
                        </form>
                    </div>
                </div>
                <div id="info_div" style="display:none; width: 390px; ">
                    <div class="">
                        <form class="layui-form" action="index.php?m=admin_company_pic&c=bannerStatus" target="supportiframe" method="post"
                         onsubmit="return htStatus()">
                            <table cellspacing='1' cellpadding='1' class="admin_examine_table">
                                <tr>
                                    <th width="80">审核操作:</th>
                                    <td align="left">
                                        <div class="layui-input-block">
                                            <input name="status" id="state0" value="0" title="正常" type="radio" />
                                            <input name="status" id="state2" value="2" title="未通过" type="radio" />
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <th class="t_fr">审核说明:</th>
                                    <td align="left"> <textarea id="statusbody" name="statusbody" class="admin_explain_textarea"></textarea> </td>
                                </tr>
                                <tr>
                                    <td colspan='2' align="center">
                                        <input type="submit" value='确认' class="admin_examine_bth">
                                        <input type="button" id="zxxCancelBtn" onClick="layer.closeAll();" class="admin_examine_bth_qx" value='取消'>
                                    </td>
                                </tr>
                                <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
                                <input name="sid" value="0" type="hidden">
                            </table>
                        </form>
                    </div>
                </div>
                <div id="preview" style="display:none; width:400px; ">
                    <div style="height:300px; overflow:auto; width:auto; ">
                        <div class="job_box_div" style="text-align:center;margin-top:10px;"></div>
                    </div>
                </div>
            </div>
 
        </div>
 
        <script>
            layui.use(['layer'], function() {
                var $ = layui.$,
                    layer = layui.layer;
                layer.photos({
                    photos: '#myform',
                    anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
                });
            });
            var weburl = '{yun:}$config.sy_weburl{/yun}';
            $(function() {
                $(".status").click(function() {
                    $("input[name=pid]").val($(this).attr("pid"));
                    var sid = $(this).attr("pid");
                    var status = $(this).attr("status");
 
                    $("#state" + status).attr("checked", true);
 
                    layui.use(['form'], function() {
                        var form = layui.form;
                        form.render();
                    });
                    $("input[name=sid]").val(sid);
                    $.get("index.php?m=admin_company_pic&c=getBannerStatusBody&id=" + sid, function(msg) {
                        $("#statusbody").val($.trim(msg));
                        $.layer({
                            type: 1,
                            title: '企业横幅审核',
                            closeBtn: [0, true],
                            border: [10, 0.3, '#000', true],
                            area: ['390px', '250px'],
                            page: {
                                dom: "#info_div"
                            }
                        });
                    });
                });
            });
 
            function show_pic(url, id) {
                if ($("#pic_" + id).width() && $("#pic_" + id).width() > 380) {
                    var width = $("#pic_" + id).width();
                    $(".job_box_div").html("<img id='pic_show' src='" + url + "' style='width:380px;height:auto; ' />");
                } else {
                    $(".job_box_div").html("<img id='pic_show' src='" + url + "' style='max-width:380px;height:auto; ' />");
                }
 
                var i = $.layer({
                    type: 1,
                    offset: ['100px', ''],
                    title: '查看图片',
                    closeBtn: [0, true],
                    fix: false,
                    area: ['400px', 'auto'],
                    page: {
                        dom: '#preview'
                    }
                });
            }
 
            function ckform() {
                if ($("input[name=id]").val() != '') {
                    var pic = $("input[name=file]").val();
                    if (!pic) {
                        layer.msg('请上传图片!', 2, 8);
                        return false;
                    }
                }
                loadlayer();
            }
 
            function addImg(id, name, picUrl) {
                $("#comname").val(name);
                $('#imgicon').attr('src', picUrl);
                $("input[name=id]").val(id);
 
                $.layer({
                    type: 1,
                    title: '修改企业横幅',
                    closeBtn: [0, true],
                    border: [10, 0.3, '#000', true],
                    area: ['400px', 'auto'],
                    page: {
                        dom: "#addImage"
                    }
                });
            }
 
            function StatusAll() {
                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 {
                    layui.use(['form'], function() {
                        var form = layui.form;
                        form.render();
                    });
                    $("input[name=sid]").val(codewebarr);
                    $("#statusbody").val('');
                    $("input[name='status']").attr('checked', false);
 
                    $.layer({
                        type: 1,
                        title: '企业横幅审核',
                        closeBtn: [0, true],
                        border: [10, 0.3, '#000', true],
                        area: ['390px', '250px'],
                        page: {
                            dom: "#info_div"
                        }
                    });
                }
            }
        </script>
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
 
    </body>
</html>