|
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="<?php echo $cfg_soft_lang;?>">
- <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
- <title>附件数据管理</title>
- <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
- <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
- <link rel="stylesheet" href="../static/web/css/admin.css">
- <style>.napisdiv{position:absolute;left:10;top:0;width:150px;height:100px;z-index:3}</style>
- <script>
- //获得选中文件的文件名
- function getCheckboxItem() {
- var allSel = "";
- if (document.form1.aids.value) return document.form1.aids.value;
- for (i = 0; i < document.form1.aids.length; i++) {
- if (document.form1.aids[i].checked) {
- if (allSel == "")
- allSel = document.form1.aids[i].value;
- else
- allSel = allSel + "," + document.form1.aids[i].value;
- }
- }
- return allSel;
- }
- function AllSel() {
- for (i = 0; i < document.form1.aids.length; i++) {
- document.form1.aids[i].checked = true;
- }
- }
- function NoneSel() {
- for (i = 0; i < document.form1.aids.length; i++) {
- document.form1.aids[i].checked = false;
- }
- }
- function DelSel() {
- var nid = getCheckboxItem();
- if (nid == "") {
- alert("请选择项目");
- return;
- }
- location.href = "media_edit.php?dopost=del&ids=" + nid;
- }
- </script>
- </head>
- <body>
- <table width="98%" cellpadding="3" cellspacing="1" align="center" class="table maintable my-3">
- <form name="forms" method="post" action="media_main.php">
- <tr bgcolor="#f5f5f5">
- <td width="280" align="center">
- <input type="text" name="keyword" id="keyword" placeholder="请输入关键词" value="<?php echo $keyword?>" class="biz-input-md">
- </td>
- <td width="170">
- <select name="mediatype" class="biz-input-sm">
- <option value="0">文件类型</option>
- <option value="1" <?php if ($mediatype==1) echo "selected"?>>图片</option>
- <option value="2" <?php if ($mediatype==2) echo "selected"?>>FLASH</option>
- <option value="3" <?php if ($mediatype==3) echo "selected"?>>视频音频</option>
- <option value="4" <?php if ($mediatype==4) echo "selected"?>>其它附件</option>
- </select>
- </td>
- <td width="170">
- <select name="membertype" class="biz-input-sm">
- <option value="0">用户组</option>
- <option value="1" <?php if ($membertype==1) echo "selected"?>>管理员</option>
- <option value="2" <?php if ($membertype==2) echo "selected"?>>外部会员</option>
- </select>
- </td>
- <td>
- <button type="submit" class="btn btn-success btn-sm">搜索</button>
- <a href="media_add.php" class="btn btn-success btn-sm">上传新文件</a>
- </td>
- </tr>
- </form>
- </table>
- <table width="98%" cellpadding="3" cellspacing="1" align="center" class="table maintable mb-3">
- <tr>
- <td bgcolor="#f5f5f5" colspan="7">附件数据管理</td>
- </tr>
- <tr bgcolor="#fbfce2" align="center">
- <td width="6%">选择</td>
- <td width="28%">文件标题</td>
- <td width="10%">文件大小</td>
- <td width="15%">上传会员</td>
- <td width="15%">上传时间</td>
- <td width="10%">文件类型</td>
- <td>管理</td>
- </tr>
- <form name="form1">
- {dede:datalist empty='<tr><td colspan="7"><center>暂无内容</center></td></tr>'}
- <tr align="center" onmousemove="javascript:this.bgColor='#fbfce2';" onmouseout="javascript:this.bgColor='#ffffff';">
- <td><input type="checkbox" name="aids" id="aids{dede:field.aid/}" value="{dede:field.aid/}"></td>
- <td><a href="{dede:field.url/}" title="{dede:field.url/}" target="_blank">{dede:field.title/}</a></td>
- <td>{dede:field.filesize function='GetFileSize(@me)'/}</td>
- <td>{dede:field.adminname function="UploadAdmin(@me,$fields['membername'])"/}</td>
- <td>{dede:field.uptime function="MyDate('Y-m-d H:i',@me)"/}</td>
- <td>{dede:field.mediatype function="MediaType(@me,$fields['url'])"/}</td>
- <td>
- <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>
- <a href="media_edit.php?aid={dede:field.aid/}&dopost=del" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i> 删除</a>
- </td>
- </tr>
- {/dede:datalist}
- <tr>
- <td colspan="7">
- <button type="button" name="b4" onClick="AllSel();" class="btn btn-success btn-sm">全选</button>
- <button type="button" name="b5" onClick="NoneSel();" class="btn btn-success btn-sm">取消</button>
- <button type="button" name="b6" onClick="DelSel();" class="btn btn-danger btn-sm">删除</button>
- </td>
- </tr>
- <tr bgcolor="#f5f5f5" class="py-2">
- <td colspan="7" align="center">{dede:pagelist listsize='6'/}</td>
- </tr>
- </form>
- </table>
- </body>
- </html>
|