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

162 lines
6.9KB

  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 src="../static/web/js/bootstrap.bundle.min.js"></script>
  12. <script src="../static/web/js/style.js"></script>
  13. <style>
  14. .col-form-label {
  15. padding-top: 0
  16. }
  17. </style>
  18. <script>
  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 type="text" name="title" 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 type="text" name="title" 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 type="text" name="kw" 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 btn-sm" 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="main">
  94. <table width="98%" cellpadding="1" cellspacing="1" align="center" class="table maintable mt-3 mb-3">
  95. <tr>
  96. <td colspan="8" bgcolor="#f8f8f8">
  97. <table width="100%" align="center" cellpadding="0" cellspacing="0" class="table-borderless">
  98. <tr>
  99. <td align="left">标签管理</td>
  100. <td align="right">
  101. <form name="form1" action="tags_main.php?action=fetch" method="post" style="display:inline-block">
  102. <input type="text" name="startaid" placeholder="请输入开始ID">
  103. <input type="text" name="endaid" placeholder="请输入结束ID">
  104. <button name="submit" type="submit" class="btn btn-success btn-sm">获取标签</button>
  105. <small>(以文档关键词为准)</small>
  106. </form>
  107. <form name="form2" action="tags_main.php" style="display:inline-block">
  108. <input type="text" name="tag" value="<?php echo $tag; ?>" placeholder="请输入标签" style="width:160px">
  109. <button type="submit" name="sb" class="btn btn-success btn-sm">保存</button>
  110. <a href="makehtml_taglist.php" name="sb" class="btn btn-success btn-sm">生成</a>
  111. </form>
  112. </td>
  113. </tr>
  114. </table>
  115. </td>
  116. </tr>
  117. <tr align="center" bgcolor="#FBFCE2">
  118. <td width="8%">选择</td>
  119. <td width="5%">ID</td>
  120. <td width="30%">标签</td>
  121. <td width="10%"><a href="tags_main.php?tag=<?php echo $tag; ?>&orderby=count&orderway=<?php echo $neworderway; ?>">点击</a></td>
  122. <td width="10%"><a href="tags_main.php?tag=<?php echo $tag; ?>&orderby=total&orderway=<?php echo $neworderway; ?>">文档数</a></td>
  123. <td width="10%"><a href="tags_main.php?tag=<?php echo $tag; ?>&orderby=addtime&orderway=<?php echo $neworderway; ?>">添加时间</a></td>
  124. <td width="10%">更新时间</td>
  125. <td width="22%">操作</td>
  126. </tr>
  127. <form name="form3" action="tags_main.php?action=delete" method="post">
  128. {dede:datalist empty='<tr><td colspan="8"><center>暂无内容</center></td></tr>'}
  129. <?php
  130. $fields['addtime'] = GetDateMk($fields['addtime']);
  131. $fields['uptime'] = GetDateMk($fields['uptime']);
  132. $fields['tag'] = dede_htmlspecialchars($fields['tag']);
  133. ?>
  134. <tr align="center" onmousemove="javascript:this.bgColor='#FBFCE2';" onmouseout="javascript:this.bgColor='#ffffff';">
  135. <td><input type="checkbox" name="ids[]" value="<?php echo $fields['id']; ?>"></td>
  136. <td>{dede:field.id/}</td>
  137. <td><a href="../apps/tags.php?/<?php echo $fields['id']; ?>/" target="_blank">{dede:field.tag/}</a></td>
  138. <td><input type="text" value="<?php echo $fields['count']; ?>" id="count<?php echo $fields['id']; ?>" size='5'></td>
  139. <td><?php echo $fields['total']; ?></td>
  140. <td><?php echo $fields['addtime']; ?></td>
  141. <td><?php echo $fields['uptime']; ?></td>
  142. <td>
  143. <a href='javascript:UpdateKwDes(<?php echo $fields['id']; ?>,"<?php echo $fields['tag']; ?>");' class="btn btn-success btn-sm">设置</a>
  144. <a href="javascript:UpdateOne(<?php echo $fields['id']; ?>);" class="btn btn-success btn-sm">更新</a>
  145. <a href="makehtml_taglist.php?tagid=<?php echo $fields['id']; ?>" class="btn btn-success btn-sm">生成</a>
  146. <a href="javascript:DeleteOne(<?php echo $fields['id']; ?>);" class="btn btn-success btn-sm">删除</a>
  147. </td>
  148. </tr>
  149. {/dede:datalist}
  150. <tr>
  151. <td align="center" class="py-2">
  152. <label><input type="checkbox" onclick="checkall(this.form,'ids')" name="all"> 全选</label>
  153. <button type="button" onclick="document.form3.submit()" class="btn btn-danger btn-sm">删除</button>
  154. </td>
  155. <td colspan="7" align="center">{dede:pagelist/}</td>
  156. </tr>
  157. </form>
  158. </table>
  159. </div>
  160. </body>
  161. </html>