catalog_add_quick.htm
13.6 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
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>栏目管理--快速创建栏目</title>
<script type="text/javascript" src="../include/js/jquery/jquery.js"></script>
<script type="text/javascript">
var $ = jQuery;
$(document).ready(function(){
//删除按钮事件
$("#addQuick .del").click(function() {
$(this).parents(".repeat").remove();
});
//添加按钮事件
$("#add").click(function(){
var id = $("#addQuick tr").prevAll("tr").length + 1;
$("#addQuick tr:eq(1)").clone(true).addClass("repeat")
.find(".rank input")
.attr("value",function(){return id})
.end()
.find(".pubinputs")
.attr("name",function(){return this.name+id})
.attr("id",function(){return this.id+id})
.end()
.appendTo($("#addQuick"));
});
//删除按钮事件
$("#addQuickRel .del").click(function() {
$(this).parents(".repeat").remove();
});
//添加按钮事件
$("#addrel").click(function(){
var id = $("#addQuickRel tr").prevAll("tr").length + 1;
$("#addQuickRel tr:eq(1)").clone(true).addClass("repeat")
.find(".rank input")
.attr("value",function(){return id})
.end()
.find(".pubinputs")
.attr("name",function(){return this.name+id})
.attr("id",function(){return this.id+id})
.end()
.appendTo($("#addQuickRel"));
});
});
</script>
<script language="javascript">
function ShowHide(objname){
var obj = document.getElementById(objname);
if(obj.style.display == "block" || obj.style.display == "")
obj.style.display = "none";
else
obj.style.display = "block";
}
function ShowObj(objname){
var obj = document.getElementById(objname);
obj.style.display = "block";
}
function HideObj(objname){
var obj = document.getElementById(objname);
obj.style.display = "none";
}
function showSeltype(objname)
{
if(objname.value != 0)
{
$("#addQuickRel").show();
$("#pathtype").show();
$("#addQuick").hide();
$("#savetype").val('rel');
} else {
$("#addQuickRel").hide();
$("#addQuick").show();
$("#pathtype").hide();
$("#savetype").val('');
}
}
</script>
<link href='css/base.css' rel='stylesheet' type='text/css'>
</head>
<body leftmargin='15' topmargin='10'>
<form name="form1" action="catalog_add.php" method="post">
<input type="hidden" name="dopost" value="savequick" />
<input type="hidden" name="savetype" value="" id="savetype"/>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" style="BORDER-COLLAPSE: collapse">
<tr>
<td width="100%" height="20" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30"><img height='14' src='images/book1.gif' width='20' /> <a href="catalog_main.php"><u>栏目管理</u></a> >> 批量增加栏目 </td>
</tr>
</table></td>
</tr>
<tr>
<td width="100%" height="1" background="images/sp_bg.gif"></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="10"></td>
</tr>
<tr>
<td height="95" align="left" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" id="head1" cellpadding="0" >
<tr>
<td colspan="2" bgcolor="#FFFFFF"><table width="84" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="84" height="24" align="center" background="images/itemnote1.gif"> 常规选项 </td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" id="needset" cellspacing="0" cellpadding="0" style="border:1px solid #cfcfcf;background:#ffffff;text-align:left;">
<tr>
<td height="24" bgcolor="#F9FCEF" style="padding-left:10px;"><strong>公用参数:</strong></td>
<td bgcolor="#F9FCEF"></td>
</tr>
<tr>
<td width="150" class='bline' height="26" style="padding-left:10px;">是否支持投稿:</td>
<td class='bline'><input type='radio' name='issend' value='0' class='np' />
不支持
<input type='radio' name='issend' value='1' class='np' checked='1' />
支持 </td>
</tr>
<tr>
<td class='bline' height="26" style="padding-left:10px;">目录保存位置:</td>
<td class='bline'><input name="referpath" type="radio" id="truepath1" class="np" value="parent" checked='1' />
默认HMTL目录(
<?php
$pardir = '{cmspath}'.$cfg_arcdir;
if(!empty($typedir)) $pardir = $typedir.'/';
$pardir = preg_replace("#\/{1,}#", '/', $pardir);
echo $pardir;
?>
)
<input name="referpath" type="radio" id="truepath2" class="np" value="cmspath" />
CMS根目录
<input name="nextdir" type="hidden" id="nextdir" value="<?php echo $pardir; ?>" />
<span id="pathtype" style="display:none"><input name="referpath" type="radio" id="truepath3" class="np" value="typepath" />
隶属栏目所属的目录</span></td>
</tr>
<tr>
<td class='bline' height="26" style="padding-left:10px;">隶属栏目:</td>
<td class='bline'>
<select name='reid' onchange="showSeltype(this)">
<option value='0'>选择所属目录... </option>
<?php echo $typeOptions;?>
</select>
(默认为顶级栏目)
</td>
</tr>
<tr>
<td class='bline' height="26" style="padding-left:10px;">内容模型: </td>
<td class='bline'><select name="channeltype" id="channeltype" style="width:200px" onChange="ParTemplet(this)">
<?php
foreach($channelArray as $k=>$arr)
{
if($k==$channelid) echo " <option value='{$k}' selected>{$arr['typename']}|{$arr['nid']}</option>\r\n";
else echo " <option value='{$k}'>{$arr['typename']}|{$arr['nid']}</option>\r\n";
}
?>
</select>
</td>
</tr>
<tr>
<td class='bline' height="26" style="padding-left:10px;">栏目列表选项:</td>
<td class='bline'><input type='radio' name='isdefault' value='1' class='np' checked='1' />
链接到默认页
<input type='radio' name='isdefault' value='0' class='np' />
链接到列表第一页
<input type='radio' name='isdefault' value='-1' class='np' />
使用动态页 </td>
</tr>
<tr>
<td class='bline' height="26" style="padding-left:10px;">默认页的名称: </td>
<td class='bline'><input name="defaultname" type="text" value="index.html" class="pubinputs" /></td>
</tr>
<tr id='helpvar2' style='display:none'>
<td height="24" bgcolor="#F3F7EA" style="padding-left:10px;">支持变量: </td>
<td height="24" bgcolor="#F3F7EA"> {Y}、{M}、{D} 年月日<br/>
{timestamp} INT类型的UNIX时间戳<br/>
{aid} 文章ID<br/>
{pinyin} 拼音+文章ID<br/>
{py} 拼音部首+文章ID<br/>
{typedir} 栏目目录 <br/>
{cc} 日期+ID混编后用转换为适合的字母 <br/>
</td>
</tr>
<tr>
<td height="26" class='bline' style="padding-left:10px;">文章命名规则:</td>
<td class='bline'><input name="namerule" type="text" id="namerule" value="{typedir}/{Y}{M}{D}/{aid}.html" size="40" class="pubinputs" />
<img src="images/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:pointer" onClick="ShowHide('helpvar2')" /> </td>
</tr>
<tr id='helpvar3' style='display:none'>
<td height="24" bgcolor="#F3F7EA" style="padding-left:10px;">支持变量: </td>
<td bgcolor="#F3F7EA">{page} 列表的页码</td>
</tr>
<tr>
<td height="26" style="padding-left:10px;">列表命名规则:</td>
<td><input name="namerule2" type="text" id="namerule2" value="{typedir}/list_{tid}_{page}.html" size="40" class="pubinputs" />
<img src="images/help.gif" alt="帮助" width="16" height="16" border="0" style="cursor:pointer" onClick="ShowHide('helpvar3')" /></td>
</tr>
<tr>
<td height="24" bgcolor="#F9FCEF" style="padding-left:10px;"><strong>栏目填写:</strong></td>
<td bgcolor="#F9FCEF"></td>
</tr>
<tr>
<td colspan='2' style="padding:5px 0px 8px 10px">
<table id="addQuick" width="800" border="0" cellpadding="3" cellspacing="1" bgcolor="#cfcfcf">
<tbody>
<tr bgcolor="#FBFCE2" align="center">
<td width="60" height="28">排序</td>
<td width="170">顶级栏目名称</td>
<td width="520">子栏目(用"目录名称1,目录名称2..."这样表示多个栏目)</td>
<td width="50" align="center"><input name="" type="button" value="添加" id="add" class="coolbt"></td>
</tr>
<tr bgcolor="#FFFFFF" height="32" align="center">
<td class="rank" style="padding:5px;"><input type="hidden" name="posttype" value="" class="pubinputs" />
<input type="text" name="rank" id="rank" value="1" class="pubinputs" style="width:50px;" /></td>
<td align='center'><input type="text" name="toptype" id="toptype" class="pubinputs" style="width:160px;" /></td>
<td><input type="text" name="sontype" id="sontype" class="pubinputs" style="width:480px;" /></td>
<td align="center"><input name="" type="button" value="删除" id="add" class="del coolbt"></td>
</tr>
<?php for($i=2;$i<=10;$i++) { ?>
<tr bgcolor="#FFFFFF" height="32" class="repeat" align="center">
<td class="rank"><input type="hidden" name="posttype<?php echo $i; ?>" value="<?php echo $i; ?>" />
<input type="text" name="rank<?php echo $i; ?>" id="rank<?php echo $i; ?>" value="<?php echo $i; ?>" class="pubinputs" style="width:50px;" /></td>
<td align='center'><input type="text" name="toptype<?php echo $i; ?>" id="toptype<?php echo $i; ?>" class="pubinputs" style="width:160px;" /></td>
<td><input type="text" name="sontype<?php echo $i; ?>" id="sontype<?php echo $i; ?>" class="pubinputs" style="width:480px;" /></td>
<td align="center"><input name="" type="button" value="删除" id="add" class="del coolbt"></td>
</tr>
<?php } ?>
</tbody>
</table>
<table id="addQuickRel" width="302" border="0" cellpadding="3" cellspacing="1" bgcolor="#cfcfcf" style="display:none">
<tbody>
<tr bgcolor="#FBFCE2" align="center">
<td width="60" height="28">排序</td>
<td width="170">栏目名称</td>
<td width="50" align="center"><input name="" type="button" value="添加" id="addrel" class="coolbt"></td>
</tr>
<tr bgcolor="#FFFFFF" height="32" align="center">
<td class="rank" style="padding:5px;"><input type="hidden" name="posttype" value="" class="pubinputs" />
<input type="text" name="rank" id="rank" value="1" class="pubinputs" style="width:50px;" /></td>
<td align='center'><input type="text" name="reltype" id="reltype" class="pubinputs" style="width:160px;" /></td>
<td align="center"><input name="" type="button" value="删除" id="add" class="del coolbt"></td>
</tr>
<?php for($i=2;$i<=10;$i++) { ?>
<tr bgcolor="#FFFFFF" height="32" class="repeat" align="center">
<td class="rank"><input type="hidden" name="posttype<?php echo $i; ?>" value="<?php echo $i; ?>" />
<input type="text" name="rank<?php echo $i; ?>" id="rank<?php echo $i; ?>" value="<?php echo $i; ?>" class="pubinputs" style="width:50px;" /></td>
<td align='center'><input type="text" name="reltype<?php echo $i; ?>" id="reltype<?php echo $i; ?>" class="pubinputs" style="width:160px;" /></td>
<td align="center"><input name="" type="button" value="删除" id="add" class="del coolbt"></td>
</tr>
<?php } ?>
</tbody>
</table>
</td>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F9FCEF" style="border:1px solid #cfcfcf;border-top:none;">
<tr>
<td width="1%" height="36"></td>
<td width="99%" valign="bottom"><input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" border="0" class="np" />
<a href="catalog_main.php"><img src="images/button_back.gif" width="60" height="22" border="0" /></a> </td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>