文件名 |
文件大小 |
最后修改时间 |
操作 |
read()) !== false)
{
if($file!="." && $file!=".." && !is_dir("$inpath/$file"))
{
@$filesize = filesize("$inpath/$file");
@$filesize=$filesize/1024;
@$filetime = filemtime("$inpath/$file");
@$filetime = MyDate("Y-m-d H:i:s",$filetime);
if($filesize<0.1)
{
@list($ty1,$ty2)=explode(".",$filesize);
$filesize=$ty1.".".substr($ty2,0,2);
}
else
{
@list($ty1,$ty2)=explode(".",$filesize);
$filesize=$ty1.".".substr($ty2,0,1);
}
}
if($file == ".")
{
continue;
}
else if($file == "..")
{
if($activepath == "")
{
continue;
}
$tmp = preg_replace("#[\/][^\/]*$#i","",$activepath);
$line = "\n
上级目录
|
当前目录:$activepath
[图片浏览器]
|
";
$dirs[] = $line;
}
else if(is_dir("$inpath/$file"))
{
if(preg_match("#^_(.*)$#i",$file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录
if(preg_match("#^\.(.*)$#i",$file)) continue;
$line = "\n
$file |
|
|
[改名]
[删除]
|
";
$dirs[] = $line;
}
else if(preg_match("#\.(gif|png)#i",$file))
{
$line = "\n
$file |
$filesize KB |
$filetime |
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(jpg)#i",$file))
{
$line = "\n
$file |
$filesize KB |
$filetime |
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(swf|fla|fly)#i",$file))
{
$line = "\n
$file |
$filesize KB |
$filetime |
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(zip|rar|tar.gz)#i",$file))
{
$line = "\n
$file |
$filesize KB |
$filetime |
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(exe)#i",$file))
{
$line = "\n
$file |
$filesize KB |
$filetime |
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(mp3|wma)#i",$file))
{
$line = "\n
$file |
$filesize KB |
$filetime |
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(wmv|api)#i",$file))
{
$line = "\n
$file |
$filesize KB |
$filetime |
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(rm|rmvb)#i",$file))
{
$line = "\n
$file |
$filesize KB |
$filetime |
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(txt|inc|pl|cgi|asp|xml|xsl|aspx|cfm)#",$file))
{
$edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
$line = "\n
$file |
$filesize KB |
$filetime |
[编辑]
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(htm|html)#i",$file))
{
$edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
$line = "\n
$file |
$filesize KB |
$filetime |
[编辑]
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(php)#i",$file))
{
$edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
$line = "\n
$file |
$filesize KB |
$filetime |
[编辑]
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(js)#i",$file))
{
$edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
$line = "\n
$file |
$filesize KB |
$filetime |
[编辑]
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else if(preg_match("#\.(css)#i",$file))
{
$edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
$line = "\n
$file |
$filesize KB |
$filetime |
[编辑]
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
else
{
$line = "\n
$file |
$filesize KB |
$filetime |
[改名]
[删除]
[移动]
|
";
$files[] = $line;
}
}
$dh->close();
foreach ($dirs as $dir)
{
echo $dir;
}
foreach ($files as $file)
{
echo $file;
}
?>
[根目录]
[新建文件]
[新建目录]
[文件上传]
[空间检查]
|