@@ -63,102 +63,109 @@ if (!empty($iseditor)) { | |||
</head> | |||
<body> | |||
<div class="upload-box"> | |||
<table class="table shadow-sm icon"> | |||
<tr> | |||
<td colspan="3"> | |||
<form name="myform" action="select_images_post.php" method="POST" enctype="multipart/form-data"> | |||
<?php $noeditor = !empty($noeditor) ? "<input type='hidden' name='noeditor' value='yes'>" : ''; echo $noeditor;?> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="v" value="<?php echo $v ?>"> | |||
<input type="hidden" name="iseditor" value="<?php echo $iseditor ?>"> | |||
<input type="hidden" name="imgstick" value="<?php echo $imgstick ?>"> | |||
<input type="hidden" name="CKEditorFuncNum" value="<?php echo isset($CKEditorFuncNum) ? $CKEditorFuncNum : 1;?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="file" name="imgfile" class="w-50"> | |||
<label><input type="checkbox" name="needwatermark" value="1" <?php if ($photo_markup == '1') echo 'checked';?>> 水印</label> | |||
<label><input type="checkbox" name="resize" value="1"> 缩小</label> | |||
<label>宽:<input type="text" name="iwidth" value="<?php echo $cfg_ddimg_width ?>" class="admin-input-xs"></label> | |||
<label>高:<input type="text" name="iheight" value="<?php echo $cfg_ddimg_height ?>" class="admin-input-xs"></label> | |||
<button type="submit" name="sb1" class="btn btn-success btn-sm">上传</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td colspan="3">点击图片预览,再点击图片关闭预览,点击文件名选择图片</td> | |||
</tr> | |||
<tr> | |||
<td width="40%">选择图片</td> | |||
<td width="26%">文件大小</td> | |||
<td>修改时间</td> | |||
</tr> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
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); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td colspan='2'><a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td>当前目录:$activepath</td> | |||
</tr>"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode("$activepath/$file").$addparm."'><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "text-danger"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td> | |||
<a href='$reurl' onclick=\"ReturnImg('$reurl');\" class=\"tipsimg $lstyle\"><img src='$reurl' title='$file'> $file</a> | |||
</td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(jpg)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "text-danger"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href='$reurl' onclick=\"ReturnImg('$reurl');\" class=\"tipsimg $lstyle\"><img src='$reurl' title='$file'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} | |||
}//End Loop | |||
?> | |||
</tr> | |||
</table> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择图片</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<td colspan="3"> | |||
<form name="myform" action="select_images_post.php" method="POST" enctype="multipart/form-data"> | |||
<?php $noeditor = !empty($noeditor) ? "<input type='hidden' name='noeditor' value='yes'>" : ''; echo $noeditor;?> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="v" value="<?php echo $v ?>"> | |||
<input type="hidden" name="iseditor" value="<?php echo $iseditor ?>"> | |||
<input type="hidden" name="imgstick" value="<?php echo $imgstick ?>"> | |||
<input type="hidden" name="CKEditorFuncNum" value="<?php echo isset($CKEditorFuncNum) ? $CKEditorFuncNum : 1;?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="file" name="imgfile"> | |||
<label><input type="checkbox" name="needwatermark" value="1" <?php if ($photo_markup == '1') echo 'checked';?>> 水印</label> | |||
<label><input type="checkbox" name="resize" value="1"> 缩小</label> | |||
<label>宽:<input type="text" name="iwidth" value="<?php echo $cfg_ddimg_width ?>" class="admin-input-xs"></label> | |||
<label>高:<input type="text" name="iheight" value="<?php echo $cfg_ddimg_height ?>" class="admin-input-xs"></label> | |||
<button type="submit" class="btn btn-success btn-sm">上传</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
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); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td colspan='2'><a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td>当前目录:$activepath</td> | |||
</tr>"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode("$activepath/$file").$addparm."'><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "text-danger"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td> | |||
<a href='$reurl' onclick=\"ReturnImg('$reurl');\" class=\"tipsimg $lstyle\"><img src='$reurl' title='$file'> $file</a> | |||
</td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(jpg)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "text-danger"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href='$reurl' onclick=\"ReturnImg('$reurl');\" class=\"tipsimg $lstyle\"><img src='$reurl' title='$file'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
function nullLink() { | |||
@@ -52,114 +52,125 @@ if (!empty($noeditor)) { | |||
</head> | |||
<body> | |||
<div class="upload-box"> | |||
<table class="table shadow-sm icon"> | |||
<tr> | |||
<td colspan="3"> | |||
<form name="myform" action="select_media_post.php" method="POST" enctype="multipart/form-data"> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<?php $noeditor = !empty($noeditor) ? "<input type='hidden' name='noeditor' value='yes'>" : ''; echo $noeditor;?> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="hidden" name="CKEditorFuncNum" value="<?php echo isset($CKEditorFuncNum) ? $CKEditorFuncNum : 1;?>"> | |||
<input type="file" name="uploadfile" class="w-75"> | |||
<button type="submit" name="sb1" class="btn btn-success btn-sm">上传</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td width="40%">点击名称选择文件</td> | |||
<td width="26%">文件大小</td> | |||
<td>修改时间</td> | |||
</tr> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_media.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_media.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(swf|fly|fla|flv)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_flash.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(wmv|avi)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_video.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(rm|rmvb|mp3|mp4)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_rm.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(mp3|wma)#", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_music.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} | |||
}//End Loop | |||
?> | |||
</table> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择多媒体</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<td colspan="3"> | |||
<form name="myform" action="select_media_post.php" method="POST" enctype="multipart/form-data"> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<?php $noeditor = !empty($noeditor) ? "<input type='hidden' name='noeditor' value='yes'>" : ''; echo $noeditor;?> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="hidden" name="CKEditorFuncNum" value="<?php echo isset($CKEditorFuncNum) ? $CKEditorFuncNum : 1;?>"> | |||
<input type="file" name="uploadfile"> | |||
<button type="submit" class="btn btn-success btn-sm">上传</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_media.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_media.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(swf|fly|fla|flv)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_flash.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(wmv|avi)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_video.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(rm|rmvb|mp3|mp4)#i", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_rm.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(mp3|wma)#", $file)) { | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_music.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td align='center'>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
function nullLink() { | |||
@@ -52,92 +52,100 @@ if (!empty($noeditor)) { | |||
</head> | |||
<body> | |||
<div class="upload-box"> | |||
<table class="table shadow-sm icon"> | |||
<tr> | |||
<td colspan="3"> | |||
<form name="myform" action="select_soft_post.php" method="POST" enctype="multipart/form-data"> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<?php $noeditor = !empty($noeditor) ? "<input type='hidden' name='noeditor' value='yes'>" : ''; echo $noeditor;?> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="file" name="uploadfile" class="w-50"> | |||
<label>改名:<input type="text" name="newname" class="admin-input-sm"></label> | |||
<button type="submit" name="sb1" class="btn btn-success btn-sm">保存</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td colspan="3">点击选择文件,红色字样的为刚上传的文件</td> | |||
</tr> | |||
<tr> | |||
<td width="40%">选择文件</td> | |||
<td width="26%">文件大小</td> | |||
<td>修改时间</td> | |||
</tr> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = $ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_soft.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>\r\n"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_soft.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(zip|rar|tgr.gz)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_zip.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_exe.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} | |||
}//End Loop | |||
?> | |||
</table> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择软件</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<td colspan="3"> | |||
<form name="myform" action="select_soft_post.php" method="POST" enctype="multipart/form-data"> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<?php $noeditor = !empty($noeditor) ? "<input type='hidden' name='noeditor' value='yes'>" : ''; echo $noeditor;?> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="file" name="uploadfile"> | |||
<label>改名:<input type="text" name="newname" class="admin-input-sm"></label> | |||
<button type="submit" class="btn btn-success btn-sm">保存</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = $ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_soft.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>\r\n"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_soft.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(zip|rar|tgr.gz)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_zip.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
$reurl = $reurl; | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_exe.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
function nullLink() { | |||
@@ -43,136 +43,147 @@ if (empty($comeback)) { | |||
</head> | |||
<body > | |||
<div class="upload-box"> | |||
<table class="table shadow-sm icon"> | |||
<tr> | |||
<td colspan="3"> | |||
<form name="myform" action="select_templets_post.php" method="POST" enctype="multipart/form-data"> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="file" name="uploadfile" class="w-50"> | |||
<label>改名:<input type="text" name="filename" class="admin-input-sm"></label> | |||
<button type="submit" name="sb1" class="btn btn-success btn-sm">保存</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td width="40%">选择文件</td> | |||
<td width="26%">文件大小</td> | |||
<td>修改时间</td> | |||
</tr> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_templets.php?f=$f&activepath=".urlencode($tmp)."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>\r\n"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_templets.php?f=$f&activepath=".urlencode("$activepath/$file")."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(htm|html)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_htm.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(css)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_css.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(js)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_js.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(jpg)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='$reurl'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(gif|png)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='$reurl'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(txt)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_text.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td></tr>"; | |||
echo "$line"; | |||
} | |||
}//End Loop | |||
?> | |||
</table> | |||
<div class="card shadow-sm"> | |||
<div class="card-header">选择模板</div> | |||
<div class="card-body"> | |||
<div class="table-responsive"> | |||
<table class="table table-borderless icon"> | |||
<thead> | |||
<tr> | |||
<td colspan="3"> | |||
<form name="myform" action="select_templets_post.php" method="POST" enctype="multipart/form-data"> | |||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | |||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||
<input type="hidden" name="job" value="upload"> | |||
<input type="file" name="uploadfile"> | |||
<label>改名:<input type="text" name="filename" class="admin-input-sm"></label> | |||
<button type="submit" name="sb1" class="btn btn-success btn-sm">保存</button> | |||
</form> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="col">文件名称</td> | |||
<td scope="col">文件大小</td> | |||
<td scope="col">修改时间</td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php | |||
$dh = scandir($inpath); | |||
$ty1 = ''; | |||
$ty2 = ''; | |||
foreach ($dh as $file) { | |||
//计算文件大小和创建时间 | |||
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) { | |||
$filesize = filesize("$inpath/$file"); | |||
$filesize = $filesize / 1024; | |||
if ($filesize != "") | |||
if ($filesize < 0.1) { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 2); | |||
} else { | |||
@list($ty1, $ty2) = split("\.", $filesize); | |||
$filesize = $ty1.".".substr($ty2, 0, 1); | |||
} | |||
$filetime = filemtime("$inpath/$file"); | |||
$filetime = MyDate("Y-m-d H:i:s", $filetime); | |||
} | |||
//判断文件类型并作处理 | |||
if ($file == ".") continue; | |||
else if ($file == "..") { | |||
if ($activepath == "") continue; | |||
$tmp = preg_replace("#[\/][^\/]*$#", "", $activepath); | |||
$line = "<tr> | |||
<td><a href='select_templets.php?f=$f&activepath=".urlencode($tmp)."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td> | |||
<td colspan='2'>当前目录:$activepath</td> | |||
</tr>\r\n"; | |||
echo $line; | |||
} else if (is_dir("$inpath/$file")) { | |||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||
if (preg_match("#^\.(.*)$#i", $file)) continue; | |||
$line = "<tr> | |||
<td colspan='3'><a href=select_templets.php?f=$f&activepath=".urlencode("$activepath/$file")."><img src='/static/web/img/icon_dir.png'> $file</a></td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(htm|html)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_htm.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(css)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_css.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(js)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_js.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(jpg)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='$reurl'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(gif|png)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='$reurl'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td> | |||
</tr>"; | |||
echo "$line"; | |||
} else if (preg_match("#\.(txt)#i", $file)) { | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
$reurl = "$activeurl/$file"; | |||
$reurl = preg_replace("#\.\.#", "", $reurl); | |||
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl); | |||
$line = "<tr> | |||
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_text.png'> $file</a></td> | |||
<td>$filesize KB</td> | |||
<td>$filetime</td></tr>"; | |||
echo "$line"; | |||
} | |||
} | |||
?> | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<script> | |||
function nullLink() { | |||