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
<!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){
  if (myform.name.value=="") {
    parent.layer.msg('请填写导航名称!', 2,8); 
      myform.name.focus();
      return (false);
  }
   if (myform.url.value=="") { 
    parent.layer.msg('请填写链接地址!', 2,8); 
      myform.url.focus();
      return (false);
  }
  if (myform.sort.value=="") { 
     parent.layer.msg('请填写导航排序!', 2,8); 
      myform.sort.focus();
      return (false);
  }
}
</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>
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
 
        <title>后台管理</title>
    </head>
    <body class="body_ifm">
        <div class="infoboxp">
            <div class="tty-tishi_top">
                <div class="admin_new_search_box">
                    <a href=" javascript:history.back(-1);" class="admin_new_cz_tj" style="margin-left:0px;">导航列表</a>
                </div>
            </div>
 
            <div class="tty_table-bom">
                <iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
                <form name="myform" target="supportiframe" action="index.php?m=navigation&c=save" method="post" encType="multipart/form-data"
                 onSubmit="return checkform(this);" class="layui-form">
                    <table width="100%" class="table_form" style="background:#fff;">
                        <tr>
                            <th colspan="2" class="admin_bold_box">
                                <div class="admin_bold">添加导航</div>
                            </th>
                        </tr>
                        <tr>
                            <th width="120">导航类别:</th>
                            <td>
                                <div class="layui-input-inline t_w480 fl">
                                    <select name="nid" lay-filter="nid">
                                        <option value="">请选择</option>
                                        {yun:}foreach item=v from=$type{/yun}
                                        <option value="{yun:}$v.id{/yun}" {yun:}if $types.nid && $v.id eq $types.nid{/yun} selected {yun:}/if{/yun}>{yun:}$v.typename{/yun}
                                        </option> {yun:}/foreach{/yun} 
                                    </select> 
                                </div> 
                                <a href="index.php?m=navigation&c=group" class="admin_nav_fl">添加分类</a>
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th>导航名称:</th>
                            <td>
                                <input class="tty_input t_w480" type="text" name="name" size="40" value="{yun:}$types.name{/yun}" placeholder="请输入导航名称"/>
                                <input type="hidden" name='color' id="color" value="" />
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th>导航链接:</th>
                            <td>
                                <input class="tty_input t_w480" type="text" name="url" size="50" value="{yun:}$types.url{/yun}"  placeholder="请输入导航链接"/>
                            </td>
                        </tr>
                        <tr>
                            <th>伪静态链接:</th>
                            <td>
                                <input class="tty_input t_w480" type="text" name="furl" size="50" value="{yun:}$types.furl{/yun}"  placeholder="请输入伪静态链接"/>
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th class="t_fr">导航类型:</th>
                            <td>
                                <div class="layui-input-block t_w480">
                                    <select name="type" lay-filter="type">
                                        <option value="1" {yun:}if $types.type==1{/yun} selected {yun:}/if{/yun}>站内链接 </option> 
                                        <option value="2" {yun:}if $types.type==2{/yun} selected {yun:}/if{/yun}>外部链接 </option> 
                                    </select> 
                                </div> 
                                <span class="admin_web_tip">站内链接如:job/ 外部链接如:http://www.phpyun.com/job/</span>
                            </td>
                        </tr>
                        <tr>
                            <th class="t_fl">导航图标:</th>
                            <td>
                                <div class="layui-input-block">
                                    <div class="admin_uppicbox">
                                        <input type="hidden" id="laynoupload" value="1">
                                    
                                        <div class="admin_uppicimg">
                                            <img id="imgicon" src="{yun:}$types.pic_n{/yun}" class="{yun:}if !$types.pic_n{/yun}none{yun:}/if{/yun}"
                                             width="140" height="140" />
                                        </div>
                                    
                                        <span>
                                            <button type="button" class="noupload adminupbtn" lay-data="{imgid: 'imgicon'}">重新上传</button>        
                                        </span>
                                    </div>
 
                                </div>
                                <span class="admin_web_tip">仅限于wap端首页导航展示</span>
                            </td>
                        </tr>
                        <tr>
                            <th>排  序:</th>
                            <td>
                                <input class="tty_input t_w480" type="text" name="sort" size="5" value="{yun:}$types.sort{/yun}" placeholder="排列顺序"/>
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th>弹出窗口:</th>
                            <td>
                                <div class="layui-input-block">
                                    <input name="eject" value="1" title="新窗口" {yun:}if $types.eject=="1" {/yun} checked {yun:}/if{/yun} type="radio" />
                                    <input name="eject" value="0" title="原窗口" {yun:}if $types.eject!="1" {/yun} checked {yun:}/if{/yun} type="radio" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th>状  态:</th>
                            <td>
                                <div class="layui-input-block">
                                    <input name="model" value="hot" title="热" {yun:}if $types.model=="hot" {/yun} checked {yun:}/if{/yun} type="radio" />
                                    <input name="model" value="new" title="新" {yun:}if $types.model=="new" {/yun} checked {yun:}/if{/yun} type="radio" />
                                    <input name="model" value="" title="无" {yun:}if $types.model=="" {/yun} checked {yun:}/if{/yun} type="radio" />
                                </div>
                            </td>
                        </tr>
 
                        <tr>
                            <th>显  示:</th>
                            <td>
                                <div class="layui-input-block">
                                    <input name="display" value="1" title="是" {yun:}if $types.display=="1" {/yun} checked {yun:}/if{/yun} type="radio" />
                                    <input name="display" value="0" title="否" {yun:}if $types.display!="1" {/yun} checked {yun:}/if{/yun} type="radio" />
                                </div>
                            </td>
                        </tr>
                        <tr class="admin_table_trbg">
                            <th></th>
                            <td> {yun:}if $types.id{/yun}
                                <input type="hidden" name="id" size="40" value="{yun:}$types.id{/yun}" />
                                <input type="hidden" name="lasturl" value="{yun:}$lasturl{/yun}">
                                <input class="tty_sub" type="submit" name="update" value="&nbsp;更 新&nbsp;" />
                                {yun:}else{/yun}
                                <input class="tty_sub" type="submit" name="add" value="&nbsp;添 加&nbsp;" />&nbsp;&nbsp;&nbsp;
                                {yun:}/if{/yun}
                                <input class="tty_cz" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" /></td>
                        </tr>
                    </table>
                    <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
                </form>
            </div>
        </div>
        <script type="text/javascript">
            layui.use(['layer', 'form'], function() {
                var layer = layui.layer,
                    form = layui.form,
                    $ = layui.$;
            });
        </script>
    </body>
</html>