国内流行的内容管理系统(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. <script>
  14. function checkall(form, prefix, checkall) {
  15. var checkall = checkall ? checkall : 'all';
  16. for (var i = 0; i < form.elements.length; i++) {
  17. var e = form.elements[i];
  18. if (e.name && e.name != checkall && (!prefix || (prefix && e.name.match(prefix)))) {
  19. e.checked = form.elements[checkall].checked;
  20. }
  21. }
  22. }
  23. function UpdateOne(tid) {
  24. location = "tags_main.php?action=update&count=" + document.getElementById('count' + tid).value + "&tid=" + tid;
  25. }
  26. function DeleteOne(tid) {
  27. location = "tags_main.php?action=delete&ids=" + tid;
  28. }
  29. function UpdateKwDes(tid, tag) {
  30. $.get("tags_main.php?action=get_one&tid=" + tid, function(data) {
  31. let rs = JSON.parse(data);
  32. let title = rs.title ? rs.title : "";
  33. let keywords = rs.keywords ? rs.keywords : "";
  34. let description = rs.description ? rs.description : "";
  35. ShowMsg(`
  36. <div class="form-group row">
  37. <label for="iptTitle" class="col-sm-3 col-form-label">标签</label>
  38. <div class="col-sm-9">
  39. <input type="text" name="title" class="form-control" disabled
  40. value="${tag}">
  41. </div>
  42. </div>
  43. <div class="form-group row">
  44. <label for="iptKw" class="col-sm-3 col-form-label">标题</label>
  45. <div class="col-sm-9">
  46. <input type="text" name="title" class="form-control" id="iptTitle"
  47. placeholder="例如:DedeBIZ织梦商业组件" value="${title}">
  48. </div>
  49. </div>
  50. <div class="form-group row">
  51. <label for="iptKw" class="col-sm-3 col-form-label">关键词</label>
  52. <div class="col-sm-9">
  53. <input type="text" name="kw" class="form-control" id="iptKw"
  54. placeholder="例如:DedeBIZ 织梦 Dede商业" value="${keywords}">
  55. </div>
  56. </div>
  57. <div class="form-group row">
  58. <label for="iptDes" class="col-sm-3 col-form-label">描述</label>
  59. <div class="col-sm-9">
  60. <textarea id="iptDes" name="des" class="form-control" row=3
  61. placeholder="例如:国内流行的内容管理系统(CMS)多端全媒体解决方案">${description}</textarea>
  62. </div>
  63. </div>
  64. `, {
  65. footer: `<button type="button" class="btn btn-outline-success btn-sm" onclick="UpdateKwDesDo(${tid}, '~modalID~')">设置</button>`,
  66. });
  67. })
  68. }
  69. function UpdateKwDesDo(tid, mdlID) {
  70. let title = $("#iptTitle").val();
  71. let kw = $("#iptKw").val();
  72. let des = $("#iptDes").val();
  73. $.post("tags_main.php?action=set_one", {
  74. tid: tid,
  75. title: title,
  76. kw: kw,
  77. des: des,
  78. }, function(data) {
  79. let rs = JSON.parse(data);
  80. if (rs.code === 200) {
  81. location.reload();
  82. }
  83. })
  84. }
  85. </script>
  86. <style>
  87. .col-form-label {
  88. padding-top: 0
  89. }
  90. </style>
  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="#F8FCF1">
  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='#F8FCF1';" 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-3">
  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>