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
<!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="{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>
    <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>
    <style>
        .layui-form-item {
            margin-bottom: 0px;
            clear: both;
        }
    </style>
</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">添加公招主要满足运营者发布公招需求。<span style="color: red">公招内容中如提供文档、表格等附件供下载,请从编辑器上传附件,不要从其他地方直接复制。</span></div>
            </div>
        </div>
        <div class="clear"></div>
 
        <iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');"
                style="display:none"></iframe>
        <form name="myform" target="supportiframe" action="index.php?m=admin_gongzhao&c=save" method="post"
              encType="multipart/form-data"
              onSubmit="return checkform(this);">
            <table width="100%" class="table_form" style="background:#fff;">
                <tr class="admin_table_trbg">
                    <th colspan="4" class="admin_bold_box">
                        <div class="admin_bold">添加公招</div>
                    </th>
                </tr>
                <tr>
                    <th width="200">公招标题:</th>
                    <td>
                        <div class="layui-input-block t_w480">
                            <input type="text" name="title" id="title" lay-verify="required" placeholder="请输入公招标题"
                                   value="{yun:}$info.title{/yun}"
                                   size="40" autocomplete="off" class="layui-input">
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>使用范围:</th>
                    <td><input type="button"
                               value="{yun:}if $info.did>0{/yun}{yun:}$Dname[$info.did]{/yun}{yun:}elseif $info.did==-1{/yun}全站{yun:}else{/yun}主站{yun:}/if{/yun}"
                               class="city_news_but t_w480"
                               onClick="add_site('{yun:}$info.did{/yun}','{yun:}$Dname[$info.did]{/yun}');"
                               style="text-align: left;">
                        <input type="hidden" id="did" value="{yun:}$info.did{/yun}" name="did">
                    </td>
                </tr>
                <tr class="admin_table_trbg">
                    <th class="t_fr">关 键 词:</th>
                    <td>
                        <div class="layui-input-block t_w480">
                            <input type="text" name="keyword" id="keyword" lay-verify="required" placeholder="请输入关键词"
                                   value="{yun:}$info.keyword{/yun}"
                                   size="50" autocomplete="off" class="layui-input">
                        </div>
                        <span class="admin_web_tip">多关键字,请用,隔开,请不要为空</span>
                    </td>
                </tr>
 
                <tr>
                    <th class="t_fr">开始时间:</th>
                    <td>
                        <div class="layui-input-block t_w480">
                            <input type="text" name="startime" id="startime" lay-verify="required" placeholder="请输入开始时间"
                                   value="{yun:}if $info.startime{/yun}{yun:}$info.startime|date_format:'%Y-%m-%d'{/yun}{yun:}/if{/yun}"
                                   size="50" autocomplete="off" class="layui-input">
                        </div>
                        <span class="admin_web_tip">默认当前时间</span>
                    </td>
                </tr>
 
                <tr>
                    <th class="t_fr">结束时间:</th>
                    <td>
                        <div class="layui-input-block t_w480">
                            <input type="text" name="endtime" id="endtime" lay-verify="required" placeholder="请输入结束时间"
                                   value="{yun:}if $info.endtime{/yun}{yun:}$info.endtime|date_format:'%Y-%m-%d'{/yun}{yun:}/if{/yun}"
                                   size="50" autocomplete="off" class="layui-input">
                        </div>
                        <span class="admin_web_tip">默认时间为永久</span>
                    </td>
                </tr>
                <tr>
                    <th class="t_fr">描  述:</th>
                    <td>
                        <div class="layui-input-block t_w480">
                                    <textarea name="description" placeholder="请输入描述" lay-verify="required"
                                              class="layui-textarea"
                                              autocomplete="off">{yun:}$info.description{/yun}</textarea>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th width="120" class="t_fr">缩略图:</th>
                    <td>
 
                        <button type="button" class="yun_bth_pic noupload" lay-data="{imgid: 'imgicon'}">上传图片</button>
                        <img id="imgicon" src="{yun:}$info.pic_n{/yun}" width="195px" height="120px" {yun:}if !$info.pic{/yun}class="none"{yun:}/if{/yun}>
 
                        <span class="admin_web_tip" style="margin-left: 10px;">仅用作外宣海报。尺寸:960px*538px</span>
                        <input type="hidden" id="laynoupload" value="1" />
                    </td>
                </tr>
                <tr class="admin_table_trbg">
                    <th class="t_fr">公招内容:</th>
                    <td>
                        <script id="myEditor" name="content" type="text/plain" style="width:700px;height:300px;">
                            {yun:}$info.content{/yun}
                        </script>
                    </td>
                </tr>
 
                <tr>
                    <th>&nbsp;</th>
                    <td align="left">
                        <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
                        {yun:}if $info.id{/yun}
                        <input type="hidden" name="id" size="40" value="{yun:}$info.id{/yun}"/>
                        <input type="hidden" name="lasturl" value="{yun:}$lasturl{/yun}">
                        <input class="layui-btn tty_sub" type="submit" name="update" value="&nbsp;更 新&nbsp;"/>
                        {yun:}else{/yun}
                        <input class="layui-btn tty_sub" type="submit" name="add" value="&nbsp;添 加&nbsp;"/>
                        {yun:}/if{/yun}
                        <input class="layui-btn tty_cz" type="reset" name="reset" value="&nbsp;重 置 &nbsp;"/>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
{yun:}include file="$adminstyle/checkdomain.htm"{/yun}
<script language="javascript">
    layui.use(['layer', 'form', 'laydate'], function () {
        var layer = layui.layer,
            form = layui.form,
            laydate = layui.laydate,
            $ = layui.$;
 
        //定义当前时间
        var nowTime = new Date();
 
        //获取最小值
        let stime = $("input[name='startime']").val();
        let etime = $("input[name='endtime']").val();
 
        //开始时间
        laydate.render({
            elem: '#startime',
            value: stime != '' ? stime : nowTime,
            min: 0
        });
        //结束时间
        laydate.render({
            elem: '#endtime',
            value: etime != '' ? etime : '',
            min: 1
        });
    });
 
    function checkform(myform) {
        if (myform.title.value == "") {
            parent.layer.msg('请填写公招标题!', 2, 8);
            myform.title.focus();
            return (false);
        }
 
        if (myform.keyword.value == "") {
            parent.layer.msg('请填写公招关键字!', 2, 8);
            myform.keyword.focus();
            return (false);
        }
 
        var stime = $('#startime').val();
        var etime = $('#endtime').val();
 
        if (stime != '' && etime != '' && stime > etime) {
            parent.layer.msg('结束时间必须大于开始时间!', 2, 8);
            return false;
        }
        if (myform.description.value == "") {
            parent.layer.msg('请填写公招描述!', 2, 8);
            myform.description.focus();
            return (false);
        }
        loadlayer();
    }
 
    var ue = UE.getEditor('myEditor');
</script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
</body>
</html>