add.html
7.99 KB
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
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
<link rel="stylesheet" href="__ROOTPUB__kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__ROOTPUB__kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__ROOTPUB__kindeditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
var editor1 = K.editor({
uploadJson : "<{:U('Kind/upload_json')}>",
fileManagerJson : "<{:U('Kind/file_manager_json')}>",
allowFileManager : true
});
K('#uploadid').click(function() {
editor1.loadPlugin('image', function() {
editor1.plugin.imageDialog({
imageUrl : K('#picid').val(),
clickFn : function(url, title, width, height, border, align) {
K('#picid').val(url);
//K('#picida').src(url);
document.getElementById('picida').src=url;
editor1.hideDialog();
}
});
});
});
});
</script>
<style>
#upid {
font-family: "宋体";
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="form" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody><tr>
<td colspan="2" style="padding-left:10px;">
<div style="float:left">
<b>新增分类</b>
</div>
<div style="float:right">
[<a href="<{:U('Category/index')}>"><u>返回列表</u></a>]
</div>
</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">栏目名称:</font></td>
<td><input name="catname" type="text" id="catname" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">英文名称:</font></td>
<td><input name="catename" type="text" id="catename" size="30" class="iptxt"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">所属栏目:</font></td>
<td>
<select name="upid" id="upid" style="width:200px">
<option value="0">顶级栏目</option>
<volist name="cat_list" id="vo">
<option value="<{$vo.id}>" <if condition="$vo.id eq $_GET['id']">selected</if> >
<{$vo.tname}>
</option>
</volist>
</select>
</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">栏目类型:</font></td>
<td>
<select name="type" id="type" style="width:200px">
<option value="1">内容列表</option>
<option value="2">内容单页</option>
<option value="3">栏目主页</option>
<option value="4">列表主页</option>
<option value="5">单页主页</option>
<option value="0">外部链接</option>
</select>
</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">模块名称:</font></td>
<td><input name="module_name" type="text" id="module_name"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"><font color="red">方法名称:</font></td>
<td><input name="action_name" type="text" id="action_name"></td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"> 是否导航显示: </td>
<td><input name="isshow" type="radio" value="1" />显示 <input name="isshow" type="radio" value="0" checked />不显示</td>
</tr>
<tr>
<td height="26" align="right" class="text_right_wid_140 pad_right_10"> 排列顺序: </td>
<td><input name="sort" size="6" type="text" value="<{$maxsort}>" class="pubinputs" class="width_60"></td>
</tr>
<tr attr="hidden">
<td height="26" align="right" class="text_right_wid_140 pad_right_10">链接地址:</td>
<td><input name="linkurl" type="text" id="linkurl" class="width_220" value=""><span class="note">(例如:http://www.baidu.com)</span></td>
</tr>
<tr attr="show">
<td height="26" align="right" class="text_right_wid_140 pad_right_10">Banner:</td>
<td><input name="banner" type="text" id="picid" value="<{$data.banner}>"><input type="button" value="上传图片" style="cursor:pointer;" id="uploadid"> <!-- <span style="color:#ccc;">(尺寸:2200*560)</span> --></td>
</tr>
<tr attr="show">
<td height="26" align="right" class="text_right_wid_140 pad_right_10"></td>
<td><img src="<{$data.banner|Thumb}>" id="picida" style=" max-height:150px; max-width:550px;"></td>
</tr>
<tr attr="show">
<td height="26" align="right" class="text_right_wid_140 pad_right_10">SEO标题:</td>
<td><input name="title" type="text" id="seotitle" size="30" style="width:400px;" class="iptxt"></td>
</tr>
<tr attr="show">
<td height="80" align="right" class="text_right_wid_140 pad_right_10">关键词: </td>
<td><textarea name="keywords" style="height:60px; width:500px;" cols="60"></textarea></td>
</tr>
<tr attr="show">
<td height="80" align="right" class="text_right_wid_140 pad_right_10">描述: </td>
<td><textarea name="description" style="height:60px; width:500px;" cols="60"></textarea></td>
</tr>
<tr attr="show" id="attachment">
<td height="80" align="right" class="text_right_wid_140 pad_right_10">附件选择: </td>
<td><input type="checkbox" name="picnum[]" value="1" onclick="set_img_size('1');">单图 <input type="checkbox" name="picnum[]" value="2" onclick="set_img_size('2');">多图 <input type="checkbox" name="picnum[]" value="3">附件</td>
</tr>
<tr><td colspan="2" style="text-align:center">
<input name="domain" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value=" ">
<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a></td></tr>
</tbody></table>
</form>
</div>
</body>
<script>
$(function(){
$('tr[attr="hidden"]').css('display','none');
type_change();
$('#upid').change(function(){
var cid=$(this).children('option:selected').val();
var validate={
id : cid,
};
$.get("<{:U('getMaxSort')}>",validate,function(data){
$(':input[name="sort"]').val(data);
});
});
set_img_size(1);
set_img_size(2);//图片尺寸
$('#type').change(function(){
type_change();
});
});
//内容模型
function type_change()
{
var type=$('#type').children('option:selected').val();
if(type == 0)
{
$('tr[attr="show"]').css('display','none')
$('tr[attr="hidden"]').css('display','table-row');
}
else
{
$('tr[attr="show"]').css('display','table-row')
$('tr[attr="hidden"]').css('display','none');
}
}
//图片尺寸
function set_img_size(num)
{
if(num == 1)
{
if($(':input[name="picnum[]"]:eq('+(num-1)+')').is(':checked'))
$('#attachment').after('<tr id="picnum1"><td height="26" align="right" class="text_right_wid_140 pad_right_10">单图尺寸:</td><td><input name="img_size" type="text" size="30" style="width:400px;" class="iptxt" value="<{$data.img_size}>"></td></tr>');
else
$('#picnum1').remove();
}
if(num == 2)
{
if($(':input[name="picnum[]"]:eq('+(num-1)+')').is(':checked'))
$('#attachment').after('<tr id="picnum2"><td height="26" align="right" class="text_right_wid_140 pad_right_10">多图尺寸:</td><td><input name="imgs_size" type="text" size="30" style="width:400px;" class="iptxt" value="<{$data.imgs_size}>"></td></tr>');
else
$('#picnum2').remove();
}
}
</script>
</html>