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

155 lines
6.5KB

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