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

225 lines
8.1KB

  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  6. <title>tags管理</title>
  7. <script src="../static/js/jquery.js" language="javascript" type="text/javascript"></script>
  8. <script src="/static/js/bootstrap.bundle.js"></script>
  9. <link rel="stylesheet" href="../static/css/bootstrap.min.css">
  10. <script src="../static/js/dede.js"></script>
  11. <link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  12. <link href="css/base.css" rel="stylesheet" type="text/css" />
  13. <style>
  14. .col-form-label {
  15. padding-top: 0;
  16. }
  17. </style>
  18. <script language="javascript">
  19. function checkall(form, prefix, checkall) {
  20. var checkall = checkall ? checkall : 'all';
  21. for (var i = 0; i < form.elements.length; i++) {
  22. var e = form.elements[i];
  23. if (e.name && e.name != checkall && (!prefix || (prefix && e.name.match(prefix)))) {
  24. e.checked = form.elements[checkall].checked;
  25. }
  26. }
  27. }
  28. function UpdateOne(tid) {
  29. location = "tags_main.php?action=update&count=" + document.getElementById('count' + tid).value + "&tid=" + tid;
  30. }
  31. function DeleteOne(tid) {
  32. location = "tags_main.php?action=delete&ids=" + tid;
  33. }
  34. function UpdateKwDes(tid, tag) {
  35. $.get("tags_main.php?action=get_one&tid=" + tid, function (data) {
  36. let rs = JSON.parse(data);
  37. let title = rs.title ? rs.title : "";
  38. let keywords = rs.keywords ? rs.keywords : "";
  39. let description = rs.description ? rs.description : "";
  40. ShowMsg(`
  41. <div class="form-group row">
  42. <label for="iptTitle" class="col-sm-3 col-form-label">标签</label>
  43. <div class="col-sm-9">
  44. <input name="title" type="text" class="form-control" disabled
  45. value="${tag}">
  46. </div>
  47. </div>
  48. <div class="form-group row">
  49. <label for="iptKw" class="col-sm-3 col-form-label">标题</label>
  50. <div class="col-sm-9">
  51. <input name="title" type="text" class="form-control" id="iptTitle"
  52. placeholder="例如:DedeBIZ织梦商业组件" value="${title}">
  53. </div>
  54. </div>
  55. <div class="form-group row">
  56. <label for="iptKw" class="col-sm-3 col-form-label">关键词</label>
  57. <div class="col-sm-9">
  58. <input name="kw" type="text" class="form-control" id="iptKw"
  59. placeholder="例如:DedeBIZ 织梦 Dede商业" value="${keywords}">
  60. </div>
  61. </div>
  62. <div class="form-group row">
  63. <label for="iptDes" class="col-sm-3 col-form-label">描述</label>
  64. <div class="col-sm-9">
  65. <textarea id="iptDes" name="des" class="form-control" row=3
  66. placeholder="例如:国内流行的内容管理系统(CMS)多端全媒体解决方案">${description}</textarea>
  67. </div>
  68. </div>
  69. `, {
  70. footer: `<button type="button" class="btn btn-outline-success" onclick="UpdateKwDesDo(${tid}, '~modalID~')">设置</button>`,
  71. });
  72. })
  73. }
  74. function UpdateKwDesDo(tid, mdlID) {
  75. let title = $("#iptTitle").val();
  76. let kw = $("#iptKw").val();
  77. let des = $("#iptDes").val();
  78. $.post("tags_main.php?action=set_one", {
  79. tid: tid,
  80. title: title,
  81. kw: kw,
  82. des: des,
  83. }, function (data) {
  84. let rs = JSON.parse(data);
  85. if (rs.code === 200) {
  86. location.reload();
  87. }
  88. })
  89. }
  90. </script>
  91. </head>
  92. <body>
  93. <div class="bodytitle mt-3">
  94. <div class="bodytitleleft"></div>
  95. <div class="bodytitletxt" style="padding-left:10px;"><a href="tags_main.php">Tags标签管理</a></div>
  96. </div>
  97. <div class="main">
  98. <form name='form1' action="tags_main.php?action=fetch" method="post" style="margin-bottom:6px;">
  99. <table width="98%" border="0" cellspacing="1" align="center" class="table maintable"
  100. style="background:#CFCFCF;">
  101. <tr>
  102. <td height="20" align="left" bgcolor="#F0FBBD" background="images/wbg.gif"
  103. style="padding-left:10px;"><strong>提取Tag</strong></td>
  104. </tr>
  105. <tr>
  106. <td height="30" align="center" bgcolor="#Ffffff">
  107. 开始id:
  108. <input type="text" name="startaid" />
  109. 结束id:
  110. <input type="text" name="endaid" />
  111. &nbsp;
  112. <button name="submit" type="submit" class="btn btn-secondary">获取Tags</button>
  113. <small>(tag以文档关键词为准)</small>
  114. </td>
  115. </tr>
  116. </table>
  117. </form>
  118. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center"
  119. class="table maintable table-bordered" style="background:#CFCFCF;">
  120. <tr>
  121. <td height="20" colspan="7" bgcolor="#F0F0F0">
  122. <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"
  123. class="table-borderless">
  124. <tr>
  125. <td align="left" style="padding-left:10px;"><strong>Tag维护</strong></td>
  126. <form name='form2' action="tags_main.php">
  127. <td width="40%" align="right">
  128. 搜索:
  129. <input type='text' name='tag' size='10' value="<?php echo $tag;?>">
  130. <button type='submit' name='sb' class="btn btn-secondary btn-sm">确定</button>
  131. &nbsp; <a href="makehtml_taglist.php" name='sb'
  132. class="btn btn-secondary btn-sm">更新Tag HTML</a>
  133. </td>
  134. </form>
  135. </tr>
  136. </table>
  137. </td>
  138. </tr>
  139. <tr align="center" bgcolor="#FBFCE2" height="26">
  140. <td width="5%">删</td>
  141. <td width="20%">标签</td>
  142. <td width="10%"><a
  143. href="tags_main.php?tag=<?php echo $tag;?>&orderby=count&orderway=<?php echo $neworderway;?>"><u>点击</u></a>
  144. </td>
  145. <td width="10%"><a
  146. href="tags_main.php?tag=<?php echo $tag;?>&orderby=total&orderway=<?php echo $neworderway;?>"><u>文档数</u></a>
  147. </td>
  148. <td width="15%"><a
  149. href="tags_main.php?tag=<?php echo $tag;?>&orderby=addtime&orderway=<?php echo $neworderway;?>"><u>添加时间</u></a>
  150. </td>
  151. <td width="15%">更新时间</td>
  152. <td width="20%">操作</td>
  153. </tr>
  154. <form name='form3' action="tags_main.php?action=delete" method="post">
  155. {dede:datalist}
  156. <?php
  157. $fields['addtime'] = GetDateMk($fields['addtime']);
  158. $fields['uptime'] = GetDateMk($fields['uptime']);
  159. $fields['tag'] = dede_htmlspecialchars($fields['tag']);
  160. ?>
  161. <tr align="center" bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';"
  162. onMouseOut="javascript:this.bgColor='#FFFFFF';">
  163. <td height="24">
  164. <input type="checkbox" name="ids[]" value="<?php echo $fields['id']; ?>" class='np' />
  165. </td>
  166. <td>
  167. <a href="../tags.php?/<?php echo urlencode($fields['tag']); ?>/" target="_blank">{dede:field.tag
  168. /}</a>
  169. </td>
  170. <td>
  171. <input type='text' value='<?php echo $fields['count']; ?>'
  172. id='count<?php echo $fields['id']; ?>' size='5' />
  173. </td>
  174. <td>
  175. <?php echo $fields['total']; ?>
  176. </td>
  177. <td>
  178. <?php echo $fields['addtime']; ?>
  179. </td>
  180. <td>
  181. <?php echo $fields['uptime']; ?>
  182. </td>
  183. <td>
  184. <a href='javascript:UpdateKwDes(<?php echo $fields['id']; ?>, "<?php echo $fields['tag']; ?>");'
  185. class="btn btn-secondary btn-sm">关键词描述</a>
  186. <a href='javascript:UpdateOne(<?php echo $fields['id']; ?>);'
  187. class="btn btn-secondary btn-sm">更新</a>
  188. <a href='makehtml_taglist.php?tid=<?php echo $fields['id'];?>'
  189. class="btn btn-secondary btn-sm">生成HTML</a>
  190. <a href='javascript:DeleteOne(<?php echo $fields['id']; ?>);'
  191. class="btn btn-secondary btn-sm">删</a>
  192. </td>
  193. </tr>
  194. {/dede:datalist}
  195. <tr bgcolor="#F0FBBD">
  196. <td align="center" bgcolor="#F8FEE0" height="28">
  197. <label>
  198. <input type="checkbox" onclick="checkall(this.form, 'ids')" name="all" class="np" />
  199. <br />全选
  200. </label>
  201. </td>
  202. <td height="28" colspan="7" align="center" bgcolor="#F8FEE0">
  203. {dede:pagelist /}
  204. </td>
  205. </tr>
  206. </form>
  207. <tr align="center" bgcolor="#FAFDF0">
  208. <td height="40" colspan="8">
  209. <button type='button' onclick="document.form3.submit()" class="btn btn-secondary">删除所选</button>
  210. </td>
  211. </tr>
  212. </table>
  213. </div>
  214. </body>
  215. </html>