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

293 lines
14KB

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