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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<!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> var weburl = '{yun:}$config.sy_weburl{/yun}';</script>
        <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">
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
 
        <title>后台管理</title>
        <script>
            $(document).ready(function() {
                $(".preview").hover(function(){  
                    var pic_url=$(this).attr('url');
                    layer.tips("<img src="+pic_url+" style='max-width:420px;height:155px'>", $(this), {
                        
                        tips:2,
                        area: ['auto', 'auto'],
                        
                    });
                    
                },function(){layer.closeAll('tips');});
                $(".wappreview").hover(function(){  
                    var pic_url=$(this).attr('url');
                    layer.tips("<img src="+pic_url+" style='max-width:320px;height:150px'>", $(this), {
                        tips:2,
                        area: ['auto', 'auto'],
                    });
                    
                },function(){layer.closeAll('tips');});
                $(".pcpreview").hover(function(){  
                    var pic_url=$(this).attr('url');
                    layer.tips("<img src="+pic_url+" style='max-width:288px;height:150px'>", this, {
                        tips:2,
                        area: ['auto', 'auto'],
                    });
                    
                },function(){layer.closeAll('tips');});
                $(".wapbpreview").hover(function(){  
                    var pic_url=$(this).attr('url');
                    layer.tips("<img src="+pic_url+" style='max-width:375px;height:150px'>", this, {
                        tips:2,
                        area: ['auto', 'auto'],
                    });
                    
                },function(){layer.closeAll('tips');});
            });
        </script>
    </head>
    <body class="body_ifm">
        <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>
 
                <iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
                <form id="spform" class="layui-form" name="myform" target="supportiframe" action="index.php?m=special&c=save"
                 method="post" encType="multipart/form-data">
                    <table width="100%" class="table_form" style="background:#fff;">
                        <tr class="admin_table_trbg">
                            <th colspan="2" class="admin_bold_box">
                                <div class="admin_bold">添加专题招聘</div>
                            </th>
                        </tr>
                        <tr>
                            <th width="150">专题名称:</th>
                            <td><input class="layui-input t_w480" type="text" id="title" name="title" size="40" value="{yun:}$row.title{/yun}" /></td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th class="t_fr">企业报名上限:</th>
                            <td>
                                <input class="layui-input t_w480" type="text" name="limit" value="{yun:}$row.limit{/yun}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" />
                                <span class="admin_web_tip">例:最多可有多少家企业报名</span>
                            </td>
                        </tr>
                        <tr>
                            <th class="t_fr">企业等级:</th>
                            {yun:}if is_array($qy_rows){/yun}
                            <td>
                                <div class="layui-input-block">
                                    {yun:}foreach item=v from=$qy_rows{/yun}
                                    <div class="layui-input-inline" style="margin-bottom: 10px;">
                                        <input name="rating[]" title="{yun:}$v.name{/yun}" value="{yun:}$v.id{/yun}" {yun:}if
                                     in_array($v.id,$row.rating){/yun} checked="checked" {yun:}/if{/yun} type="checkbox">
                                     </div>
                                    {yun:}/foreach{/yun}
                                </div>
                            </td>
                            {yun:}else{/yun}
                            <td>
                                暂无等级,
                                <a href="index.php?m=userconfig&c=comclass" style="color:red;">添加会员等级</a>
                                <input type="hidden" name="rating" value="0">
                            </td>
                            {yun:}/if{/yun}
                        </tr>
                        <tr class="admin_table_trbg">
                            <th class="t_fr">专题模板:</th>
                            <td>
                                <div class="layui-input-block t_w480">
                                    <select name="tpl" lay-filter="tpl" id="tpl">
                                        <option value=''>请选择</option>
                                        {yun:}foreach from=$file item=ratlist{/yun}
                                        <option value="{yun:}$ratlist{/yun}" {yun:}if $row.tpl==$ratlist{/yun} selected {yun:}/if{/yun}>{yun:}$ratlist{/yun}</option>
                                        {yun:}/foreach{/yun}
                                    </select>
                                </div>
                                <span class="admin_web_tip">选择的模板类型只在PC版生效,其他端有专用模板</span>
                            </td>
                        </tr>
                        <tr>
                            <th>是否启用:</th>
                            <td>
                                <div class="layui-input-block">
                                    <input type="radio" name="display" value="1" title="开启" {yun:}if $row.display=='1' ||$row.display=="" {/yun}checked{yun:}/if{/yun}>
                                    <input type="radio" name="display" value="0" title="关闭" {yun:}if $row.display=='0' {/yun}checked{yun:}/if{/yun}>
                                </div>
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th>允许企业报名:</th>
                            <td>
                                <div class="layui-input-block">
                                    <input type="radio" name="com_bm" value="1" title="开启" {yun:}if $row.com_bm=='1' ||$row.com_bm=="" {/yun}checked{yun:}/if{/yun}>
                                    <input type="radio" name="com_bm" value="0" title="关闭" {yun:}if $row.com_bm=='0' {/yun}checked{yun:}/if{/yun}>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th>扣除{yun:}$config.integral_pricename{/yun}:</th>
                            <td>
                                <input class="layui-input t_w480" type="text" id="php_url" name="integral" value="{yun:}$row.integral{/yun}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" />
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th width="120">报名结束时间:</th>
                            <td>
                                <input id="etime" class="layui-input t_w480" type="text" readonly size="20" value="{yun:}$row.etime|date_format:'%Y-%m-%d'{/yun}" name="etime"/>
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th class="t_fr">排序:</th>
                            <td><input class="layui-input t_w480" type="text" name="sort" value="{yun:}$row.sort{/yun}" /><span class="admin_web_tip">越大越在前!</span></td>
                        </tr>
                        <tr>
                            <th class="t_fr">PC缩略图:</th>
                            <td>
 
 
                                <button type="button" class="yun_bth_pic noupload" lay-data="{imgid: 'imgpic',parentid: 'picdiv'}">上传图片</button>
                                <a href="javascript:void(0)" id="preview" class="preview  admin_n_img {yun:}if !$row.pic{/yun}none{yun:}/if{/yun}" url="{yun:}$row.pic{/yun}" style="vertical-align: middle; margin-right: 15px;" > </a><span class="admin_web_tip">尺寸:宽度530*,高度250px</span>
                                <input type="hidden" id="laynoupload" value="1" />
                                
                            </td>
                        </tr><tr>
                            <th class="t_fr">PC背景图:</th>
                            <td>
 
                                <button type="button" class="yun_bth_pic noupload2" lay-data="{imgid: 'imgbackground',parentid: 'backgrounddiv'}">上传图片</button>
                                <a href="javascript:void(0)" id="pcpreview" class="pcpreview admin_n_img {yun:}if !$row.background{/yun}none{yun:}/if{/yun}" url="{yun:}$row.background{/yun}" style="vertical-align: middle; margin-right: 15px;"></a>
                                <span class="admin_web_tip">尺寸:宽度1920*高度,高度不限最佳展示区域为420px</span>
                                
                            </td>
                        </tr>
                        
                        <tr>
                            <th class="t_fr">移动端缩略图:</th>
                            <td>
                                <button type="button" class="yun_bth_pic noupload4" lay-data="{imgid: 'imgwappic',parentid: 'wappicdiv'}">上传图片</button>
                            <a href="javascript:void(0)" id="wappreview" class="wappreview admin_n_img {yun:}if !$row.wappic{/yun}none{yun:}/if{/yun}" url="{yun:}$row.wappic{/yun}" style="vertical-align: middle; margin-right: 15px;"> </a>    <span class="admin_web_tip">尺寸:宽度700*,高度300px</span>
                                
                            </td>
                        </tr>
                        
                        
                        <tr class="wapback">
                            <th class="t_fr">移动端背景图:</th>
                            <td>
                                <button type="button" class="yun_bth_pic noupload3" lay-data="{imgid: 'imgwapback',parentid: 'wapbackdiv'}">上传图片</button>
                                <a href="javascript:void(0)" id="wapbpreview" class="wapbpreview admin_n_img {yun:}if !$row.wapback{/yun}none{yun:}/if{/yun}" url="{yun:}$row.wapback{/yun}" style="vertical-align: middle; margin-right: 15px;"> </a>
                                <span class="admin_web_tip">尺寸:宽度830px*高度510px</span>
                            </td>
                        </tr>                        
                        <tr class="admin_table_trbg">
                            <th class="t_fr">专题介绍:</th>
                            <td>
                                <script id="myEditor" name="intro" type="text/plain" style="width:480px;height:250px;">{yun:}$row.intro{/yun}</script>
                            </td>
                        </tr>
                        <tr>
                            <th></th>
                            <td align="left" colspan="2">
                                <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
                                {yun:}if is_array($row){/yun}
                                <input type="hidden" name="id" size="40" value="{yun:}$row.id{/yun}" />
                                <input class="tty_sub" type="button" onclick="checkform()" value="&nbsp;更 新&nbsp;" />
                                {yun:}else{/yun}
                                <input class="tty_sub" type="button" onclick="checkform()" value="&nbsp;添 加&nbsp;" />
                                {yun:}/if{/yun}
                                <input class="tty_cz" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" />
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
 
        <script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.config.js?v={yun:}$config.cachecode{/yun}"></script>
        <script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.all.min.js?v={yun:}$config.cachecode{/yun}"></script>
        <script language="javascript">
            layui.use(['layer', 'form', 'laydate'], function() {
                var layer = layui.layer,
                    form = layui.form,
                    laydate = layui.laydate,
                    $ = layui.$;
                laydate.render({
                    elem: '#etime'
                });
            });
 
            function checkform(myform) {
                if ($("#title").val() == "") {
                    parent.layer.msg('请填写专题名称!', 2, 8);
                    return false;
                }
                if ($("#tpl").val() == "") {
                    parent.layer.msg('请选择专题模板!', 2, 8);
                    return false;
                }
                if ($("#pic").val() == "") {
                    parent.layer.msg('请选择缩略图!', 2, 8);
                    return false;
                }
                if ($("#background").val() == "") {
                    parent.layer.msg('请选择背景图!', 2, 8);
                    return false;
                }
                $("#spform").submit();
            }
 
            layui.use('upload', function() {
                var $ = layui.$,
                    upload = layui.upload,
                    layer = layui.layer,
                    device = layui.device();
 
                var laynoupload = $("#laynoupload").val(); //1、选完不上传
                //选完不上传,url暂未用到,只是需要其样式
 
                if (laynoupload == 1) {
                    var layfiletype = $("#layfiletype").val();
                    //上传文件类型
                    if (layfiletype == 2) {
                        var layaccept = 'file',
                            layexts = 'doc|docx|rar|zip|pdf';
                    } else {
                        var layaccept = 'images',
                            layexts = 'jpg|png|gif|bmp|jpeg';
                    }
                    upload.render({
                        elem: '.noupload',
                        auto: false,
                        bindAction: '#test9' //触发上传的对象,暂未用到
                            ,
                        accept: layaccept,
                        field: 'sl',
                        exts: layexts,
                        choose: function(obj) {
                            if (this.imgid) {
                                //预读本地文件示例,不支持ie8/9
                                var imgid = null,
                                    parentid = null;
                                if (this.imgid) {
                                    imgid = this.imgid;
                                }
                                if (this.parentid) {
                                    parentid = this.parentid;
                                }
                                obj.preview(function(index, file, result) {
                                    $("#preview").removeClass('none');
                                    $('#preview').attr('url', result);
                                    if (parentid && $('#' + parentid).length > 0) {
                                        $('#' + parentid).removeClass('none');
                                        $('#' + imgid).attr('src', result);
                                    }
                                });
                            }
                        }
                    });
                    upload.render({
                        elem: '.noupload2',
                        auto: false,
                        bindAction: '#test9', //触发上传的对象,暂未用到
                        accept: layaccept,
                        field: 'bg',
                        exts: layexts,
                        choose: function(obj) {
                            if (this.imgid) {
                                //预读本地文件示例,不支持ie8/9
                                var imgid = null,
                                    parentid = null;
                                if (this.imgid) {
                                    imgid = this.imgid;
                                }
                                if (this.parentid) {
                                    parentid = this.parentid;
                                }
                                obj.preview(function(index, file, result) {
                                    $("#pcpreview").removeClass('none');
                                    $('#pcpreview').attr('url', result);
                                    if (parentid && $('#' + parentid).length > 0) {
                                        $('#' + parentid).removeClass('none');
                                        $('#' + imgid).attr('src', result);
                                    }
 
                                });
                            }
                        }
                    });
                    upload.render({
                        elem: '.noupload3',
                        auto: false,
                        bindAction: '#test9', //触发上传的对象,暂未用到
                        accept: layaccept,
                        field: 'wapbg',
                        exts: layexts,
                        choose: function(obj) {
                            if (this.imgid) {
                                //预读本地文件示例,不支持ie8/9
                                var imgid = null,
                                    parentid = null;
                                if (this.imgid) {
                                    imgid = this.imgid;
                                }
                                if (this.parentid) {
                                    parentid = this.parentid;
                                }
                                obj.preview(function(index, file, result) {
                                    $("#wapbpreview").removeClass('none');
                                    $('#wapbpreview').attr('url', result);
                                    if (parentid && $('#' + parentid).length > 0) {
                                        $('#' + parentid).removeClass('none');
                                        $('#' + imgid).attr('src', result);
                                    }
                                });
                            }
                        }
                    });
                    upload.render({
                        elem: '.noupload4',
                        auto: false,
                        bindAction: '#test9', //触发上传的对象,暂未用到
                        accept: layaccept,
                        field: 'wapsl',
                        exts: layexts,
                        choose: function(obj) {
                            if (this.imgid) {
                                //预读本地文件示例,不支持ie8/9
                                var imgid = null,
                                    parentid = null;
                                if (this.imgid) {
                                    imgid = this.imgid;
                                }
                                if (this.parentid) {
                                    parentid = this.parentid;
                                }
                                obj.preview(function(index, file, result) {                                    
                                    $("#wappreview").removeClass('none');
                                    $('#wappreview').attr('url', result);
                                    if (parentid && $('#' + parentid).length > 0) {
                                        $('#' + parentid).removeClass('none');
                                        $('#' + imgid).attr('src', result);
                                    }
                                });
                            }
                        }
                    });
                }
 
            });
            var ue = UE.getEditor('myEditor', {
                toolbars: [
                    ['justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', 'subscript',
                        'superscript', '|', 'Bold', 'italic', 'underline', 'strikethrough', 'removeformat'
                    ]
                ],
                wordCount: false,
                elementPathEnabled: false,
                initialFrameHeight: 150
            });
        </script>
    </body>
</html>