国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

314 lines
15KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  5. <title>栏目管理--快速创建栏目</title>
  6. <script type="text/javascript" src="../static/js/jquery.js"></script>
  7. <script type="text/javascript">
  8. var $ = jQuery;
  9. $(document).ready(function () {
  10. //删除按钮事件
  11. $("#addQuick .del").click(function () {
  12. $(this).parents(".repeat").remove();
  13. });
  14. //添加按钮事件
  15. $("#add").click(function () {
  16. var id = $("#addQuick tr").prevAll("tr").length + 1;
  17. $("#addQuick tr:eq(1)").clone(true).addClass("repeat")
  18. .find(".rank input")
  19. .attr("value", function () { return id })
  20. .end()
  21. .find(".pubinputs")
  22. .attr("name", function () { return this.name + id })
  23. .attr("id", function () { return this.id + id })
  24. .end()
  25. .appendTo($("#addQuick"));
  26. });
  27. //删除按钮事件
  28. $("#addQuickRel .del").click(function () {
  29. $(this).parents(".repeat").remove();
  30. });
  31. //添加按钮事件
  32. $("#addrel").click(function () {
  33. var id = $("#addQuickRel tr").prevAll("tr").length + 1;
  34. $("#addQuickRel tr:eq(1)").clone(true).addClass("repeat")
  35. .find(".rank input")
  36. .attr("value", function () { return id })
  37. .end()
  38. .find(".pubinputs")
  39. .attr("name", function () { return this.name + id })
  40. .attr("id", function () { return this.id + id })
  41. .end()
  42. .appendTo($("#addQuickRel"));
  43. });
  44. });
  45. </script>
  46. <script language="javascript">
  47. function ShowHide(objname) {
  48. var obj = document.getElementById(objname);
  49. if (obj.style.display == "block" || obj.style.display == "")
  50. obj.style.display = "none";
  51. else
  52. obj.style.display = "block";
  53. }
  54. function ShowObj(objname) {
  55. var obj = document.getElementById(objname);
  56. obj.style.display = "block";
  57. }
  58. function HideObj(objname) {
  59. var obj = document.getElementById(objname);
  60. obj.style.display = "none";
  61. }
  62. function showSeltype(objname) {
  63. if (objname.value != 0) {
  64. $("#addQuickRel").show();
  65. $("#pathtype").show();
  66. $("#addQuick").hide();
  67. $("#savetype").val('rel');
  68. } else {
  69. $("#addQuickRel").hide();
  70. $("#addQuick").show();
  71. $("#pathtype").hide();
  72. $("#savetype").val('');
  73. }
  74. }
  75. </script>
  76. <link rel="stylesheet" href="../static/css/bootstrap.min.css">
  77. <link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  78. <link href='css/base.css' rel='stylesheet' type='text/css'>
  79. <style>
  80. .table {
  81. margin: 0;
  82. }
  83. </style>
  84. </head>
  85. <body leftmargin='15' topmargin='10'>
  86. <form name="form1" action="catalog_add.php" method="post">
  87. <input type="hidden" name="dopost" value="savequick" />
  88. <input type="hidden" name="savetype" value="" id="savetype" />
  89. <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111"
  90. style="BORDER-COLLAPSE: collapse" class="mt-3">
  91. <tr>
  92. <td width="100%" height="26" valign="top">
  93. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  94. <tr>
  95. <td height="30"><img height='14' src='images/book1.gif' width='20' />&nbsp;<a
  96. href="catalog_main.php">栏目管理</a> &gt;&gt; 批量增加栏目 </td>
  97. </tr>
  98. </table>
  99. </td>
  100. </tr>
  101. <tr>
  102. <td width="100%" height="1" background="images/sp_bg.gif"></td>
  103. </tr>
  104. </table>
  105. <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  106. <tr>
  107. <td height="10"></td>
  108. </tr>
  109. <tr>
  110. <td height="95" align="left" bgcolor="#FFFFFF">
  111. <table width="100%" border="0" cellspacing="0" id="head1" cellpadding="0">
  112. <tr>
  113. <td colspan="2" bgcolor="#FFFFFF">
  114. <table width="86" border="0" cellpadding="0" cellspacing="0">
  115. <tr>
  116. <td width="86" height="26" align="center" background="images/itemnote1.gif">&nbsp;常规选项&nbsp;</td>
  117. </tr>
  118. </table>
  119. </td>
  120. </tr>
  121. </table>
  122. <table width="100%" border="0" id="needset" cellspacing="0" cellpadding="0"
  123. style="border:1px solid #cfcfcf;background:#ffffff;text-align:left;" class="table">
  124. <tr>
  125. <td height="26" bgcolor="#F9FCEF" style="padding-left:10px;"><strong>公用参数:</strong></td>
  126. <td bgcolor="#F9FCEF"></td>
  127. </tr>
  128. <tr>
  129. <td width="150" class='bline' height="26" style="padding-left:10px;">是否支持投稿:</td>
  130. <td class='bline'>
  131. <label><input type='radio' name='issend' value='0' class='np' />
  132. 不支持</label>
  133. &nbsp;
  134. <label><input type='radio' name='issend' value='1' class='np' checked='1' />
  135. 支持</label> </td>
  136. </tr>
  137. <tr>
  138. <td class='bline' height="26" style="padding-left:10px;">目录保存位置:</td>
  139. <td class='bline'>
  140. <input name="referpath" type="radio" id="truepath1" class="np" value="parent"
  141. checked='1' />
  142. <label for="truepath1">默认HMTL目录(
  143. <?php
  144. $pardir = '{cmspath}'.$cfg_arcdir;
  145. if(!empty($typedir)) $pardir = $typedir.'/';
  146. $pardir = preg_replace("#\/{1,}#", '/', $pardir);
  147. echo $pardir;
  148. ?>
  149. )</label>
  150. <input name="referpath" type="radio" id="truepath2" class="np" value="cmspath" />
  151. <label for="truepath2">CMS根目录</label>
  152. <input name="nextdir" type="hidden" id="nextdir" value="<?php echo $pardir; ?>" />
  153. <span id="pathtype" style="display:none"><input name="referpath" type="radio" id="truepath3" class="np"
  154. value="typepath" />
  155. 隶属栏目所属的目录</span></td>
  156. </tr>
  157. <tr>
  158. <td class='bline' height="26" style="padding-left:10px;">隶属栏目:</td>
  159. <td class='bline'>
  160. <select name='reid' onchange="showSeltype(this)">
  161. <option value='0'>选择所属目录... </option>
  162. <?php echo $typeOptions;?>
  163. </select>
  164. (默认为顶级栏目)
  165. </td>
  166. </tr>
  167. <tr>
  168. <td class='bline' height="26" style="padding-left:10px;">内容模型:&nbsp; </td>
  169. <td class='bline'><select name="channeltype" id="channeltype" style="width:200px"
  170. onChange="ParTemplet(this)">
  171. <?php
  172. foreach($channelArray as $k=>$arr)
  173. {
  174. if($k==$channelid) echo " <option value='{$k}' selected>{$arr['typename']}|{$arr['nid']}</option>\r\n";
  175. else echo " <option value='{$k}'>{$arr['typename']}|{$arr['nid']}</option>\r\n";
  176. }
  177. ?>
  178. </select>
  179. </td>
  180. </tr>
  181. <tr>
  182. <td class='bline' height="26" style="padding-left:10px;">栏目列表选项:</td>
  183. <td class='bline'>
  184. <label><input type='radio' name='isdefault' value='1' class='np' checked='1' />
  185. 链接到默认页</label>
  186. <label><input type='radio' name='isdefault' value='0' class='np' />
  187. 链接到列表第一页</label>
  188. <label><input type='radio' name='isdefault' value='-1' class='np' />
  189. 使用动态页</label> </td>
  190. </tr>
  191. <tr>
  192. <td class='bline' height="26" style="padding-left:10px;">默认页的名称:</td>
  193. <td class='bline'><input name="defaultname" type="text" value="index.html" class="pubinputs" /></td>
  194. </tr>
  195. <tr id='helpvar2' style='display:none'>
  196. <td height="26" bgcolor="#F3F7EA" style="padding-left:10px;">支持变量:</td>
  197. <td height="26" bgcolor="#F3F7EA"> {Y}、{M}、{D} 年月日<br />
  198. {timestamp} INT类型的UNIX时间戳<br />
  199. {aid} 文章ID<br />
  200. {pinyin} 拼音+文章ID<br />
  201. {py} 拼音部首+文章ID<br />
  202. {typedir} 栏目目录 <br />
  203. {cc} 日期+ID混编后用转换为适合的字母 <br />
  204. </td>
  205. </tr>
  206. <tr>
  207. <td height="26" class='bline' style="padding-left:10px;">文章命名规则:</td>
  208. <td class='bline'><input name="namerule" type="text" id="namerule" value="{typedir}/{Y}{M}{D}/{aid}.html"
  209. size="40" class="pubinputs" />
  210. <img src="images/help.gif" alt="帮助" border="0" style="cursor:pointer"
  211. onClick="ShowHide('helpvar2')" /> </td>
  212. </tr>
  213. <tr id='helpvar3' style='display:none'>
  214. <td height="26" bgcolor="#F3F7EA" style="padding-left:10px;">支持变量:</td>
  215. <td bgcolor="#F3F7EA">{page} 列表的页码</td>
  216. </tr>
  217. <tr>
  218. <td height="26" style="padding-left:10px;">列表命名规则:</td>
  219. <td><input name="namerule2" type="text" id="namerule2" value="{typedir}/list_{tid}_{page}.html" size="40"
  220. class="pubinputs" />
  221. <img src="images/help.gif" alt="帮助" border="0" style="cursor:pointer"
  222. onClick="ShowHide('helpvar3')" /></td>
  223. </tr>
  224. <tr>
  225. <td height="26" bgcolor="#F9FCEF" style="padding-left:10px;"><strong>栏目填写:</strong></td>
  226. <td bgcolor="#F9FCEF"></td>
  227. </tr>
  228. <tr>
  229. <td colspan='2' style="padding:5px 0px 8px 10px">
  230. <table id="addQuick" width="850" border="0" cellpadding="3" cellspacing="1" bgcolor="#cfcfcf">
  231. <tbody>
  232. <tr bgcolor="#FBFCE2" align="center">
  233. <td width="60" height="26">排序</td>
  234. <td width="170">顶级栏目名称</td>
  235. <td width="520">子栏目(用&quot;目录名称1,目录名称2...&quot;这样表示多个栏目)</td>
  236. <td width="250" align="center"><button type="button" id="add" class="btn btn-success btn-sm">添加</button>
  237. </td>
  238. </tr>
  239. <tr bgcolor="#FFFFFF" height="30" align="center">
  240. <td class="rank" style="padding:5px;"><input type="hidden" name="posttype" value=""
  241. class="pubinputs" />
  242. <input type="text" name="rank" id="rank" value="1" class="pubinputs" style="width:50px;" /></td>
  243. <td align='center'><input type="text" name="toptype" id="toptype" class="pubinputs"
  244. style="width:160px;" /></td>
  245. <td><input type="text" name="sontype" id="sontype" class="pubinputs" style="width:480px;" /></td>
  246. <td align="center"><button name="" type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
  247. </tr>
  248. <?php for($i=2;$i<=10;$i++) { ?>
  249. <tr bgcolor="#FFFFFF" height="30" class="repeat" align="center">
  250. <td class="rank"><input type="hidden" name="posttype<?php echo $i; ?>"
  251. value="<?php echo $i; ?>" />
  252. <input type="text" name="rank<?php echo $i; ?>" id="rank<?php echo $i; ?>"
  253. value="<?php echo $i; ?>" class="pubinputs" style="width:50px;" /></td>
  254. <td align='center'><input type="text" name="toptype<?php echo $i; ?>"
  255. id="toptype<?php echo $i; ?>" class="pubinputs" style="width:160px;" /></td>
  256. <td><input type="text" name="sontype<?php echo $i; ?>" id="sontype<?php echo $i; ?>"
  257. class="pubinputs" style="width:480px;" /></td>
  258. <td align="center"><button name="" type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
  259. </tr>
  260. <?php } ?>
  261. </tbody>
  262. </table>
  263. <table id="addQuickRel" width="302" border="0" cellpadding="3" cellspacing="1" bgcolor="#cfcfcf"
  264. style="display:none">
  265. <tbody>
  266. <tr bgcolor="#FBFCE2" align="center">
  267. <td width="60" height="26">排序</td>
  268. <td width="170">栏目名称</td>
  269. <td width="250" align="center"><button type="button" id="addrel" class="btn btn-success btn-sm">添加</button>
  270. </td>
  271. </tr>
  272. <tr bgcolor="#FFFFFF" height="30" align="center">
  273. <td class="rank" style="padding:5px;"><input type="hidden" name="posttype" value=""
  274. class="pubinputs" />
  275. <input type="text" name="rank" id="rank" value="1" class="pubinputs" style="width:50px;" /></td>
  276. <td align='center'><input type="text" name="reltype" id="reltype" class="pubinputs"
  277. style="width:160px;" /></td>
  278. <td align="center"><button name="" type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
  279. </tr>
  280. <?php for($i=2;$i<=10;$i++) { ?>
  281. <tr bgcolor="#FFFFFF" height="30" class="repeat" align="center">
  282. <td class="rank"><input type="hidden" name="posttype<?php echo $i; ?>"
  283. value="<?php echo $i; ?>" />
  284. <input type="text" name="rank<?php echo $i; ?>" id="rank<?php echo $i; ?>"
  285. value="<?php echo $i; ?>" class="pubinputs" style="width:50px;" /></td>
  286. <td align='center'><input type="text" name="reltype<?php echo $i; ?>"
  287. id="reltype<?php echo $i; ?>" class="pubinputs" style="width:160px;" /></td>
  288. <td align="center"><button type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
  289. </tr>
  290. <?php } ?>
  291. </tbody>
  292. </table>
  293. </td>
  294. </tr>
  295. </table>
  296. <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F9FCEF"
  297. style="border:1px solid #cfcfcf;border-top:none;" class="mb-3">
  298. <tr>
  299. <td width="1%" height="36"></td>
  300. <td width="99%" valign="bottom" class="py-3"><button type="submit" class="btn btn-success">确定</button>
  301. &nbsp;&nbsp;&nbsp; <a href="catalog_main.php" class="btn btn-success">返回</a></td>
  302. </tr>
  303. </table>
  304. </td>
  305. </tr>
  306. </table>
  307. </form>
  308. </body>
  309. </html>