|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <!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="../static/web/js/jquery.min.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 == "")
- obj.style.display = "none";
- else
- obj.style.display = "";
- }
- function ShowObj(objname) {
- var obj = document.getElementById(objname);
- obj.style.display = "";
- }
- 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 rel="stylesheet" href="../static/web/css/bootstrap.min.css">
- <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
- <link rel="stylesheet" href="../static/web/css/admin.css">
- </head>
- <body>
- <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" class="mt-3">
- <tr>
- <td width="100%" height="26">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td height="30"><img height='14' src='../static/web/img/book1.gif' width='20' /> <a href="catalog_main.php">栏目管理</a> > 批量增加栏目</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td width="100%" height="1" background="../static/web/img/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="90" align="left" bgcolor="#ffffff">
- <table width="100%" border="0" cellspacing="0" id="head1" cellpadding="0">
- <tr>
- <td colspan="2" bgcolor="#ffffff">
- <table width="86" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="86" height="26" align="center" background="../static/web/img/itemnote1.gif">常规选项</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table width="100%" border="0" id="needset" cellspacing="0" cellpadding="0" style="border:1px solid #dee2e6" class="table mb-0">
- <tr>
- <td height="26" bgcolor="#f8f8f8" style="padding-left:10px">公用参数:</td>
- <td bgcolor="#f8f8f8"></td>
- </tr>
- <tr>
- <td width="160" class="bline" height="26" style="padding-left:10px">是否支持投稿:</td>
- <td class="bline">
- <label><input type='radio' name='issend' value='0' class='np' />
- 不支持</label>
-
- <label><input type='radio' name='issend' value='1' class='np' checked='1' />
- 支持</label> </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' />
- <label for="truepath1">默认HMTL目录(
- <?php
- $pardir = '{cmspath}'.$cfg_arcdir;
- if(!empty($typedir)) $pardir = $typedir.'/';
- $pardir = preg_replace("#\/{1,}#", '/', $pardir);
- echo $pardir;
- ?>)</label>
- <input name="referpath" type="radio" id="truepath2" class="np" value="cmspath">
- <label for="truepath2">CMS根目录</label>
- <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:260px">
- <?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">
- <label><input type='radio' name='isdefault' value='1' class='np' checked='1' />
- 链接到默认页</label>
- <label><input type='radio' name='isdefault' value='0' class='np' />
- 链接到列表第一页</label>
- <label><input type='radio' name='isdefault' value='-1' class='np' />
- 使用动态页</label>
- </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="26" bgcolor="#F3F7EA" style="padding-left:10px">支持变量:</td>
- <td height="26" 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="../static/web/img/help.gif" alt="帮助" border="0" style="cursor:pointer" onClick="ShowHide('helpvar2')"></td>
- </tr>
- <tr id='helpvar3' style='display:none'>
- <td height="26" 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="../static/web/img/help.gif" alt="帮助" border="0" style="cursor:pointer" onClick="ShowHide('helpvar3')"></td>
- </tr>
- <tr>
- <td height="26" bgcolor="#f8f8f8" style="padding-left:10px">栏目填写:</td>
- <td bgcolor="#f8f8f8"></td>
- </tr>
- <tr>
- <td colspan='2'>
- <table id="addQuick" width="850" border="0" cellpadding="3" cellspacing="1">
- <tbody>
- <tr bgcolor="#FBFCE2" align="center">
- <td width="60" height="26">排序</td>
- <td width="170">顶级栏目名称</td>
- <td width="520">子栏目(用"目录名称1,目录名称2"这样表示多个栏目)</td>
- <td width="250" align="center"><button type="button" id="add" class="btn btn-success btn-sm">添加</button></td>
- </tr>
- <tr bgcolor="#ffffff" height="30" align="center">
- <td class="rank"><input type="hidden" name="posttype" value="" class="pubinputs">
- <input type="text" name="rank" id="rank" value="1" class="pubinputs" style="width:60px"></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"><button name="" type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
- </tr>
- <?php for($i=2;$i<=10;$i++) { ?>
- <tr bgcolor="#ffffff" height="30" 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:60px"></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"><button name="" type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
- <table id="addQuickRel" width="302" border="0" cellpadding="3" cellspacing="1" style="display:none">
- <tbody>
- <tr bgcolor="#FBFCE2" align="center">
- <td width="60" height="26">排序</td>
- <td width="170">栏目名称</td>
- <td width="250" align="center"><button type="button" id="addrel" class="btn btn-success btn-sm">添加</button></td>
- </tr>
- <tr bgcolor="#ffffff" height="30" align="center">
- <td class="rank">
- <input type="hidden" name="posttype" value="" class="pubinputs">
- <input type="text" name="rank" id="rank" value="1" class="pubinputs" style="width:60px">
- </td>
- <td align='center'><input type="text" name="reltype" id="reltype" class="pubinputs" style="width:160px"></td>
- <td align="center"><button name="" type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
- </tr>
- <?php for($i=2;$i<=10;$i++) { ?>
- <tr bgcolor="#ffffff" height="30" 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:60px">
- </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"><button type="button" id="add" class="btn btn-success btn-sm del">删除</button></td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
- </td>
- </tr>
- </table>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#f8f8f8" style="border:1px solid #dee2e6;border-top:0" class="mb-3">
- <tr>
- <td align="center" class="py-3">
- <button type="submit" class="btn btn-success">保存</button>
- <a href="catalog_main.php" class="btn btn-success">返回</a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
- </body>
- </html>
|