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
<!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 rel="stylesheet" href="{yun:}$wap_style{/yun}/hb/reset.css?v={yun:}$config.cachecode{/yun}" type="text/css"/>
    <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/custom_layer.js?v={yun:}$config.cachecode{/yun}"></script>
    <title>后台管理</title>
</head>
 
<body class="body_ifm">
<form class="layui-form">
    <div class="infoboxp">
        <div class="tty-tishi_top">
            <div class="tabs_info">
                <ul>
                    <li class="curr"><a href="index.php?m=admin_hb_config">海报设置</a></li>
                    <li><a href="index.php?m=admin_hb_config&c=job">职位海报</a></li>
                    <li><a href="index.php?m=admin_hb_config&c=com">企业海报</a></li>
                    <li><a href="index.php?m=admin_hb_config&c=inviteReg">邀请注册</a></li>
                    <li><a href="index.php?m=admin_hb_config&c=gongzhao">公招海报</a></li>
                </ul>
            </div>
 
            <div class="clear"></div>
 
            <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 class="admin_new_tip_list" style="color: #ff0000"> 海报开关仅可控制 <b>职位海报</b> 和 <b>企业海报</b> </div>
                </div>
            </div>
 
            <div class="clear"></div>
 
            <table width="100%" class="table_form">
                <tbody>
                <tr>
                    <th width="100" class="t_fl">招聘海报:</th>
                    <td>
                        <div class="layui-input-block">
                            <div class="layui-input-inline">
                                <input type="checkbox" name="sy_haibao_isopen" lay-skin="switch" lay-text="开启|关闭" {yun:}if $config.sy_haibao_isopen=="1" {/yun} checked {yun:}/if{/yun} />
                            </div>
                        </div>
                    </td>
                </tr>
 
                <tr>
                    <th width="100" class="t_fl">海报网站标识:</th>
                    <td>
                        <div class="layui-input-block">
                            <div class="layui-input-inline">
                                <input type="radio" name="sy_haibao_web_type" id="sy_haibao_web_type1" title="文字" value="1" lay-filter="sy_haibao_web_type" {yun:}if $config.sy_haibao_web_type=="1" {/yun} checked {yun:}/if{/yun}/>
                                <input type="radio" name="sy_haibao_web_type" id="sy_haibao_web_type2" title="LOGO" value="2" lay-filter="sy_haibao_web_type" {yun:}if $config.sy_haibao_web_type=="2" {/yun} checked {yun:}/if{/yun}/>
                                <input type="radio" name="sy_haibao_web_type" id="sy_haibao_web_type3" title="留空" value="3" lay-filter="sy_haibao_web_type" {yun:}if empty($config.sy_haibao_web_type) || $config.sy_haibao_web_type=="3" {/yun} checked {yun:}/if{/yun}/>
                            </div>
                            <input class="layui-input t_w250" style="{yun:}if empty($config.sy_haibao_web_type) || $config.sy_haibao_web_type !='1' {/yun} display: none; {yun:}/if{/yun}margin-top: 10px;" id="sy_haibao_web_name" name="sy_haibao_web_name" type="text" value="{yun:}$config.sy_haibao_web_name{/yun}" placeholder="请填写网站名称" />
                            <div id="sy_haibao_web_logo" style="{yun:}if empty($config.sy_haibao_web_type) || $config.sy_haibao_web_type !='2' {/yun} display: none; {yun:}/if{/yun}margin-top: 10px;" class="t_w480">
                                <button type="button" class="yun_bth_pic adminupload" lay-data="{name: 'sy_haibao_web_logo',imgid: 'sy_haibao_web_logo_img',path: 'logo'}">上传图片</button>
                                <input type="hidden" id="layupload_type" value="2" />
                                {yun:}if $config.sy_haibao_web_logo{/yun}
                                <img id="sy_haibao_web_logo_img" src="{yun:}$config.sy_ossurl{/yun}/{yun:}$config.sy_haibao_web_logo{/yun}" style="max-width:300px;background-color: #ccd6db;">
                                {yun:}else{/yun}
                                <img id="sy_haibao_web_logo_img" src="" style="max-width:300px;background-color: #ccd6db;">
                                {yun:}/if{/yun}
                                <div class="layui-form-mid layui-word-aux" style="font-size: 12px;">请上传透明LOGO图,建议图片最大尺寸960px X 130px</div>
                                <style>
                                    img[src=""],img:not([src]){
                                        opacity:0;
                                    }
                                </style>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th style="border-bottom:none;" width="150">&nbsp;</th>
                    <td align="left" style="border-bottom:none;">
                        <input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
                        <input class="layui-btn tty_sub" id="mconfig" type="button" name="config" value="提交"/>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</form>
 
<script>
    var form = null;
    layui.use(['form'], function () {
        var $ = layui.$;
        form = layui.form;
 
        form.on('radio(sy_haibao_web_type)', function (data) {
            if (data.value == 1){
                $('#sy_haibao_web_name').css('display', 'block');
                $('#sy_haibao_web_logo').css('display', 'none');
            } else if(data.value == 2){
                $('#sy_haibao_web_name').css('display', 'none');
                $('#sy_haibao_web_logo').css('display', 'block');
            }else{
                $('#sy_haibao_web_name').css('display', 'none');
                $('#sy_haibao_web_logo').css('display', 'none');
            }
        });
    });
 
    $(function () {
        $("#mconfig").click(function () {
            var sy_haibao_web_type = $('input[name="sy_haibao_web_type"]:checked').val();
            var sy_haibao_web_name = $("#sy_haibao_web_name").val();
            if(sy_haibao_web_type == 1){
                if(sy_haibao_web_name === ''){
                    layer.msg('请填写网站名称!', 2, 8);
                    return false;
                }else if(sy_haibao_web_name.length > 12){
                    layer.msg('网站名称不能大于12个字符!', 2, 8);
                    return false;
                }
            }
 
            loadlayer();
            $.post("index.php?m=admin_hb_config&c=saveWhbConfig", {
                config: $("#mconfig").val(),
                sy_haibao_isopen: $("input[name=sy_haibao_isopen]").is(":checked") ? 1 : 0,
                sy_haibao_web_type: $('input[name="sy_haibao_web_type"]:checked').val(),
                sy_haibao_web_name: sy_haibao_web_name,
                pytoken: $("#pytoken").val()
            }, function (data, textStatus) {
                parent.layer.closeAll('loading');
                config_msg(data);
            });
        });
    });
</script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
</body>
</html>