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
<!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 language="javascript">
            function checkform(myform){
        var is_type=myform.is_type.value;
        if (myform.name.value=="") { 
             parent.layer.msg('请填写单页面名称!', 2, 8);
             myform.name.focus();
             return (false);
        }
        if (myform.url.value=="") { 
            parent.layer.msg('请填写URL链接!', 2, 8);
             myform.url.focus();
            return (false);
        }
        if (myform.title.value=="" && is_type==1) { 
            parent.layer.msg('请填写标题!', 2, 8);
            myform.title.focus();
            return (false);
        }
    }
</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/custom_layer.js?v={yun:}$config.cachecode{/yun}"></script>
 
        <title>后台管理</title>
    </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">添加单页面,自定义页面的URL为HTML静态页面,外部链接为绝对路径,例:http://www.phpyun.com/index.php</div>
                    </div>
                </div>
                <div class="clear"></div>
 
                <iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
                <form target="supportiframe" name="myform" action="index.php?m=description&c=save" method="post" onSubmit="return checkform(this);"
                 class="layui-form">
                    <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
                    <table width="100%" class="table_form">
                        <tr>
                            <th>名称:</th>
                            <td>
                                <input class="tty_input t_w480" type="text" name="name" size="40" value="{yun:}$descrow.name{/yun}" />
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th>类别:</th>
                            <td>
                                <div class="layui-input-inline t_w480">
                                    <select name="nid">
                                        <option value="">请选择</option>
                                        {yun:}foreach item=v from=$class{/yun}
                                        <option value="{yun:}$v.id{/yun}" {yun:}if $v.id==$descrow.nid{/yun} selected {yun:}/if{/yun}>{yun:}$v.name{/yun}
                                        </option> {yun:}/foreach{/yun} 
                                    </select> 
                                </div> 
                            </td> 
                        </tr> 
                        <tr class="admin_table_trbg">
                            <th>类型:</th>
                            <td>
                                <div class="layui-input-block">
                                    <input name="is_type" value="1" title="自定义页面" lay-filter="is_type" {yun:}if $descrow.is_type=="1" {/yun}
                                     checked {yun:}/if{/yun} type="radio">
                                    <input name="is_type" value="0" title="外部链接" lay-filter="is_type" {yun:}if $descrow.is_type=="0" {/yun}
                                     checked {yun:}/if{/yun} type="radio">
                                    <input name="is_type" value="2" title="站内链接" lay-filter="is_type" {yun:}if $descrow.is_type=="2" {/yun}
                                     checked {yun:}/if{/yun} type="radio">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th class="t_fr">URL链接:</th>
                            <td>
                                <input class="layui-input t_w480" type="text" name="url" size="40" value="{yun:}$descrow.url{/yun}" />
                                <span class="admin_web_tip">(可以为多级目录)。例:/about/index.html</span>
                            </td>
                        </tr>
                        <tr class="admin_table_trbg diyweb" {yun:}if $descrow.is_type!="1" {/yun}style="display:none;"{yun:}/if{/yun}>
                         <th>标题:</th>
                            <td><input class="tty_input t_w480" type="text" name="title" size="40" value="{yun:}$descrow.title{/yun}" /></td>
                        </tr>
                        <tr class="diyweb" {yun:}if $descrow.is_type!="1" {/yun}style="display:none;"{yun:}/if{/yun}> 
                            <th class="t_fr">关键词:</th>
                            <td>
                                <input class="layui-input t_w480" type="text" name="keyword" size="50" value="{yun:}$descrow.keyword{/yun}" />
                                <span class="admin_web_tip">(多关键字,请用,隔开,请不要为空)</span>
                            </td>
                        </tr>
                        <tr class="admin_table_trbg diyweb" {yun:}if $descrow.is_type!="1" {/yun}style="display:none;"{yun:}/if{/yun}>
                            <th class="t_fr">描述:</th>
                            <td>
                                <div class="layui-input-block t_w480">
                                    <textarea class="layui-textarea" name="description" cols="55" rows="3">{yun:}$descrow.descs{/yun}</textarea>
                                </div>
                            </td>
                        </tr>
                        <tr class="diyweb" {yun:}if $descrow.is_type!="1" {/yun}style="display:none;"{yun:}/if{/yun}> 
                            <th class="t_fr">头部模板:</th>
                            <td>
                                <div class="layui-input-inline">
                                    <select name="top_tpl" lay-filter="top_tpl">
                                        <option value="1" {yun:}if $descrow.top_tpl=='1' {/yun} selected{yun:}/if{/yun}>默认模板 </option> 
                                        <option value="2" {yun:}if $descrow.top_tpl=='2' {/yun} selected{yun:}/if{/yun}>空白模板 </option> 
                                        <option value="3" {yun:}if $descrow.top_tpl=='3' {/yun} selected{yun:}/if{/yun}>自定义模板 </option> 
                                    </select> 
                                </div> 
                                <span id="top_tpl_dir" {yun:}if $descrow.top_tpl !='3' {/yun} style="display:none;" {yun:}/if{/yun}> 
                                    <input class="tty_input t_w480" type="text" name="top_tpl_dir" size="40" value="{yun:}$descrow.top_tpl_dir{/yun}" />
                                    <span class="admin_web_tip">例:default/header 注:default为当前风格目录 模板后缀为(.htm)</span>
                                </span>
                                <span id="top_styletpl" {yun:}if $descrow.top_tpl && $descrow.top_tpl !='1' {/yun} style="display:none;" {yun:}/if{/yun}> 
                                    <span class="admin_web_tip ml30">头部默认模板为当前模板风格下的header.htm</span>
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <th class="t_fr">底部模板:</th>
                            <td>
                                <div class="layui-input-inline">
                                    <select name="footer_tpl" lay-filter="footer_tpl">
                                        <option value="1" {yun:}if $descrow.footer_tpl=='1' {/yun} selected{yun:}/if{/yun}>默认模板 </option> 
                                        <option value="2" {yun:}if $descrow.footer_tpl=='2' {/yun} selected{yun:}/if{/yun}>空白模板 </option> 
                                        <option value="3" {yun:}if $descrow.footer_tpl=='3' {/yun} selected{yun:}/if{/yun}>自定义模板 </option> 
                                    </select> 
                                </div> 
                                <span id="footer_tpl_dir" {yun:}if $descrow.footer_tpl !='3' {/yun}style="display:none;"{yun:}/if{/yun}> 
                                    <input class="tty_input t_w480" type="text" name="footer_tpl_dir" size="40" value="{yun:}$descrow.footer_tpl_dir{/yun}" />
                                    <span class="admin_web_tip">例:default/footer 注:default为当前风格目录 模板后缀为(.htm)</span>
                                </span>
                                <span id="footer_styletpl" {yun:}if $descrow.footer_tpl && $descrow.footer_tpl !='1' {/yun}style="display:none;"{yun:}/if{/yun}>
                                    <span class="admin_web_tip ml30">底部默认模板为当前模板风格下的footer.htm</span>
                                </span>
                            </td>
                        </tr>
                        
                        <tr class="admin_table_trbg diyweb" {yun:}if $descrow.is_type!="1" {/yun}style="display:none;"{yun:}/if{/yun}>
                         <th class="t_fr">页面内容: </th>
                            <td>
                                <script id="content" name="content" type="text/plain" cols="100" rows="8" style="width:700px; height:300px;">
                                    {yun:}$descrow.content{/yun} 
                                </script>
                            </td>
                        </tr>
                        <tr>
                            <th>排序:</th>
                            <td><input class="tty_input t_w480" type="text" name="sort" size="20" value="{yun:}$descrow.sort{/yun}" /></td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th>单页面左则导航:</th>
                            <td>
                                <div class="layui-input-inline">
                                    <input name="is_nav_switch" lay-skin="switch" lay-text="显示|不显示" lay-filter="is_nav" {yun:}if $descrow.is_nav=='1'
                                     {/yun} checked {yun:}/if{/yun} type="checkbox" />
                                    <input name="is_nav" id="is_nav" type="hidden" value="{yun:}$descrow.is_nav{/yun}" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td width="160">&nbsp;</td>
                            <td align="left">
                                {yun:}if $descrow.id{/yun}
                                <input type="hidden" name="id" size="40" value="{yun:}$descrow.id{/yun}" />
                                <input class="tty_sub" type="submit" name="update_desc" value="&nbsp;更 新&nbsp;" />
                                {yun:}else{/yun}
                                <input class="tty_sub" type="submit" name="add_desc" value="&nbsp;添 加&nbsp;" />
                                {yun:}/if{/yun}
                                <input class="tty_cz" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" />
                                <input type="hidden" name="lasturl" value="{yun:}$lasturl{/yun}" />
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <script type="text/javascript">
            layui.use(['form'], function() {
                var form = layui.form,
                    $ = layui.$;
 
                form.on('radio(is_type)', function(data) {
                    var footervalue = data.value;
                    if (footervalue == 1) {
                        $(".diyweb").show();
                    } else {
                        $(".diyweb").hide();
                    }
                });
 
                form.on('switch(is_nav)', function(data) {
                    var v = this.checked ? 1 : 0;
                    $("#is_nav").val(v);
                });
 
                form.on('select(top_tpl)', function(data) {
                    if (data.value == 1) {
                        $("#top_styletpl").show();
                        $("#top_tpl_dir").hide();
                    } else if (data.value == 2) {
                        $("#top_styletpl").hide();
                        $("input[name=top_tpl_dir]").val('');
                        $("#top_tpl_dir").hide();
                    } else if (data.value == 3) {
                        $("#top_styletpl").hide();
                        $("#top_tpl_dir").show();
                    }
                });
 
                form.on('select(footer_tpl)', function(data) {
                    if (data.value == 1) {
                        $("#footer_styletpl").show();
                        $("#footer_tpl_dir").hide();
                    } else if (data.value == 2) {
                        $("#footer_styletpl").hide();
                        $("input[name=footer_tpl_dir]").val('');
                        $("#footer_tpl_dir").hide();
                    } else if (data.value == 3) {
                        $("#footer_styletpl").hide();
                        $("#footer_tpl_dir").show();
                    }
                });
 
            });
        </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>
        <script language="javascript">
            var editor = UE.getEditor('content', {
                toolbars: [
                    ['Source', '|', 'Undo', 'Redo', 'Bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'fontfamily',
                        'fontsize', 'forecolor', 'backcolor', 'removeformat', 'autotypeset', 'pasteplain', '|', 'insertorderedlist',
                        'insertunorderedlist', 'selectall', 'cleardoc', '|', 'simpleupload', 'attachment', '|', 'link', 'unlink',
                        'indent', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify'
                    ]
                ],
                wordCount: false,
                elementPathEnabled: false,
                initialFrameHeight: 200
            });
        </script>
    </body>
</html>