国内流行的内容管理系统(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.

290 lines
14KB

  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/web/js/jquery.min.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 == "")
  50. obj.style.display = "none";
  51. else
  52. obj.style.display = "";
  53. }
  54. function ShowObj(objname) {
  55. var obj = document.getElementById(objname);
  56. obj.style.display = "";
  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/web/css/bootstrap.min.css">
  77. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  78. <link rel='stylesheet' href='../static/web/css/admin.css'>
  79. <style>
  80. .table {
  81. margin: 0;
  82. }
  83. </style>
  84. </head>
  85. <body>
  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" style="border-collapse:collapse" class="mt-3">
  90. <tr>
  91. <td width="100%" height="26" valign="top">
  92. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  93. <tr>
  94. <td height="30"><img height='14' src='../static/web/img/book1.gif' width='20' />&nbsp;<a href="catalog_main.php">栏目管理</a> &gt; 批量增加栏目</td>
  95. </tr>
  96. </table>
  97. </td>
  98. </tr>
  99. <tr>
  100. <td width="100%" height="1" background="../static/web/img/sp_bg.gif"></td>
  101. </tr>
  102. </table>
  103. <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  104. <tr>
  105. <td height="10"></td>
  106. </tr>
  107. <tr>
  108. <td height="95" align="left" bgcolor="#ffffff">
  109. <table width="100%" border="0" cellspacing="0" id="head1" cellpadding="0">
  110. <tr>
  111. <td colspan="2" bgcolor="#ffffff">
  112. <table width="86" border="0" cellpadding="0" cellspacing="0">
  113. <tr>
  114. <td width="86" height="26" align="center" background="../static/web/img/itemnote1.gif">常规选项</td>
  115. </tr>
  116. </table>
  117. </td>
  118. </tr>
  119. </table>
  120. <table width="100%" border="0" id="needset" cellspacing="0" cellpadding="0" style="border:1px solid #dee2e6" class="table">
  121. <tr>
  122. <td height="26" bgcolor="#f8f8f8" style="padding-left:10px">公用参数:</td>
  123. <td bgcolor="#f8f8f8"></td>
  124. </tr>
  125. <tr>
  126. <td width="150" class='bline' height="26" style="padding-left:10px">是否支持投稿:</td>
  127. <td class='bline'>
  128. <label><input type='radio' name='issend' value='0' class='np' />
  129. 不支持</label>
  130. &nbsp;
  131. <label><input type='radio' name='issend' value='1' class='np' checked='1' />
  132. 支持</label> </td>
  133. </tr>
  134. <tr>
  135. <td class='bline' height="26" style="padding-left:10px">目录保存位置:</td>
  136. <td class='bline'>
  137. <input name="referpath" type="radio" id="truepath1" class="np" value="parent" checked='1' />
  138. <label for="truepath1">默认HMTL目录(
  139. <?php
  140. $pardir = '{cmspath}'.$cfg_arcdir;
  141. if(!empty($typedir)) $pardir = $typedir.'/';
  142. $pardir = preg_replace("#\/{1,}#", '/', $pardir);
  143. echo $pardir;
  144. ?>)</label>
  145. <input name="referpath" type="radio" id="truepath2" class="np" value="cmspath">
  146. <label for="truepath2">CMS根目录</label>
  147. <input name="nextdir" type="hidden" id="nextdir" value="<?php echo $pardir; ?>">
  148. <span id="pathtype" style="display:none"><input name="referpath" type="radio" id="truepath3" class="np" value="typepath">
  149. 隶属栏目所属的目录</span>
  150. </td>
  151. </tr>
  152. <tr>
  153. <td class='bline' height="26" style="padding-left:10px">隶属栏目:</td>
  154. <td class='bline'>
  155. <select name='reid' onchange="showSeltype(this)">
  156. <option value='0'>选择所属目录</option>
  157. <?php echo $typeOptions; ?>
  158. </select>(默认为顶级栏目)
  159. </td>
  160. </tr>
  161. <tr>
  162. <td class='bline' height="26" style="padding-left:10px">内容模型:&nbsp; </td>
  163. <td class='bline'><select name="channeltype" id="channeltype" style="width:260px" onChange="ParTemplet(this)">
  164. <?php
  165. foreach($channelArray as $k=>$arr)
  166. {
  167. if($k==$channelid) echo "<option value='{$k}' selected>{$arr['typename']}|{$arr['nid']}</option>\r\n";
  168. else echo "<option value='{$k}'>{$arr['typename']}|{$arr['nid']}</option>\r\n";
  169. }
  170. ?>
  171. </select>
  172. </td>
  173. </tr>
  174. <tr>
  175. <td class='bline' height="26" style="padding-left:10px">栏目列表选项:</td>
  176. <td class='bline'>
  177. <label><input type='radio' name='isdefault' value='1' class='np' checked='1' />
  178. 链接到默认页</label>
  179. <label><input type='radio' name='isdefault' value='0' class='np' />
  180. 链接到列表第一页</label>
  181. <label><input type='radio' name='isdefault' value='-1' class='np' />
  182. 使用动态页</label>
  183. </td>
  184. </tr>
  185. <tr>
  186. <td class='bline' height="26" style="padding-left:10px">默认页的名称:</td>
  187. <td class='bline'><input name="defaultname" type="text" value="index.html" class="pubinputs"></td>
  188. </tr>
  189. <tr id='helpvar2' style='display:none'>
  190. <td height="26" bgcolor="#F3F7EA" style="padding-left:10px">支持变量:</td>
  191. <td height="26" bgcolor="#F3F7EA"> {Y}、{M}、{D} 年月日<br>
  192. {timestamp} INT类型的UNIX时间戳<br>
  193. {aid} 文章ID<br>
  194. {pinyin} 拼音+文章ID<br>
  195. {py} 拼音部首+文章ID<br>
  196. {typedir} 栏目目录 <br>
  197. {cc} 日期+ID混编后用转换为适合的字母 <br>
  198. </td>
  199. </tr>
  200. <tr>
  201. <td height="26" class='bline' style="padding-left:10px">文章命名规则:</td>
  202. <td class='bline'><input name="namerule" type="text" id="namerule" value="{typedir}/{Y}{M}{D}/{aid}.html"
  203. size="40" class="pubinputs">
  204. <img src="../static/web/img/help.gif" alt="帮助" border="0" style="cursor:pointer" onClick="ShowHide('helpvar2')"></td>
  205. </tr>
  206. <tr id='helpvar3' style='display:none'>
  207. <td height="26" bgcolor="#F3F7EA" style="padding-left:10px">支持变量:</td>
  208. <td bgcolor="#F3F7EA">{page} 列表的页码</td>
  209. </tr>
  210. <tr>
  211. <td height="26" style="padding-left:10px">列表命名规则:</td>
  212. <td><input name="namerule2" type="text" id="namerule2" value="{typedir}/list_{tid}_{page}.html" size="40" class="pubinputs">
  213. <img src="../static/web/img/help.gif" alt="帮助" border="0" style="cursor:pointer" onClick="ShowHide('helpvar3')"></td>
  214. </tr>
  215. <tr>
  216. <td height="26" bgcolor="#f8f8f8" style="padding-left:10px">栏目填写:</td>
  217. <td bgcolor="#f8f8f8"></td>
  218. </tr>
  219. <tr>
  220. <td colspan='2'>
  221. <table id="addQuick" width="850" border="0" cellpadding="3" cellspacing="1">
  222. <tbody>
  223. <tr bgcolor="#FBFCE2" align="center">
  224. <td width="60" height="26">排序</td>
  225. <td width="170">顶级栏目名称</td>
  226. <td width="520">子栏目(用&quot;目录名称1,目录名称2&quot;这样表示多个栏目)</td>
  227. <td width="250" align="center"><button type="button" id="add" class="btn btn-success btn-sm">添加</button></td>
  228. </tr>
  229. <tr bgcolor="#ffffff" height="30" align="center">
  230. <td class="rank"><input type="hidden" name="posttype" value="" class="pubinputs">
  231. <input type="text" name="rank" id="rank" value="1" class="pubinputs" style="width:60px"></td>
  232. <td align='center'><input type="text" name="toptype" id="toptype" class="pubinputs" style="width:160px"></td>
  233. <td><input type="text" name="sontype" id="sontype" class="pubinputs" style="width:480px"></td>
  234. <td align="center"><button name="" type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
  235. </tr>
  236. <?php for($i=2;$i<=10;$i++) { ?>
  237. <tr bgcolor="#ffffff" height="30" class="repeat" align="center">
  238. <td class="rank"><input type="hidden" name="posttype<?php echo $i; ?>" value="<?php echo $i; ?>">
  239. <input type="text" name="rank<?php echo $i; ?>" id="rank<?php echo $i; ?>" value="<?php echo $i; ?>" class="pubinputs" style="width:60px"></td>
  240. <td align='center'><input type="text" name="toptype<?php echo $i; ?>" id="toptype<?php echo $i; ?>" class="pubinputs" style="width:160px"></td>
  241. <td><input type="text" name="sontype<?php echo $i; ?>" id="sontype<?php echo $i; ?>" class="pubinputs" style="width:480px"></td>
  242. <td align="center"><button name="" type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
  243. </tr>
  244. <?php } ?>
  245. </tbody>
  246. </table>
  247. <table id="addQuickRel" width="302" border="0" cellpadding="3" cellspacing="1" style="display:none">
  248. <tbody>
  249. <tr bgcolor="#FBFCE2" align="center">
  250. <td width="60" height="26">排序</td>
  251. <td width="170">栏目名称</td>
  252. <td width="250" align="center"><button type="button" id="addrel" class="btn btn-success btn-sm">添加</button></td>
  253. </tr>
  254. <tr bgcolor="#ffffff" height="30" align="center">
  255. <td class="rank">
  256. <input type="hidden" name="posttype" value="" class="pubinputs">
  257. <input type="text" name="rank" id="rank" value="1" class="pubinputs" style="width:60px">
  258. </td>
  259. <td align='center'><input type="text" name="reltype" id="reltype" class="pubinputs" style="width:160px"></td>
  260. <td align="center"><button name="" type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
  261. </tr>
  262. <?php for($i=2;$i<=10;$i++) { ?>
  263. <tr bgcolor="#ffffff" height="30" class="repeat" align="center">
  264. <td class="rank">
  265. <input type="hidden" name="posttype<?php echo $i; ?>" value="<?php echo $i; ?>">
  266. <input type="text" name="rank<?php echo $i; ?>" id="rank<?php echo $i; ?>" value="<?php echo $i; ?>" class="pubinputs" style="width:60px">
  267. </td>
  268. <td align='center'><input type="text" name="reltype<?php echo $i; ?>" id="reltype<?php echo $i; ?>" class="pubinputs" style="width:160px"></td>
  269. <td align="center"><button type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
  270. </tr>
  271. <?php } ?>
  272. </tbody>
  273. </table>
  274. </td>
  275. </tr>
  276. </table>
  277. <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#f8f8f8" style="border:1px solid #dee2e6;border-top:0" class="mb-3">
  278. <tr>
  279. <td align="center" height="36" style="padding:.6rem">
  280. <button type="submit" class="btn btn-success">确定</button>
  281. <a href="catalog_main.php" class="btn btn-success">返回</a>
  282. </td>
  283. </tr>
  284. </table>
  285. </td>
  286. </tr>
  287. </table>
  288. </form>
  289. </body>
  290. </html>