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

139 lines
6.4KB

  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>.col-form-label{padding-top:0}</style>
  14. <script>
  15. function checkall(form, prefix, checkall) {
  16. var checkall = checkall ? checkall : 'all';
  17. for (var i = 0; i < form.elements.length; i++) {
  18. var e = form.elements[i];
  19. if (e.name && e.name != checkall && (!prefix || (prefix && e.name.match(prefix)))) {
  20. e.checked = form.elements[checkall].checked;
  21. }
  22. }
  23. }
  24. function UpdateOne(tid) {
  25. location = "tags_main.php?action=update&count=" + document.getElementById('count' + tid).value + "&tid=" + tid;
  26. }
  27. function DeleteOne(tid) {
  28. location = "tags_main.php?action=delete&ids=" + tid;
  29. }
  30. function UpdateKwDes(tid, tag) {
  31. $.get("tags_main.php?action=get_one&tid=" + tid, function(data) {
  32. let rs = JSON.parse(data);
  33. let title = rs.title ? rs.title : "";
  34. let keywords = rs.keywords ? rs.keywords : "";
  35. let description = rs.description ? rs.description : "";
  36. ShowMsg(`
  37. <div class="form-group row">
  38. <label for="iptTitle" class="col-sm-3 col-form-label">标签</label>
  39. <div class="col-sm-9"><input type="text" name="title" class="form-control" disabled value="${tag}"></div>
  40. </div>
  41. <div class="form-group row">
  42. <label for="iptKw" class="col-sm-3 col-form-label">标题</label>
  43. <div class="col-sm-9"><input type="text" name="title" class="form-control" id="iptTitle" placeholder="例如:DedeBIZ商业组件" value="${title}"></div>
  44. </div>
  45. <div class="form-group row">
  46. <label for="iptKw" class="col-sm-3 col-form-label">关键词</label>
  47. <div class="col-sm-9"><input type="text" name="kw" class="form-control" id="iptKw" placeholder="例如:DedeBIZ,Dede商业" value="${keywords}"></div>
  48. </div>
  49. <div class="form-group row">
  50. <label for="iptDes" class="col-sm-3 col-form-label">描述</label>
  51. <div class="col-sm-9"><textarea id="iptDes" name="des" class="form-control" placeholder="例如:DedeBIZ系统基于PHP7版本开发,具有很强的可扩展性,并且完全开放源代码。">${description}</textarea></div>
  52. </div>
  53. `, {
  54. footer: `<button type="button" class="btn btn-outline-success btn-sm" onclick="UpdateKwDesDo(${tid}, '~modalID~')">设置</button>`,
  55. });
  56. })
  57. }
  58. function UpdateKwDesDo(tid, mdlID) {
  59. let title = $("#iptTitle").val();
  60. let kw = $("#iptKw").val();
  61. let des = $("#iptDes").val();
  62. $.post("tags_main.php?action=set_one", {
  63. tid: tid,
  64. title: title,
  65. kw: kw,
  66. des: des,
  67. }, function(data) {
  68. let rs = JSON.parse(data);
  69. if (rs.code === 200) {
  70. location.reload();
  71. }
  72. })
  73. }
  74. </script>
  75. </head>
  76. <body>
  77. <table width="98%" cellpadding="1" cellspacing="1" align="center" class="table maintable mt-3 mb-3">
  78. <tr bgcolor="#f8f8f8">
  79. <form name="form1" action="tags_main.php?action=fetch" method="post">
  80. <td width="180"><input type="text" name="startaid" placeholder="请输入开始ID" style="width:160px"></td>
  81. <td width="170"><input type="text" name="endaid" placeholder="请输入结束ID" style="width:160px"></td>
  82. <td>
  83. <button name="submit" type="submit" class="btn btn-success btn-sm">获取标签</button>
  84. <a href="makehtml_taglist.php" name="sb" class="btn btn-success btn-sm">生成</a>
  85. </td>
  86. </form>
  87. </tr>
  88. </table>
  89. <table width="98%" cellpadding="1" cellspacing="1" align="center" class="table maintable mb-3">
  90. <tr>
  91. <td colspan="8" bgcolor="#f8f8f8">标签管理</td>
  92. </tr>
  93. <tr align="center" bgcolor="#fbfce2">
  94. <td width="8%">选择</td>
  95. <td width="5%">id</td>
  96. <td width="30%">标签</td>
  97. <td width="10%"><a href="tags_main.php?tag=<?php echo $tag;?>&orderby=count&orderway=<?php echo $neworderway;?>">点击</a></td>
  98. <td width="10%"><a href="tags_main.php?tag=<?php echo $tag;?>&orderby=total&orderway=<?php echo $neworderway;?>">文档数</a></td>
  99. <td width="10%"><a href="tags_main.php?tag=<?php echo $tag;?>&orderby=addtime&orderway=<?php echo $neworderway;?>">添加时间</a></td>
  100. <td width="10%">更新时间</td>
  101. <td width="22%">操作</td>
  102. </tr>
  103. <form name="form3" action="tags_main.php?action=delete" method="post">
  104. {dede:datalist empty='<tr><td colspan="8"><center>暂无内容</center></td></tr>'}
  105. <?php
  106. $fields['addtime'] = GetDateMk($fields['addtime']);
  107. $fields['uptime'] = GetDateMk($fields['uptime']);
  108. $fields['tag'] = dede_htmlspecialchars($fields['tag']);
  109. ?>
  110. <tr align="center" onmousemove="javascript:this.bgColor='#fbfce2';" onmouseout="javascript:this.bgColor='#ffffff';">
  111. <td><input type="checkbox" name="ids[]" value="<?php echo $fields['id'];?>"></td>
  112. <td>{dede:field.id/}</td>
  113. <td><a href="../apps/tags.php?/<?php echo $fields['id'];?>/" target="_blank">{dede:field.tag/}</a></td>
  114. <td><input type="text" value="<?php echo $fields['count'];?>" id="count<?php echo $fields['id'];?>" size='5'></td>
  115. <td><?php echo $fields['total'];?></td>
  116. <td><?php echo $fields['addtime'];?></td>
  117. <td><?php echo $fields['uptime'];?></td>
  118. <td>
  119. <a href='javascript:UpdateKwDes(<?php echo $fields['id'];?>,"<?php echo $fields['tag'];?>");' class="btn btn-success btn-sm">设置</a>
  120. <a href="javascript:UpdateOne(<?php echo $fields['id'];?>);" class="btn btn-success btn-sm">更新</a>
  121. <a href="makehtml_taglist.php?tagid=<?php echo $fields['id'];?>" class="btn btn-success btn-sm">生成</a>
  122. <a href="javascript:DeleteOne(<?php echo $fields['id'];?>);" class="btn btn-success btn-sm">删除</a>
  123. </td>
  124. </tr>
  125. {/dede:datalist}
  126. <tr>
  127. <td colspan="8">
  128. <label class="mr-2"><input type="checkbox" onclick="checkall(this.form,'ids')" name="all"> 全选</label>
  129. <button type="button" onclick="document.form3.submit()" class="btn btn-danger btn-sm">删除</button>
  130. </td>
  131. </tr>
  132. <tr>
  133. <td colspan="8" bgcolor="#f8f8f8" align="center" class="py-2">{dede:pagelist/}</td>
  134. </tr>
  135. </form>
  136. </table>
  137. </body>
  138. </html>