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

104 lines
3.6KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <title>系统日志列表</title>
  7. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="../static/web/css/admin.css">
  10. </head>
  11. <body>
  12. <form name="formsearch">
  13. <table align="center" class="table maintable my-3">
  14. <tr>
  15. <td bgcolor="#f5f5f5">
  16. <input type="text" name="cip" id="cip" placeholder="请输入ip地址" class="admin-input-lg mr-3">
  17. <select name="adminid" id="adminid" class="admin-input-sm mr-3">
  18. <option value="0" selected>全部</option>
  19. <?php echo $adminlist?>
  20. </select>
  21. <select name="dtime" id="dtime" class="admin-input-sm mr-3">
  22. <option value="0" selected>全部</option>
  23. <option value="7">一周内</option>
  24. <option value="15">15天内</option>
  25. <option value="30">30天以内</option>
  26. <option value="60">60天以内</option>
  27. </select>
  28. <button type="submit" class="btn btn-success btn-sm">搜索</button>
  29. </td>
  30. </tr>
  31. </table>
  32. </form>
  33. <form name="form1">
  34. <table align="center" class="table maintable mb-3">
  35. <tr>
  36. <td bgcolor="#f5f5f5" colspan="7">日志管理</td>
  37. </tr>
  38. <tr bgcolor="#e9ecef" align="center">
  39. <td width="6%">选择</td>
  40. <td width="12%">管理员</td>
  41. <td width="30%">浏览文件</td>
  42. <td width="6%">访问方式</td>
  43. <td width="10%">地址</td>
  44. <td width="10%">时间</td>
  45. <td>参数</td>
  46. </tr>
  47. {dede:datalist empty='<tr><td colspan="7" align="center">暂无记录</td></tr>'}
  48. <tr align="center">
  49. <td><input type="checkbox" name="logs" id="logs" value="{dede:field.lid/}"></td>
  50. <td>{dede:field.userid/}</td>
  51. <td><input type="text" name="t0" value="{dede:field.filename/}" class="admin-input-lg"></td>
  52. <td>{dede:field.method/}</td>
  53. <td>{dede:field.cip/}</td>
  54. <td>{dede:field.dtime function="MyDate('y/m/d H:i:s',@me)"/}</td>
  55. <td><input type="text" name="t1" value="{dede:field.query/}" class="admin-input-lg"></td>
  56. </tr>
  57. {/dede:datalist}
  58. <tr>
  59. <td colspan="7">
  60. <button type="button" onclick="ReSel();" class="btn btn-success btn-sm">反选</button>
  61. <button type="button" onclick="DelSel();" class="btn btn-danger btn-sm">删除</button>
  62. <button type="button" onclick="ClearLog();" class="btn btn-danger btn-sm">清空所有日志</button>
  63. </td>
  64. </tr>
  65. <tr>
  66. <td bgcolor="#f5f5f5" colspan="7" align="center">{dede:pagelist listsize='6'/}</td>
  67. </tr>
  68. </table>
  69. </form>
  70. <script>
  71. //获得选中文件的文件名
  72. function getCheckboxItem() {
  73. var allSel = "";
  74. if (document.form1.logs.value) return document.form1.logs.value;
  75. for (i = 0; i < document.form1.logs.length; i++) {
  76. if (document.form1.logs[i].checked) {
  77. if (allSel == "")
  78. allSel = document.form1.logs[i].value;
  79. else
  80. allSel = allSel + "`" + document.form1.logs[i].value;
  81. }
  82. }
  83. return allSel;
  84. }
  85. function ReSel() {
  86. for (i = 0; i < document.form1.logs.length; i++) {
  87. if (document.form1.logs[i].checked) document.form1.logs[i].checked = false;
  88. else document.form1.logs[i].checked = true;
  89. }
  90. }
  91. function DelSel() {
  92. var nid = getCheckboxItem();
  93. if (nid == "") {
  94. alert("请选择项目");
  95. return;
  96. }
  97. location.href = "log_edit.php?dopost=del&ids=" + nid;
  98. }
  99. function ClearLog() {
  100. location.href = "log_edit.php?dopost=clear";
  101. }
  102. </script>
  103. </body>
  104. </html>