Edit File by line
/home/barbar84/www/extracte.../dirfunc
File: index.php
<?php
[0] Fix | Delete
require_once 'dir.func.php';
[1] Fix | Delete
require_once 'file.func.php';
[2] Fix | Delete
require_once 'common.func.php';
[3] Fix | Delete
[4] Fix | Delete
[5] Fix | Delete
[6] Fix | Delete
$path = $_SERVER['DOCUMENT_ROOT'];
[7] Fix | Delete
$path = isset($_GET['path']) ? $_GET['path'] : $_SERVER['DOCUMENT_ROOT'];
[8] Fix | Delete
//$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
[9] Fix | Delete
$act = isset($_REQUEST['act']) ? $_REQUEST['act'] : null;
[10] Fix | Delete
$filename = isset($_REQUEST['filename']) ? $_REQUEST['filename'] : null;
[11] Fix | Delete
$dirname = isset($_REQUEST['dirname']) ? $_REQUEST['dirname'] : null;
[12] Fix | Delete
[13] Fix | Delete
$info = readDirectory($path);
[14] Fix | Delete
if (!$info) {
[15] Fix | Delete
echo "<script>alert('没有文件或目录!!!');location.href='index.php';</script>";
[16] Fix | Delete
}
[17] Fix | Delete
//print_r($info);
[18] Fix | Delete
$redirect="index.php?path={$path}";
[19] Fix | Delete
if($act=="创建文件"){
[20] Fix | Delete
//创建文件
[21] Fix | Delete
// echo $path,"--";
[22] Fix | Delete
// echo $filename;
[23] Fix | Delete
$mes=createFile($path."/".$filename);
[24] Fix | Delete
alertMes($mes,$redirect);
[25] Fix | Delete
}elseif($act=="showContent"){
[26] Fix | Delete
//查看文件内容
[27] Fix | Delete
$content=file_get_contents($filename);
[28] Fix | Delete
//echo "<textarea readonly='readonly' cols='100' rows='10'>{$content}</textarea>";
[29] Fix | Delete
//高亮显示PHP代码
[30] Fix | Delete
//高亮显示字符串中的PHP代码
[31] Fix | Delete
if(strlen($content)){
[32] Fix | Delete
$newContent=highlight_string($content,true);
[33] Fix | Delete
//高亮显示文件中的PHP代码
[34] Fix | Delete
//highlight_file($filename);
[35] Fix | Delete
$str=<<<EOF
[36] Fix | Delete
<table width='100%' bgcolor='pink' cellpadding='5' cellspacing="0" >
[37] Fix | Delete
<tr>
[38] Fix | Delete
<td>{$newContent}</td>
[39] Fix | Delete
</tr>
[40] Fix | Delete
</table>
[41] Fix | Delete
EOF;
[42] Fix | Delete
echo $str;
[43] Fix | Delete
}else{
[44] Fix | Delete
alertMes("文件没有内容,请编辑再查看!",$redirect);
[45] Fix | Delete
}
[46] Fix | Delete
}elseif($act=="editContent"){
[47] Fix | Delete
//修改文件内容
[48] Fix | Delete
//echo "编辑文件";
[49] Fix | Delete
$content=file_get_contents($filename);
[50] Fix | Delete
//echo $content;
[51] Fix | Delete
$str=<<<EOF
[52] Fix | Delete
<form action='index.php?act=doEdit' method='post'>
[53] Fix | Delete
<textarea name='content' cols='190' rows='10'>{$content}</textarea><br/>
[54] Fix | Delete
<input type='hidden' name='filename' value='{$filename}'/>
[55] Fix | Delete
<input type="hidden" name="path" value="{$path}" />
[56] Fix | Delete
<input type="submit" value="修改文件内容"/>
[57] Fix | Delete
</form>
[58] Fix | Delete
EOF;
[59] Fix | Delete
echo $str;
[60] Fix | Delete
}elseif($act=="doEdit"){
[61] Fix | Delete
//修改文件内容的操作
[62] Fix | Delete
$content=$_REQUEST['content'];
[63] Fix | Delete
//echo $content;
[64] Fix | Delete
if(file_put_contents($filename,$content)){
[65] Fix | Delete
$mes="文件修改成功";
[66] Fix | Delete
}else{
[67] Fix | Delete
$mes="文件修改失败";
[68] Fix | Delete
}
[69] Fix | Delete
alertMes($mes,$redirect);
[70] Fix | Delete
}elseif($act=="renameFile"){
[71] Fix | Delete
//完成重命名
[72] Fix | Delete
$str=<<<EOF
[73] Fix | Delete
<form action="index.php?act=doRename" method="post">
[74] Fix | Delete
请填写新文件名:<input type="text" name="newname" placeholder="重命名"/>
[75] Fix | Delete
<input type='hidden' name='filename' value='{$filename}' />
[76] Fix | Delete
<input type="submit" value="重命名"/>
[77] Fix | Delete
</form>
[78] Fix | Delete
EOF;
[79] Fix | Delete
echo $str;
[80] Fix | Delete
}elseif($act=="doRename"){
[81] Fix | Delete
//实现重命名的操做
[82] Fix | Delete
$newname=$_REQUEST['newname'];
[83] Fix | Delete
$mes=renameFile($filename,$newname);
[84] Fix | Delete
alertMes($mes,$redirect);
[85] Fix | Delete
}elseif($act=="delFile"){
[86] Fix | Delete
$mes=delFile($filename);
[87] Fix | Delete
alertMes($mes,$redirect);
[88] Fix | Delete
}elseif($act=="downFile"){
[89] Fix | Delete
//完成下载的操作
[90] Fix | Delete
$mes=downFile($filename);
[91] Fix | Delete
}elseif($act=="创建文件夹"){
[92] Fix | Delete
$mes=createFolder($path."/".$dirname);
[93] Fix | Delete
alertMes($mes,$redirect);
[94] Fix | Delete
}elseif($act=="renameFolder"){
[95] Fix | Delete
$str=<<<EOF
[96] Fix | Delete
<form action="index.php?act=doRenameFolder" method="post">
[97] Fix | Delete
请填写新文件夹名称:<input type="text" name="newname" placeholder="重命名"/>
[98] Fix | Delete
<input type="hidden" name="path" value="{$path}" />
[99] Fix | Delete
<input type='hidden' name='dirname' value='{$dirname}' />
[100] Fix | Delete
<input type="submit" value="重命名"/>
[101] Fix | Delete
</form>
[102] Fix | Delete
EOF;
[103] Fix | Delete
echo $str;
[104] Fix | Delete
}elseif($act=="doRenameFolder"){
[105] Fix | Delete
$newname=$_REQUEST['newname'];
[106] Fix | Delete
//echo $newname,"-",$dirname,"-",$path;
[107] Fix | Delete
$mes=renameFolder($dirname,$path."/".$newname);
[108] Fix | Delete
alertMes($mes,$redirect);
[109] Fix | Delete
}elseif($act=="copyFolder"){
[110] Fix | Delete
$str=<<<EOF
[111] Fix | Delete
<form action="index.php?act=doCopyFolder" method="post">
[112] Fix | Delete
将文件夹复制到:<input type="text" name="dstname" placeholder="将文件夹复制到"/>
[113] Fix | Delete
<input type="hidden" name="path" value="{$path}" />
[114] Fix | Delete
<input type='hidden' name='dirname' value='{$dirname}' />
[115] Fix | Delete
<input type="submit" value="复制文件夹"/>
[116] Fix | Delete
</form>
[117] Fix | Delete
EOF;
[118] Fix | Delete
echo $str;
[119] Fix | Delete
}elseif($act=="doCopyFolder"){
[120] Fix | Delete
$dstname=$_REQUEST['dstname'];
[121] Fix | Delete
$mes=copyFolder($dirname,$path."/".$dstname."/".basename($dirname));
[122] Fix | Delete
alertMes($mes,$redirect);
[123] Fix | Delete
}elseif($act=="cutFolder"){
[124] Fix | Delete
$str=<<<EOF
[125] Fix | Delete
<form action="index.php?act=doCutFolder" method="post">
[126] Fix | Delete
将文件夹剪切到:<input type="text" name="dstname" placeholder="将文件剪切到"/>
[127] Fix | Delete
<input type="hidden" name="path" value="{$path}" />
[128] Fix | Delete
<input type='hidden' name='dirname' value='{$dirname}' />
[129] Fix | Delete
<input type="submit" value="剪切文件夹"/>
[130] Fix | Delete
</form>
[131] Fix | Delete
EOF;
[132] Fix | Delete
echo $str;
[133] Fix | Delete
}elseif($act=="doCutFolder"){
[134] Fix | Delete
//echo "文件夹被剪切了";
[135] Fix | Delete
$dstname=$_REQUEST['dstname'];
[136] Fix | Delete
$mes=cutFolder($dirname,$path."/".$dstname);
[137] Fix | Delete
alertMes($mes,$redirect);
[138] Fix | Delete
}elseif($act=="delFolder"){
[139] Fix | Delete
//完成删除文件夹的操作
[140] Fix | Delete
//echo "文件夹被删除了";
[141] Fix | Delete
$mes=delFolder($dirname);
[142] Fix | Delete
alertMes($mes,$redirect);
[143] Fix | Delete
}elseif($act=="copyFile"){
[144] Fix | Delete
$str=<<<EOF
[145] Fix | Delete
<form action="index.php?act=doCopyFile" method="post">
[146] Fix | Delete
将文件复制到:<input type="text" name="dstname" placeholder="将文件复制到"/>
[147] Fix | Delete
<input type="hidden" name="path" value="{$path}" />
[148] Fix | Delete
<input type='hidden' name='filename' value='{$filename}' />
[149] Fix | Delete
<input type="submit" value="复制文件"/>
[150] Fix | Delete
</form>
[151] Fix | Delete
EOF;
[152] Fix | Delete
echo $str;
[153] Fix | Delete
}elseif($act=="doCopyFile"){
[154] Fix | Delete
$dstname=$_REQUEST['dstname'];
[155] Fix | Delete
$mes=copyFile($filename,$path."/".$dstname);
[156] Fix | Delete
alertMes($mes,$redirect);
[157] Fix | Delete
}elseif($act=="cutFile"){
[158] Fix | Delete
$str=<<<EOF
[159] Fix | Delete
<form action="index.php?act=doCutFile" method="post">
[160] Fix | Delete
将文件剪切到:<input type="text" name="dstname" placeholder="将文件剪切到"/>
[161] Fix | Delete
<input type="hidden" name="path" value="{$path}" />
[162] Fix | Delete
<input type='hidden' name='filename' value='{$filename}' />
[163] Fix | Delete
<input type="submit" value="剪切文件"/>
[164] Fix | Delete
</form>
[165] Fix | Delete
EOF;
[166] Fix | Delete
echo $str;
[167] Fix | Delete
}elseif($act=="doCutFile"){
[168] Fix | Delete
$dstname=$_REQUEST['dstname'];
[169] Fix | Delete
$mes=cutFile($filename,$path."/".$dstname);
[170] Fix | Delete
alertMes($mes,$redirect);
[171] Fix | Delete
}elseif($act=="上传文件"){
[172] Fix | Delete
//print_r($_FILES);
[173] Fix | Delete
$fileInfo=$_FILES['myFile'];
[174] Fix | Delete
$mes=uploadFile($fileInfo,$path);
[175] Fix | Delete
alertMes($mes, $redirect);
[176] Fix | Delete
}
[177] Fix | Delete
?>
[178] Fix | Delete
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[179] Fix | Delete
<html xmlns="http://www.w3.org/1999/xhtml">
[180] Fix | Delete
<head>
[181] Fix | Delete
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
[182] Fix | Delete
<title>File Manager</title>
[183] Fix | Delete
<link rel="stylesheet" href="cikonss.css" />
[184] Fix | Delete
<script src="jquery-ui/js/jquery-1.10.2.js"></script>
[185] Fix | Delete
<script src="jquery-ui/js/jquery-ui-1.10.4.custom.js"></script>
[186] Fix | Delete
<script src="jquery-ui/js/jquery-ui-1.10.4.custom.min.js"></script>
[187] Fix | Delete
<link rel="stylesheet" href="jquery-ui/css/ui-lightness/jquery-ui-1.10.4.custom.css" type="text/css"/>
[188] Fix | Delete
<style type="text/css">
[189] Fix | Delete
body,p,div,ul,ol,table,dl,dd,dt{
[190] Fix | Delete
margin:0;
[191] Fix | Delete
padding: 0;
[192] Fix | Delete
}
[193] Fix | Delete
a{
[194] Fix | Delete
text-decoration: none;
[195] Fix | Delete
}
[196] Fix | Delete
ul,li{
[197] Fix | Delete
list-style: none;
[198] Fix | Delete
float: left;
[199] Fix | Delete
}
[200] Fix | Delete
#top{
[201] Fix | Delete
width:100%;
[202] Fix | Delete
height:48px;
[203] Fix | Delete
margin:0 auto;
[204] Fix | Delete
background: #E2E2E2;
[205] Fix | Delete
}
[206] Fix | Delete
#navi a{
[207] Fix | Delete
display: block;
[208] Fix | Delete
width:48px;
[209] Fix | Delete
height: 48px;
[210] Fix | Delete
}
[211] Fix | Delete
#main{
[212] Fix | Delete
margin:0 auto;
[213] Fix | Delete
border:2px solid #ABCDEF;
[214] Fix | Delete
}
[215] Fix | Delete
.small{
[216] Fix | Delete
width:25px;
[217] Fix | Delete
height:25px;
[218] Fix | Delete
border:0;
[219] Fix | Delete
}
[220] Fix | Delete
</style>
[221] Fix | Delete
<script type="text/javascript">
[222] Fix | Delete
function show(dis){
[223] Fix | Delete
document.getElementById(dis).style.display="block";
[224] Fix | Delete
}
[225] Fix | Delete
function delFile(filename,path){
[226] Fix | Delete
if(window.confirm("您确定要删除嘛?删除之后无法恢复哟!!!")){
[227] Fix | Delete
location.href="index.php?act=delFile&filename="+filename+"&path="+path;
[228] Fix | Delete
}
[229] Fix | Delete
}
[230] Fix | Delete
function delFolder(dirname,path){
[231] Fix | Delete
if(window.confirm("您确定要删除嘛?删除之后无法恢复哟!!!")){
[232] Fix | Delete
location.href="index.php?act=delFolder&dirname="+dirname+"&path="+path;
[233] Fix | Delete
}
[234] Fix | Delete
}
[235] Fix | Delete
function showDetail(t,filename){
[236] Fix | Delete
$("#showImg").attr("src",filename);
[237] Fix | Delete
$("#showDetail").dialog({
[238] Fix | Delete
height:"auto",
[239] Fix | Delete
width: "auto",
[240] Fix | Delete
position: {my: "center", at: "center", collision:"fit"},
[241] Fix | Delete
modal:false,//是否模式对话框
[242] Fix | Delete
draggable:true,//是否允许拖拽
[243] Fix | Delete
resizable:true,//是否允许拖动
[244] Fix | Delete
title:t,//对话框标题
[245] Fix | Delete
show:"slide",
[246] Fix | Delete
hide:"explode"
[247] Fix | Delete
});
[248] Fix | Delete
}
[249] Fix | Delete
function goBack($back){
[250] Fix | Delete
location.href="index.php?path="+$back;
[251] Fix | Delete
}
[252] Fix | Delete
</script>
[253] Fix | Delete
</head>
[254] Fix | Delete
[255] Fix | Delete
<body>
[256] Fix | Delete
<div id="showDetail" style="display:none"><img src="" id="showImg" alt=""/></div>
[257] Fix | Delete
<h1>在线文件管理器</h1>
[258] Fix | Delete
<div id="top">
[259] Fix | Delete
<ul id="navi">
[260] Fix | Delete
<li><a href="index.php" title="主目录"><span style="margin-left: 8px; margin-top: 0px; top: 4px;" class="icon icon-small icon-square"><span class="icon-home"></span></span></a></li>
[261] Fix | Delete
<li><a href="#" onclick="show('createFile')" title="新建文件" ><span style="margin-left: 8px; margin-top: 0px; top: 4px;" class="icon icon-small icon-square"><span class="icon-file"></span></span></a></li>
[262] Fix | Delete
<li><a href="#" onclick="show('createFolder')" title="新建文件夹"><span style="margin-left: 8px; margin-top: 0px; top: 4px;" class="icon icon-small icon-square"><span class="icon-folder"></span></span></a></li>
[263] Fix | Delete
<li><a href="#" onclick="show('uploadFile')"title="上传文件"><span style="margin-left: 8px; margin-top: 0px; top: 4px;" class="icon icon-small icon-square"><span class="icon-upload"></span></span></a></li>
[264] Fix | Delete
<?php
[265] Fix | Delete
$back=($path=="file")?"file":dirname($path);
[266] Fix | Delete
?>
[267] Fix | Delete
<li><a href="#" title="返回上级目录" onclick="goBack('<?php echo $back;?>')"><span style="margin-left: 8px; margin-top: 0px; top: 4px;" class="icon icon-small icon-square"><span class="icon-arrowLeft"></span></span></a></li>
[268] Fix | Delete
</ul>
[269] Fix | Delete
</div>
[270] Fix | Delete
<form action="index.php" method="post" enctype="multipart/form-data">
[271] Fix | Delete
<table width="100%" border="1" cellpadding="5" cellspacing="0" bgcolor="#ABCDEF" align="center">
[272] Fix | Delete
<tr id="createFolder" style="display:none;">
[273] Fix | Delete
<td>请输入文件夹名称</td>
[274] Fix | Delete
<td >
[275] Fix | Delete
<input type="text" name="dirname" />
[276] Fix | Delete
<input type="hidden" name="path" value="<?php echo $path;?>"/>
[277] Fix | Delete
<input type="submit" name="act" value="创建文件夹"/>
[278] Fix | Delete
</td>
[279] Fix | Delete
</tr>
[280] Fix | Delete
<tr id="createFile" style="display:none;">
[281] Fix | Delete
<td>请输入文件名称</td>
[282] Fix | Delete
<td >
[283] Fix | Delete
<input type="text" name="filename" />
[284] Fix | Delete
<input type="hidden" name="path" value="<?php echo $path;?>"/>
[285] Fix | Delete
<input type="submit" name="act" value="创建文件" />
[286] Fix | Delete
</td>
[287] Fix | Delete
</tr>
[288] Fix | Delete
<tr id="uploadFile" style="display:none;">
[289] Fix | Delete
<td >请选择要上传的文件</td>
[290] Fix | Delete
<td ><input type="file" name="myFile" />
[291] Fix | Delete
<input type="submit" name="act" value="上传文件" />
[292] Fix | Delete
</td>
[293] Fix | Delete
</tr>
[294] Fix | Delete
<tr>
[295] Fix | Delete
<td>编号</td>
[296] Fix | Delete
<td>名称</td>
[297] Fix | Delete
<td>类型</td>
[298] Fix | Delete
<td>大小</td>
[299] Fix | Delete
<td>可读</td>
[300] Fix | Delete
<td>可写</td>
[301] Fix | Delete
<td>可执行</td>
[302] Fix | Delete
<td>创建时间</td>
[303] Fix | Delete
<td>修改时间</td>
[304] Fix | Delete
<td>访问时间</td>
[305] Fix | Delete
<td>操作</td>
[306] Fix | Delete
</tr>
[307] Fix | Delete
<?php
[308] Fix | Delete
if($info['file']){
[309] Fix | Delete
$i=1;
[310] Fix | Delete
foreach($info['file'] as $val){
[311] Fix | Delete
$p=$path."/".$val;
[312] Fix | Delete
?>
[313] Fix | Delete
<tr>
[314] Fix | Delete
<td><?php echo $i;?></td>
[315] Fix | Delete
<td><?php echo $val;?></td>
[316] Fix | Delete
<td><?php $src=filetype($p)=="file"?"file_ico.png":"folder_ico.png";?><img src="images/<?php echo $src;?>" alt="" title="文件"/></td>
[317] Fix | Delete
<td><?php echo transByte(filesize($p));?></td>
[318] Fix | Delete
<td><?php $src=is_readable($p)?"correct.png":"error.png";?><img class="small" src="images/<?php echo $src;?>" alt=""/></td>
[319] Fix | Delete
<td><?php $src=is_writable($p)?"correct.png":"error.png";?><img class="small" src="images/<?php echo $src;?>" alt=""/></td>
[320] Fix | Delete
<td><?php $src=is_executable($p)?"correct.png":"error.png";?><img class="small" src="images/<?php echo $src;?>" alt=""/></td>
[321] Fix | Delete
<td><?php echo date("Y-m-d H:i:s",filectime($p));?></td>
[322] Fix | Delete
<td><?php echo date("Y-m-d H:i:s",filemtime($p));?></td>
[323] Fix | Delete
<td><?php echo date("Y-m-d H:i:s",fileatime($p));?></td>
[324] Fix | Delete
<td>
[325] Fix | Delete
<?php
[326] Fix | Delete
//得到文件扩展名
[327] Fix | Delete
$extArray = explode(".", $val);
[328] Fix | Delete
$ext = strtolower(end($extArray));
[329] Fix | Delete
$imageExt = array("gif", "jpg", "jpeg", "png");
[330] Fix | Delete
if(in_array($ext,$imageExt)){
[331] Fix | Delete
?>
[332] Fix | Delete
<a href="#" onclick="showDetail('<?php echo $val;?>','<?php echo $p;?>')"><img class="small" src="images/show.png" alt="" title="查看"/></a>|
[333] Fix | Delete
<?php
[334] Fix | Delete
}else{
[335] Fix | Delete
?>
[336] Fix | Delete
<a href="index.php?act=showContent&path=<?php echo $path;?>&filename=<?php echo $p;?>" ><img class="small" src="images/show.png" alt="" title="查看"/></a>|
[337] Fix | Delete
<?php }?>
[338] Fix | Delete
<a href="index.php?act=editContent&path=<?php echo $path;?>&filename=<?php echo $p;?>"><img class="small" src="images/edit.png" alt="" title="修改"/></a>|
[339] Fix | Delete
<a href="index.php?act=renameFile&path=<?php echo $path;?>&filename=<?php echo $p;?>"><img class="small" src="images/rename.png" alt="" title="重命名"/></a>|
[340] Fix | Delete
<a href="index.php?act=copyFile&path=<?php echo $path;?>&filename=<?php echo $p;?>"><img class="small" src="images/copy.png" alt="" title="复制"/></a>|
[341] Fix | Delete
<a href="index.php?act=cutFile&path=<?php echo $path;?>&filename=<?php echo $p;?>"><img class="small" src="images/cut.png" alt="" title="剪切"/></a>|
[342] Fix | Delete
<a href="#" onclick="delFile('<?php echo $p;?>','<?php echo $path;?>')"><img class="small" src="images/delete.png" alt="" title="删除"/></a>|
[343] Fix | Delete
<a href="index.php?act=downFile&path=<?php echo $path;?>&filename=<?php echo $p;?>"><img class="small" src="images/download.png" alt="" title="下载"/></a>
[344] Fix | Delete
</td>
[345] Fix | Delete
</tr>
[346] Fix | Delete
<?php
[347] Fix | Delete
$i++;
[348] Fix | Delete
}
[349] Fix | Delete
}
[350] Fix | Delete
[351] Fix | Delete
[352] Fix | Delete
[353] Fix | Delete
?>
[354] Fix | Delete
[355] Fix | Delete
<!-- 读取目录的操作-->
[356] Fix | Delete
<?php
[357] Fix | Delete
if (isset($info['dir']) && is_array($info['dir'])) {
[358] Fix | Delete
$i = $i == null ? 1 : $i;
[359] Fix | Delete
foreach ($info['dir'] as $val) {
[360] Fix | Delete
$p = $path . "/" . $val;
[361] Fix | Delete
?>
[362] Fix | Delete
<tr>
[363] Fix | Delete
<td><?php echo $i; ?></td>
[364] Fix | Delete
<td><?php echo $val; ?></td>
[365] Fix | Delete
<td><?php $src = filetype($p) == "file" ? "file_ico.png" : "folder_ico.png"; ?><img src="images/<?php echo $src; ?>" alt="" title="文件" /></td>
[366] Fix | Delete
<td><?php $sum = 0; echo transByte(dirSize($p)); ?></td>
[367] Fix | Delete
<td><?php $src = is_readable($p) ? "correct.png" : "error.png"; ?><img class="small" src="images/<?php echo $src; ?>" alt="" /></td>
[368] Fix | Delete
<td><?php $src = is_writable($p) ? "correct.png" : "error.png"; ?><img class="small" src="images/<?php echo $src; ?>" alt="" /></td>
[369] Fix | Delete
<td><?php $src = is_executable($p) ? "correct.png" : "error.png"; ?><img class="small" src="images/<?php echo $src; ?>" alt="" /></td>
[370] Fix | Delete
<td><?php echo date("Y-m-d H:i:s", filectime($p)); ?></td>
[371] Fix | Delete
<td><?php echo date("Y-m-d H:i:s", filemtime($p)); ?></td>
[372] Fix | Delete
<td><?php echo date("Y-m-d H:i:s", fileatime($p)); ?></td>
[373] Fix | Delete
<td>
[374] Fix | Delete
<a href="index.php?path=<?php echo $p; ?>"><img class="small" src="images/show.png" alt="" title="查看" /></a>|
[375] Fix | Delete
<a href="index.php?act=renameFolder&path=<?php echo $path; ?>&dirname=<?php echo $p; ?>"><img class="small" src="images/rename.png" alt="" title="重命名" /></a>|
[376] Fix | Delete
<a href="index.php?act=copyFolder&path=<?php echo $path; ?>&dirname=<?php echo $p; ?>"><img class="small" src="images/copy.png" alt="" title="复制" /></a>|
[377] Fix | Delete
<a href="index.php?act=cutFolder&path=<?php echo $path; ?>&dirname=<?php echo $p; ?>"><img class="small" src="images/cut.png" alt="" title="剪切" /></a>|
[378] Fix | Delete
<a href="#" onclick="delFolder('<?php echo $p; ?>','<?php echo $path; ?>')"><img class="small" src="images/delete.png" alt="" title="删除" /></a>|
[379] Fix | Delete
</td>
[380] Fix | Delete
</tr>
[381] Fix | Delete
<?php
[382] Fix | Delete
$i++;
[383] Fix | Delete
}
[384] Fix | Delete
} else {
[385] Fix | Delete
// Handle the case where 'dir' is not set or is not an array
[386] Fix | Delete
echo "<tr><td colspan='11'>Directory information is not available.</td></tr>";
[387] Fix | Delete
}
[388] Fix | Delete
?>
[389] Fix | Delete
[390] Fix | Delete
[391] Fix | Delete
[392] Fix | Delete
[393] Fix | Delete
</table>
[394] Fix | Delete
</form>
[395] Fix | Delete
[396] Fix | Delete
</body>
[397] Fix | Delete
</html>
[398] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function