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

126 lines
5.1KB

  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. <style>
  11. .napisdiv {
  12. left: 10;
  13. top: 0;
  14. width: 150px;
  15. height: 100px;
  16. position: absolute;
  17. z-index: 3
  18. }
  19. </style>
  20. <script>
  21. //获得选中文件的文件名
  22. function getCheckboxItem() {
  23. var allSel = "";
  24. if (document.form1.aids.value) return document.form1.aids.value;
  25. for (i = 0; i < document.form1.aids.length; i++) {
  26. if (document.form1.aids[i].checked) {
  27. if (allSel == "")
  28. allSel = document.form1.aids[i].value;
  29. else
  30. allSel = allSel + "," + document.form1.aids[i].value;
  31. }
  32. }
  33. return allSel;
  34. }
  35. function AllSel() {
  36. for (i = 0; i < document.form1.aids.length; i++) {
  37. document.form1.aids[i].checked = true;
  38. }
  39. }
  40. function NoneSel() {
  41. for (i = 0; i < document.form1.aids.length; i++) {
  42. document.form1.aids[i].checked = false;
  43. }
  44. }
  45. function DelSel() {
  46. var nid = getCheckboxItem();
  47. if (nid == "") {
  48. alert("请选择项目");
  49. return;
  50. }
  51. location.href = "media_edit.php?dopost=del&ids=" + nid;
  52. }
  53. </script>
  54. </head>
  55. <body>
  56. <table width="98%" cellpadding="3" cellspacing="1" align="center" class="table maintable mt-3 mb-3">
  57. <form name="forms" method="post" action="media_main.php">
  58. <tr bgcolor="#f8f8f8">
  59. <td width="280" align="center">
  60. <input type="text" name="keyword" id="keyword" placeholder="请输入关键词" value="<?php echo $keyword?>" style="width:260px">
  61. </td>
  62. <td width="170">
  63. <select name="mediatype" style="width:160px">
  64. <option value="0">文件类型</option>
  65. <option value="1" <?php if($mediatype==1) echo "selected"?>>图片</option>
  66. <option value="2" <?php if($mediatype==2) echo "selected"?>>FLASH</option>
  67. <option value="3" <?php if($mediatype==3) echo "selected"?>>视频音频</option>
  68. <option value="4" <?php if($mediatype==4) echo "selected"?>>其它附件</option>
  69. </select>
  70. </td>
  71. <td width="170">
  72. <select name="membertype" style="width:160px">
  73. <option value="0">用户组</option>
  74. <option value="1" <?php if($membertype==1) echo "selected"?>>管理员</option>
  75. <option value="2" <?php if($membertype==2) echo "selected"?>>外部会员</option>
  76. </select>
  77. </td>
  78. <td>
  79. <button type="submit" class="btn btn-success btn-sm">搜索</button>
  80. <a href="media_add.php" class="btn btn-success btn-sm">上传新文件</a>
  81. </td>
  82. </tr>
  83. </form>
  84. </table>
  85. <table width="98%" cellpadding="3" cellspacing="1" align="center" class="table maintable mb-3">
  86. <tr>
  87. <td bgcolor="#f8f8f8" colspan="7">附件数据管理</td>
  88. </tr>
  89. <tr bgcolor="#fbfce2" align="center">
  90. <td width="8%">选择</td>
  91. <td width="28%">文件标题</td>
  92. <td width="10%">文件大小</td>
  93. <td width="15%">上传会员</td>
  94. <td width="15%">上传时间</td>
  95. <td width="9%">文件类型</td>
  96. <td width="15%">管理</td>
  97. </tr>
  98. <form name="form1">
  99. {dede:datalist empty='<tr><td colspan="7"><center>暂无内容</center></td></tr>'}
  100. <tr align="center" onmousemove="javascript:this.bgColor='#fbfce2';" onmouseout="javascript:this.bgColor='#ffffff';">
  101. <td><input type="checkbox" name="aids" id="aids{dede:field.aid/}" value="{dede:field.aid/}"></td>
  102. <td><a href="{dede:field.url/}" title="{dede:field.url/}" target="_blank">{dede:field.title/}</a></td>
  103. <td>{dede:field.filesize function='GetFileSize(@me)'/}</td>
  104. <td>{dede:field.adminname function="UploadAdmin(@me,$fields['membername'])"/}</td>
  105. <td>{dede:field.uptime function="MyDate('Y-m-d H:i',@me)"/}</td>
  106. <td>{dede:field.mediatype function="MediaType(@me,$fields['url'])"/}</td>
  107. <td>
  108. <a href="media_edit.php?aid={dede:field.aid/}&dopost=edit" class="btn btn-success btn-sm"><i class="fa fa-pencil-square-o"></i> 修改</a>
  109. <a href="media_edit.php?aid={dede:field.aid/}&dopost=del" class="btn btn-success btn-sm"><i class="fa fa-trash"></i> 删除</a>
  110. </td>
  111. </tr>
  112. {/dede:datalist}
  113. <tr>
  114. <td colspan="7">
  115. <button type="button" name="b4" class="btn btn-success btn-sm" onClick="AllSel();">全选</button>
  116. <button type="button" name="b5" class="btn btn-success btn-sm" onClick="NoneSel();">取消</button>
  117. <button type="button" name="b6" class="btn btn-success btn-sm" onClick="DelSel();">删除</button>
  118. </td>
  119. </tr>
  120. <tr bgcolor="#f8f8f8" class="py-2">
  121. <td colspan="7" align="center">{dede:pagelist listsize='6'/}</td>
  122. </tr>
  123. </form>
  124. </table>
  125. </body>
  126. </html>