⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listfile.php

📁 相关软件: ·帝国网站管理系统(Ecms) v3.5 繁体版 ·搜索更多与"帝国网站管理系统(Ecms) "相关的软件 注意事项: ·注意:本站软件一律只用鼠标左键打开
💻 PHP
字号:
<?
require("../../class/connect.php");
include("../../class/db_sql.php");
include("../../class/config.php");
include("../../class/class.php");
include("../../class/functions.php");
include("../../data/language/fun.php");
$link=db_connect();
$empire=new mysqlquery();
//验证用户
$logininid=$_COOKIE['enewsloginuserid'];
$loginin=$_COOKIE['enewsloginusername'];
$loginrnd=$_COOKIE['enewsloginrnd'];
$loginlevel=$_COOKIE['enewsloginlevel'];
$editor=1;
is_login($logininid,$loginin,$loginrnd);
//验证权限
CheckLevel($logininid,$loginin,$classid,"file");
$page=$_GET['page'];
$start=$_GET['start'];
$line=20;//每页显示条数
$page_line=12;//每页显示链接数
if(empty($page))
{$page=0;}
if(empty($start))
{$start=0;}
$offset=$start+$page*$line;//总偏移量
$type=$_GET['type'];
//其他附件
if($type==9)
{$add="";}
else
{$add=" where type='$type'";}
if($type==0)
{$select0=" selected";}
elseif($type==1)
{$select1=" selected";}
elseif($type==2)
{$select2=" selected";}
elseif($type==3)
{$select3=" selected";}
else
{$select9=" selected";}
$search="&type=$type";
$query="select * from phome_enewsfile".$add;
$num=$empire->num($query);//取得总条数
$query=$query." order by fileid desc limit $offset,$line";
$sql=$empire->query($query);
$returnpage=page1($num,$line,$page_line,$start,$page,$search);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../data/images/css.css" rel="stylesheet" type="text/css">
<title>管理附件</title>
<script>
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall')
       e.checked = form.chkall.checked;
    }
  }
</script>
</head>

<body>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0">
  <tr>
    <td>位置:附件管理 -&gt; 附件管理</td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0">
  <tr>
    <td>类别: 
      <select name="type" id="type" onchange=window.location='ListFile.php?type='+this.options[this.selectedIndex].value>
        <option value="9"<?=$select9?>>所有类别</option>
        <option value="1"<?=$select1?>>图片</option>
        <option value="2"<?=$select2?>>Flash文件</option>
		<option value="3"<?=$select3?>>多媒体文件</option>
        <option value="0"<?=$select0?>>其他附件</option>
      </select></td>
  </tr>
</table>
<form name="form1" method="post" action="../enews.php" onsubmit="return confirm('确认要删除?');">
  <table width="98%%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
    <tr class="header"> 
      <td width="5%" height="25"><div align="center"><font color="#FFFFFF">ID</font></div></td>
      <td width="29%" height="25"><div align="center"><font color="#FFFFFF">文件名</font></div></td>
      <td width="10%" height="25"><div align="center"><font color="#FFFFFF">增加者</font></div></td>
      <td width="9%"><div align="center"><font color="#FFFFFF">文件大小</font></div></td>
      <td width="17%" height="25"><div align="center"><font color="#FFFFFF">增加时间</font></div></td>
      <td width="11%" height="25"><div align="center"><font color="#FFFFFF">操作</font></div></td>
    </tr>
    <?
	while($r=$empire->fetch($sql))
	{
		 //MB
  if($r[filesize]>=1024*1024)
  {
  $filesize=number_format($r[filesize]/(1024*1024),2,'.','')."&nbsp;MB";
  }
  //KB
  elseif($r[filesize]>=1024)
  {
  $filesize=number_format($r[filesize]/1024,2,'.','')."&nbsp;KB";
  }
  else
  {
  $filesize=$r[filesize]."&nbsp;Bytes";
  }
		 //按类别分
		if($r[classid])
			{
	$path1=$public_r[fileurl].$class_r[$r[classid]][classpath]."/".$r[path]."/".$r[filename];
            }
        else
			{
	$path1=$public_r[fileurl]."p/".$r[path]."/".$r[filename];
            }
	?>
    <tr bgcolor="#FFFFFF" id=file<?=$r[fileid]?>> 
      <td height="25"><div align="center"> 
          <?=$r[fileid]?>
        </div></td>
      <td height="25"><div align="center"> 
	<?=$r[no]?>	
	<br>
          <a href=<?=$path1?> target=_blank><?=$r[filename]?></a>
        </div></td>
      <td height="25"><div align="center"> 
          <?=$r[adduser]?>
        </div></td>
      <td><div align="center"> 
          <?=$filesize?>
        </div></td>
      <td height="25"><div align="center"> 
          <?=$r[filetime]?>
        </div></td>
      <td height="25"><div align="center">[<a href="../enews.php?enews=DelFile&fileid=<?=$r[fileid]?>" onclick="return confirm('您是否要删除?');">删除</a> 
          <input name="fileid[]" type="checkbox" id="fileid[]" value="<?=$r[fileid]?>" onclick="if(this.checked){file<?=$r[fileid]?>.style.backgroundColor='#DBEAF5';}else{file<?=$r[fileid]?>.style.backgroundColor='#ffffff';}">
          ]</div></td>
    </tr>
    <?
	}
	?>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" colspan="6"> 
        <?=$returnpage?>&nbsp;&nbsp;
        <input type="submit" name="Submit" value="批量删除"> <input name="enews" type="hidden" id="enews" value="DelFile_all">
        &nbsp;<input type=checkbox name=chkall value=on onClick=CheckAll(this.form)>
        选中全部</td>
    </tr>
  </table>
</form>
</body>
</html>
<?
db_close();
$empire=null;
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -