怎么查看自己网站有没有被百度收录,视频拍摄合同,庄河网站建设公司,网站建设与网页设计专业* 基于:https://down.chinaz.com/soft/35899.htm * 查分吧 修改自用版今日对外分享(自2016年1.10版本以来一直用他云开发:Web环境即时看效果)
* 也可以用于本人很多txt/csv通用查询系统的在线管理后台管理数据
* 默认登陆账号filebox密码nidemima * 修改账号密码:21-22行;获取…* 基于:https://down.chinaz.com/soft/35899.htm * 查分吧 修改自用版今日对外分享(自2016年1.10版本以来一直用他云开发:Web环境即时看效果)
* 也可以用于本人很多txt/csv通用查询系统的在线管理后台管理数据
* 默认登陆账号filebox密码nidemima * 修改账号密码:21-22行;获取密码MD5值: * 登录状态访问?opmimaminidemima得到的值(网址中nidemima改为自己密码) * 在原作者基础上删减不常用FTP功能少的sql工具剩下纯粹web文件管理 * 删减文件夹大小统计功能防止过多文件影响性能 * 增强密码安全(密文)存储:安全建议:文件名改为只有自己知道的 或者用完删除 * 原来只能PHP5正常非常多优化可在PHP7 PHP8运行(宝塔/护卫神linux环境通过,windows可用) ?php
/**
* 程序说明
* package FileBox
* author Jooies jooiesya.ru
* copyright Copyright (c) 2014-2016
* since Version 1.11.1.1
* 基于:https://down.chinaz.com/soft/35899.htm
* 查分吧 修改自用版今日对外分享(自2016年1.10版本以来一直用他云开发:Web环境即时看效果)
* 也可以用于本人很多txt/csv通用查询系统的在线管理后台管理数据
* 默认登陆账号filebox密码nidemima
* 修改账号密码:21-22行;获取密码MD5值;
* 登录状态访问?opmimaminidemima得到的值(网址中nidemima改为自己密码)
* 在原作者基础上删减不常用FTP功能少的sql工具剩下纯粹web文件管理
* 删减文件夹大小统计功能防止过多文件影响性能
* 增强密码安全(密文)存储:安全建议:文件名改为只有自己知道的 或者用完删除
* 原来只能PHP5正常非常多优化可在PHP7 PHP8运行(宝塔/护卫神linux环境通过,windows可用)
*/
error_reporting(0);
header(Content-Type: text/html; charsetutf-8);
date_default_timezone_set(Asia/Shanghai);
session_start();
$sitetitle FileBox;
$user filebox;
$toke chafenba;//
//c9d78c00b9a72c65e829c2320e58e4e1 对应 nidemima
$pass c9d78c00b9a72c65e829c2320e58e4e1;//填写本页登录状态访问?opmimaminidemima得的值
$ipes $_SERVER[REMOTE_ADDR];
$safe_num 15;//设置多少次后禁止登陆为0则不限制
$meurl $_SERVER[PHP_SELF];
$os (DIRECTORY_SEPARATOR\\)?windows:linux;
$op (isset($_REQUEST[op]))?htmlentities($_REQUEST[op]):home;
$action (isset($_REQUEST[action]))?htmlspecialchars($_REQUEST[action]):;
$folder (isset($_REQUEST[folder]))?htmlspecialchars($_REQUEST[folder]):./;
$arr str_split($folder);
if($arr[count($arr)-1]!/)$folder . /;
while(preg_match(/\.\.\//,$folder))$folder preg_replace(/\.\.\//,/,$folder);
while(preg_match(/\/\//,$folder))$folder preg_replace(/\/\//,/,$folder);
if($folder )$folder ./;
$ufolder $folder;
$fess (isset($_SESSION[ertimes]))?$_SESSION[ertimes]:1;
if($fess $safe_num $safe_num ! 0) printerror(您已经被限制登陆);
$myus (isset($_COOKIE[muser]))?htmlentities($_COOKIE[muser]):filebox;
$myps (isset($_COOKIE[mpass]))?htmlentities($_COOKIE[mpass]):253252545;
if ($myus ! md5($user.%.$ipes) || $_COOKIE[mpass] ! md5($pass.%.$ipes)) {
$guser (isset($_REQUEST[user]))?htmlentities($_REQUEST[user]):;
$gpass (isset($_REQUEST[pass]))?htmlentities($_REQUEST[pass]):;
if ($guser $user md5($gpass.$toke) $pass) {
setcookie(muser,md5($user.%.$ipes),time()60*60*3);
setcookie(mpass,md5($pass.%.$ipes),time()60*60*3);
}else{
if (strlen($guser)5 strlen($gpass)5) { $er true;}else{$er false; }
login($er);
exit;
}
}
function maintop($title,$showtop true) {
global $meurl,$sitetitle,$op;
echo !DOCTYPE html\nmeta namerobots contentnoindex,follow /\nhead\nmeta nameviewport contentwidthdevice-width, initial-scale1/\n
.title$sitetitle - $title/title\n
./head\n
.body\n;
echo EOT
style
* { font-family:Verdana,Microsoft Yahei;}
.box { border:1px solid #ccc;background-color:#fff;padding:10px;}
abbr { text-decoration:none;}
.title { border:1px solid #ccc;border-bottom:0;font-weight:normal;text-align:left;width:678px;padding:10px;font-size:12px;color:#666;background-color:#F0F0F0;}
.right { float:right;text-align:right !important;}
.content { width:700px;margin:auto;overflow:hidden;font-size:13px;}
.login_button { height:43px;line-height:18px;font-family:Candara;}
.login_text { font-family:Candara,Microsoft Yahei;vertical-align:middle;padding:7px;width:40%;font-size:22px;border:1px #ccc solid;}
input[typetext]:focus,input[typepassword]:hover { outline:0;background-color:#f8f8f8;}
input[typetext]:hover,input[typepassword]:hover,input[typepassword]:active { outline:0;background-color:#f8f8f8;}
h2 { color:#514f51;text-align:center;margin:16px 0;font-size:48px;background-image:-webkit-gradient(linear, 0 0, 0 bottom, from(#7d7d7d), to(#514f51));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-family:Candara,Lucida Sans,Microsoft Yahei !important;}
span { margin-bottom:8px;}
a:visited { color:#333;text-decoration:none;}
a:hover { color:#999;text-decoration:none;}
a { color:#333;text-decoration:none;border-bottom:1px solid #CCC;}
a:active { color:#999;text-decoration:none;}
.title a,td a,.menu a { border:0}
textarea { outline:none;font-family:Yahei Consolas Hybrid,Consolas,Verdana,Tahoma,Arial,Helvetica,Microsoft Yahei,sans-serif !important;font-size:13px;border:1px solid #ccc;margin-top:-1px;padding:8px;line-height:18px;width:682px;max-width:682px;}
input.button { background-color:#eeeeee;text-align:center !important;outline:none;border:1px solid #adadad;*display:inline;color:#000;padding:3px 18px;font-size:13px;margin-top:10px;transition:border-color 0.5s;}
input.button:hover { background-color:#e5f1fb;border-color:#0078d7;}
input.mob { padding:3px 40px;}
input.text,select,option,.upload { border:1px solid #ccc;margin:6px 1px;padding:5px;font-size:13px;height:16px;}
body { background-color:#fff;margin:0px 0px 10px;}
.error { font-size:10pt;color:#AA2222;text-align:left}
.menu { position:fixed;font-size:13px;}
.menu li { list-style-type:none;padding:7px 25px;border-left:#fff solid 3px;margin-bottom:2px;}
.menu li.curr { border-left:#666 solid 3px;background-color:#f7f7f7;}
.menu li:hover { border-color:#469;background-color:#ededed;}
.odTable span { cursor:pointer;}
.odTable b { color:#ccc;font-size:12px;}
.menu a:hover { color:#707070;}
.table { background-color:#777;color:#fff;}
th { text-align:left;height:40px;line-height:40px;border-bottom:3px solid #dbdbdb;font-size:14px;background-color:#f8f8f8 !important;}
table { border:1px solid #ccc;border-collapse:collapse;}
tr { color:#666;height:31px;font-size:12px;}
tr a { color:#333}
th { color:#333;}
tr:nth-child(odd) { background-color:#fff;}
tr:nth-child(even) { background-color:#f5f5f7;}
tr:hover { background-color:#ebeced;}
.upload { width:50%;}
.home,.com { display:none;}
.long { width:70%}
.short { width:20%}
.open { width:40px;}
.rename { width:50px;}
media handheld, only screen and (max-width:960px) {
textarea { width:calc(100% - 18px);max-width:calc(100% - 18px);}
.upload { width:calc(100% - 18px);}
.login_button { width:100%;margin-top:0 !important;padding:20px 5px !important;height:60px;font-size:23px !important;}
.login_text { display:block;margin-bottom:0;padding:20px 10px;width:100%;border-bottom:0;}
.menu { margin-left:-40px;position:static;padding:0;}
.menu li { padding-bottom:8px;}
.title { width:calc(100% - 22px);}
input.mob { height:40px;font-size:15px;width:100%;display:block;}
.content { width:100%}
input.button { padding:3px 10px;}
.mobile b,.mobi { display:none;}
.com { display:inline;}
th { font-weight:normal;font-size:12px;}
.open,.rename { width:25px;}
}
/style
EOT;
echo h2$sitetitle/h2\n;
if ($showtop) {//头部菜单内容
$burl(isset($_SESSION[folder]))?addslashes($_SESSION[folder]):;
$back($op!home)?a href{$meurl}?ophomefolder{$burl}li返回/li/a\n:;
if(stristr(-up-upload-yupload-,-$op-)){$up classcurr;}else{$up ;}
if(stristr(-home-edit-ren-unz-,-$op-)){$home classcurr;}else{$home ;}
if($opcr||$opcreate){$cr classcurr;}else{$cr ;}
echo div classmenu\nula href{$meurl}?ophomeli {$home}主页/li/a\n{$back}
.a href{$meurl}?opupli {$up}上传文件/li/a\n
.a href{$meurl}?opcrli {$cr}创建文件/li/a\n
.a href{$meurl}?oplogoutli注销/li/a\n
./ul/div;
}
echo div classcontent\n;
}
function login($erfalse) {
global $meurl,$op,$safe_num,$mail;
setcookie(muser,,time()-60*60*24*1);
setcookie(mpass,,time()-60*60*24*1);
maintop(登录,false);
if ($er) {
if (isset($_SESSION[ertimes])){
$_SESSION[ertimes];
if($_SESSION[ertimes] $safe_num $safe_num ! 0){
echo (span classerrorERROR: 您已经被限制登陆/span);
exit;
}
}else{
$_SESSION[ertimes] 1;
}
echo span classerror用户名或密码错误/spanbr\n;
}
echo form action{$meurl}?ophome methodpost\n
.input typetext nameuser border0 classlogin_text placeholder请输入用户名\n
.input typepassword namepass border0 classlogin_text placeholder请输入密码\n
.input typesubmit namesubmitButtonName valueLOGIN border0 classlogin_button button\n
./form\n;
mainbottom();
}
function home() {
global $os, $meurl ,$folder, $ufolder;
$content1 array();
$content2 array();
$folder gCode($folder);
if(is_dir($folder)){$style opendir($folder);}else{printerror(目录不存在\n);exit;}
$a1;$b1;
if($folder)$_SESSION[folder]$ufolder;
maintop(主页);
echo scriptvar order;function generateCompareTRs(iCol,sDataType,iOrder){return function compareTRs(oTR1,oTR2){vValue1convert(oTR1.cells[iCol].getAttribute(iOrder),sDataType);vValue2convert(oTR2.cells[iCol].getAttribute(iOrder),sDataType);orderiOrder;if(vValue1vValue2){return -1}else{if(vValue1vValue2){return 1}else{return 0}}}}function convert(sValue,sDataType){switch(sDataType){caseint:return parseInt(sValue);default:return sValue.toString()}}function sortTable(iOrder,iCol,sDataType){var oTabledocument.getElementById(tblSort);var oTBodyoTable.tBodies[0];var colDataRowsoTBody.rows;var aTRsnew Array;for(var i0;icolDataRows.length;i){aTRs[i]colDataRows[i]}if(oTable.sortColiCol iOrderorder){aTRs.reverse()}else{aTRs.sort(generateCompareTRs(iCol,sDataType,iOrder))}var oFragmentdocument.createDocumentFragment();for(var j0;jaTRs.length;j){oFragment.appendChild(aTRs[j])}oTBody.appendChild(oFragment);oTable.sortColiCol;}/script;
echo form methodposttable border0 cellpadding2 cellspacing0 width100% classmytable odTable idtblSort\n;
while($stylesheet readdir($style)) {
$ufolder $folder;
$sstylesheet $stylesheet;
$tta fileperms($ufolder.$sstylesheet);
$ttb substr(sprintf(%o,$tta), -3);
if($os!windows){ $qx td$ttb/td;$xxtd/td;}else{ $qx;$xx;}
if ($stylesheet ! . $stylesheet ! .. ) {
$stylesheet uCode($stylesheet);
$folder uCode($folder);
$trontd tr width100% onclickstdocument.getElementById(\$stylesheet\).checked;if(sttrue){document.getElementById(\$stylesheet\).checkedfalse;this.style.backgroundColor\\;}else{document.getElementById(\$stylesheet\).checkedtrue;this.style.backgroundColor\#e3e3e5\;}tdsvg width21 height21;
$rename tda href{$meurl}?oprenfile.htmlspecialchars($stylesheet).folder$folderspan classcom/spanspan classmobi重命名/span/a/td\n;
if (is_dir(gCode($folder.$stylesheet)) is_readable(gCode($folder.$stylesheet))) {
$content1[$a] $trontdrect width10px height14 stylefill:#ffe792 stroke#e6c145 stroke-width0.5 x4 y4/rect width2px height5px stylefill:#ffe792 stroke#e6c145 stroke-width0.5 x13 y13//svginput nameselect_item[d][$stylesheet] typecheckbox id$stylesheet classcheckbox home value{$folder}{$stylesheet} //td\n
.td _order1{$stylesheet} _ext1 _time1a href{$meurl}?ophomefolder{$folder}{$stylesheet}/ title.gettime($folder.$stylesheet).{$stylesheet}/a/td\n
.td _size1-/td
.tdspan classmobia href{$meurl}?ophomefolder.htmlspecialchars($folder.$stylesheet)./打开/aspan/td\n
.$rename
.tda href{$folder}{$stylesheet} target_blankspan classcom/spanspan classmobi查看/span/a/td\n
.$qx./tr\n;
$a;
$folder gCode($folder);
}elseif(!is_dir(gCode($folder.$stylesheet)) is_readable(gCode($folder.$stylesheet))){
$arr explode(.,$folder.$stylesheet);
$arr end($arr);
if($arr zip){
$filesizeme filesize($ufolder.$sstylesheet);
$content2[$b] $trontdrect width12 height10 stylefill:#85d3f9 stroke#48b8f4 stroke-width0.5 x3 y4/rect width12 height2 stylefill:#fc8f24 stroke#d66e1a stroke-width0.5 x3 y14/rect width12 height2 stylefill:#83d12a stroke#579714 stroke-width0.5 x3 y16/rect width2 height14 stylefill:#763207 stroke#97460b stroke-width0.5 x11 y4//svginput nameselect_item[f][$stylesheet] typecheckbox id$stylesheet onpropertychangeif(this.checkedfalse){this.parentNode.parentNode.style.backgroundColor#e3e3e5;}else{this.parentNode.parentNode.style.backgroundColor;} classcheckbox home value{$folder}{$stylesheet} //td\n
.td _order3{$stylesheet} _ext3{$arr} _time.(filemtime($folder.$stylesheet)3).a href{$folder}{$stylesheet} title.gettime($folder.$stylesheet). target_blank{$stylesheet}/a/td\n
.td _size.($filesizeme3)..Size($filesizeme)./td
.td/td\n
.$rename
.tda href{$meurl}?opunzdename.htmlspecialchars($stylesheet).folder$folderspan classcom/spanspan classmobi提取/span/a/td\n
.$qx./tr\n;
}elseif($arr gif||$arr jpg||$arr png||$arr bmp||$arr png5||$arr psd||$arr webp||$arr gz||$arr gzip){
$filesizeme filesize($ufolder.$sstylesheet);
$content2[$b] $trontdrect width10px height14 stylefill:#f8f9f9 stroke#8f9091 stroke-width0.5 x4 y4/rect width2px height3px stylefill:#f8f9f9 stroke#8f9091 stroke-width0.5 x12 y4/rect width6 height5px stylefill:#f8f9f9 stroke#438bd4 stroke-width0.5 x6 y8/rect width6 height2px stylefill:#438bd4 stroke#438bd4 stroke-width0.5 x6 y13//svginput nameselect_item[f][$stylesheet] typecheckbox id$stylesheet classcheckbox home value{$folder}{$stylesheet} //td\n
.td _order\3{$stylesheet}\ _ext\3{$arr}\ _time\.(filemtime($folder.$stylesheet)3).\a href{$folder}{$stylesheet} title.gettime($folder.$stylesheet). target_blank{$stylesheet}/a/td\n
.td _size\.($filesizeme3).\.Size($filesizeme)./td
.td/td\n
.$rename
.tda href{$folder}{$stylesheet} target_blankspan classcom/spanspan classmobi查看/span/a/td\n
.$qx./tr\n;
}else{
$filesizeme filesize($ufolder.$sstylesheet);
$content2[$b] $trontdrect width10px height14 stylefill:#f8f9f9 stroke#8f9091 stroke-width0.5 x4 y4/rect width2px height3px stylefill:#f8f9f9 stroke#8f9091 stroke-width0.5 x12 y4//svginput nameselect_item[f][$stylesheet] typecheckbox id$stylesheet classcheckbox home value{$folder}{$stylesheet} //td\n
.td _order3{$stylesheet} _ext3{$arr} _time.(filemtime($folder.$stylesheet)3).a href{$folder}{$stylesheet} title.gettime($folder.$stylesheet). target_blank{$stylesheet}/a/td\n
.td _size.($filesizeme3)..Size(filesize($ufolder.$sstylesheet))./td
.tda href{$meurl}?opeditfename.htmlspecialchars($stylesheet).folder$folderspan classcom/spanspan classmobi编辑/span/a/td\n
.$rename
.tda href{$folder}{$stylesheet} target_blankspan classcom/spanspan classmobi查看/span/a/td\n
.$qx./tr\n;
}
$b;
$folder gCode($folder);
}
}
}
closedir($style);
$lu explode(/, $_SESSION[folder]);
array_pop($lu);
$u ;
echo div classtitle;
foreach ($lu as $v) {
$u $u.$v./;
if($v.){$v主页;}elseif($v){$v根目录;}
echo a href.$meurl.?ophomefolder.$u..$v./a » ;
}
echo 文件\n
.span classright,$a-1, 个文件夹 ,$b-1, 个文件/span/div
.div styleposition:fixed;bottom:0;margin-left:3px;input typecheckbox idcheck onclickCheck() input classbutton nameaction typesubmit value移动 / input classbutton nameaction typesubmit value复制 / input classbutton nameaction typesubmit onclickreturn confirm(\点击确认后选中的文件将作为Backup-time.zip创建\) value压缩 / input classbutton nameaction typesubmit onclickreturn confirm(\您真的要删除选中的文件吗?\) value删除 / input classbutton nameaction typesubmit onclickvar tdocument.getElementById(\chmod\).value;return confirm(\将这些文件的权限修改为\t\如果是文件夹将会递归文件夹内所有内容\) value权限 / input typetext classtext stlyevertical-align:text-top; size3 idchmod namechmod value0755/div;
if($os!windows):$qx th width40权限/th\n;else:$qx ;endif;
echo theadspan ididCheckbox/spantr classheadtable width100%
.scriptfunction Check(){colliddocument.getElementById(check);colldocument.getElementsByTagName(input);if(collid.checked){for(var i0;icoll.length;i){if(coll[i].typecheckbox){coll[i].checkedtrue;coll[i].parentNode.parentNode.style.backgroundColor#e3e3e5;}}}else{for(var i0;icoll.length;i){if(coll[i].typecheckbox){coll[i].checkedfalse;coll[i].parentNode.parentNode.style.backgroundColor;}}}}/script
.th width20px/th\n
.th stylewidth: calc(100% - 225px);div classmobilespan onclick\sortTable(_order,1);\文件名/span b//b span onclick\sortTable(_ext,1);\类型 b//b/span span onclick\sortTable(_time,1,int);\时间/span/div/th\n
.th width65pxspan onclick\sortTable(_size,2,int);\大小/span/th\n
.th classopenspan classmobi打开/span/th\n
.th classrenamespan classmobi重命名/span/th\n
.th classopenspan classmobi查看/span/th\n
.$qx
./tr/theadtbody;
if($_SESSION[folder]!./ and $_SESSION[folder]!/){
$last (substr($_SESSION[folder],0,1)/)?explode(/, substr($_SESSION[folder],1,-1)):explode(/, substr($_SESSION[folder],2,-1));
$back (substr($_SESSION[folder],0,1)/)?:substr($_SESSION[folder],0,1);
array_pop($last);
foreach ($last as $value) {
$back $back./.$value;
}
if($oswindows)$qx;else $qxtd/td;
echo tr width100%td/tdtd _order\1\ _ext\1\ _time\1\a href{$meurl}?ophomefolder.$back./.上级目录/a/tdtd _size\1\/tdtd/tdtd/tdtd/td$xx/tr;
}
$a1a count($content1)1; $a2a count($content2)1;
for ($a1; $a$a1a;$a) if(!empty($content1)) echo $content1[$a];
for ($b1; $b$a2a;$b) echo $content2[$b];
echo /tbody/form;
echo /table;
mainbottom();
}
function gettime($filename){return 修改时间.date(Y-m-d H:i:s,filemtime($filename)).\n.创建时间.date(Y-m-d H:i:s,filectime($filename));}
function uCode($text){return mb_convert_encoding($text,UTF-8,GBK);}
function gCode($text){return mb_convert_encoding($text,GBK,UTF-8);}
function tCode($text){return iconv(utf-8,latin1//IGNORE, $text);}
function dirSize($directoty){
$dir_size0;
if($dir_handleopendir($directoty)){
while($filenamereaddir($dir_handle)){
$subFile$directoty.DIRECTORY_SEPARATOR.$filename;
if($filename.||$filename..){
continue;
}elseif (is_dir($subFile)){
$dir_sizedirSize($subFile);
}elseif (is_file($subFile)){
$dir_sizefilesize($subFile);
}
}
closedir($dir_handle);
}
return ($dir_size);
}
function Size($size) {
$sz kMGTP;
$factor floor((strlen($size) - 1) / 3);
return ($size1024)?sprintf(%.2f, $size / pow(1024, $factor)) . $sz[$factor]:$size;
}
function curl_get_contents($url){
$ch curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$r curl_exec($ch);
curl_close($ch);
return $r;
}
function up() {
global $meurl, $folder;
maintop(上传);
echo FORM ENCTYPEmultipart/form-data ACTION{$meurl}?opupload METHODPOST\n
.div classtitle本地上传 Max:.ini_get(upload_max_filesize).,.ini_get(max_file_uploads).个/divdiv classbox styleborder-bottom:0;input typeFile nameupfile[] multiple size30\n
./divinput typetext namendir stylewidth:calc(100% - 12px);margin:0; value.$_SESSION[folder]. classupload\n;
echo div classrightinput typecheckbox nameunzip idunzip valuecheckbox onclickUpCheck() checkedlabel forunzipabbr title提取解压上传的Zip压缩文件解压/abbr/labal
.input typecheckbox namedelzip iddeluzipvaluecheckboxlabel fordeluzipabbr title同时将上传的压缩文件删除删除/abbr/labal
.input typesubmit value上传 classbutton/divbrbrbrbr\n
.scriptfunction UpCheck(){if(document.getElementById(unzip).checked){document.getElementById(deluzip).disabledfalse}else{document.getElementById(deluzip).disabledtrue}}/script
./form\n;
echo div classtitle远程下载/divdiv classbox styleborder-bottom:0;什么是远程下载br远程下载是从其他服务器获取文件并直接下载到当前服务器的一种功能。br类似于SSH的Wget功能免去我们下载再手动上传所浪费的时间。brform action{$meurl}?opyupload methodPOST
./divinput typetext classtext stylewidth:calc(100% - 12px);margin:0; namendir value.$_SESSION[folder].textarea nameurl placeholder请输入地址……/textarea
.div classrightinput typecheckbox nameunzip idun valuecheckbox onclickCheck() checkedlabel forunabbr title提取解压上传的Zip压缩文件解压/abbr/labal
.input typecheckbox namedelzip iddelvaluecheckboxlabel fordelabbr title同时将上传的压缩文件删除删除/abbr/labal input namesubmit value下载 typesubmit classbutton//div\n
.scriptfunction Check(){if(document.getElementById(un).checked){document.getElementById(del).disabledfalse}else{document.getElementById(del).disabledtrue}}/script
./form;
mainbottom();
}
function yupload($url, $folder, $unzip, $delzip) {
global $meurl;
if(empty($folder)){
$folder./;
}
$nfolder $folder;
$nurl $url;
$url gCode($url);
$folder gCode($folder);
if($url!){
ignore_user_abort(true); // 要求离线也可下载
set_time_limit (24 * 60 * 60); // 设置超时时间
if (!file_exists($folder)){
mkdir($folder, 0755);
}
$newfname $folder . basename($url); // 取得文件的名称
if(function_exists(curl_init)){
$file curl_get_contents($url);file_put_contents($newfname,$file);
}else{
$filefopen($url,rb);
if($file){$newf fopen ($newfname, wb);
if($newf)while (!feof($file)) {fwrite($newf, fread($file, 1024 * 8), 1024 * 8);}}
if($file)fclose($file);
if($newf)fclose($newf);
}
maintop(远程上传);
echo div classtitle文件 .basename($url). 上传成功br/divdiv classbox\n;
$end explode(., basename($url));
if((end($end)zip) isset($unzip) $unzip checkbox){
if(class_exists(ZipArchive)){
echo 您可以 a href{$meurl}?ophomefolder.$folder.访问文件夹/a 或者 a href{$meurl}?ophomefolder.$_SESSION[folder].返回目录/a 或者 a href{$meurl}?opup继续上传/a\n;
echo /divtextarea rows15 disabled;
$zip new ZipArchive();
if ($zip-open($folder.basename($url)) TRUE) {
if($zip-extractTo($folder)){
for($i 0; $i $zip-numFiles; $i) {
echo Unzip:.$zip-getNameIndex($i).\n;
}
$zip-close();
}else{
echo(span classerrorError:.$nfolder.$ndename./span);
}
echo basename($nurl). 已经被解压到 $nfolder\n;
if(isset($delzip) $delzip checkbox){
if(unlink($folder.basename($url))){
echo basename($url). 删除成功\n;
}else{
echo basename($url). 删除失败\n;
}
}
}else{
echo(span classerror无法解压文件.$nfolder.basename($nurl)./span);
}
echo /textarea;
}else{
echo(span classerror此服务器上的PHP不支持ZipArchive无法解压文件/span/div);
}
}else{
echo 您可以 a href{$meurl}?ophomefolder{$nfolder}访问文件夹/a 或者 a href{$meurl}?opeditfename.basename($url).folder{$nfolder}编辑文件/a 或者 a href{$meurl}?ophomefolder{$_SESSION[folder]}返回目录/a 或者 a href{$meurl}?opup继续上传/a\n/div;
}
mainbottom();
return true;
}else{
printerror (文件地址不能为空。);
}
}
function upload($upfile,$ndir,$unzip,$delzip) {
global $meurl, $folder;
if(empty($ndir)){
$ndir./;
}
$nfolder $folder;
$nndir $ndir;
$ndir gCode($ndir);
if (!$upfile) {
printerror(您没有选择文件);
exit;
}elseif($upfile) {
maintop(上传);
if (!file_exists($ndir)){
mkdir($ndir, 0755);
}
$i 1;
echo div classbox您可以 a href{$meurl}?ophomefolder.$ndir.前往文件所上传到的目录/a 或者 a href{$meurl}?ophomefolder.$_SESSION[folder].返回目录/a 或者 a href{$meurl}?opup继续上传/a/div\n;
echo textarea rows15 disabled;
while (count($upfile[name]) $i){
$dir gCode($nndir.$upfile[name][$i-1]);
if(copy($upfile[tmp_name][$i-1],$dir)) {
echo 文件 .$nndir.$upfile[name][$i-1]. 上传成功\n;
$end explode(., $upfile[name][$i-1]);
if((end($end)zip) isset($unzip) $unzip checkbox){
if(class_exists(ZipArchive)){
$zip new ZipArchive();
if ($zip-open($dir) TRUE) {
if($zip-extractTo($ndir)){
for($j 0; $j $zip-numFiles; $j) {
echo $zip-getNameIndex($j).\n;
}
$zip-close();
}
echo $upfile[name][$i-1]. 已经被解压到 $nndir\n;
if(isset($delzip) $delzip checkbox){
if(unlink($dir.$upfile[name][$i-1])){
echo $upfile[name][$i-1]. 删除成功\n;
}else{
echo $upfile[name][$i-1].( 删除失败\n);
}
}
}else{
echo(无法解压文件.$nndir.$upfile[name][$i-1].\n);
}
}else{
echo(此服务器上的PHP不支持ZipArchive无法解压文件\n);
}
}
}else{
echo(文件 .$upfile[name][$i-1]. 上传失败\n);
}
$i;
}
echo /textarea;
mainbottom();
}else{
printerror(您没有选择文件);
}
}
function unz($dename) {
global $meurl, $folder, $content;
if (!$dename ) {
if(class_exists(ZipArchive)){
maintop(解压);
echo table border0 cellpadding2 cellspacing0\n
.div classtitle解压 .$folder.$dename./div\n
.form ENCTYPEmultipart/form-data action{$meurl}?opunzip
.input typetext namendir stylewidth:calc(100% - 12px);margin:0; placeholder解压到…… classtext value.$_SESSION[folder].
.textarea rows15 disabled;
$zip new ZipArchive();
if ($zip-open($folder.$dename) TRUE) {
echo Archive: .$folder.$dename. with .$zip-numFiles. files\n;
echo Date Time Size Name\n;
echo ------------ ---------------\n;
for($i 0; $i $zip-numFiles; $i) {
$info $zip-statIndex($i);
echo date(m-d-y h:m,$info[mtime]);
echo .$info[size]. ;
echo uCode($zip-getNameIndex($i)).\n;
}
echo ------------ ---------------\n;
echo Date Time Size Name\n;
}else{
echo 文件读取失败。;
}
$zip-close();
echo /textarea;
echo input typehidden nameop valueunzip\n
.input typehidden namedename value.$dename.\n
.input typehidden namefolder value.$folder.\n
.div classrightinput typecheckbox namedel iddelvaluedellabel fordel删除/label input typesubmit value解压 classbutton/div\n
./table\n;
mainbottom();
}else{
printerror(此服务器上的PHP不支持ZipArchive无法解压文件\n);
}
}else{
home();
}
}
function unzip($dename,$ndir,$del) {
global $meurl, $folder;
$nndir $ndir;
$nfolder $folder;
$ndename $dename;
$dename gCode($dename);
$folder gCode($folder);
$ndir gCode($ndir);
if (!$dename ) {
if (!file_exists($ndir)){
mkdir($ndir, 0755);
}
if(class_exists(ZipArchive)){
$zip new ZipArchive();
if ($zip-open($folder.$dename) TRUE) {
maintop(解压);
if($zip-extractTo($ndir)){
echo div classbox现在您可以 a href.$meurl.?ophomefolder.$_SESSION[folder].返回目录/a/div;
echo textarea rows15 disabled;
for($i 0; $i $zip-numFiles; $i) {
echo uCode($zip-getNameIndex($i)).\n;
}
$zip-close();
echo $dename. 已经解压完成 $nndir\n;
}else{
echo(无法解压文件.$nfolder.$ndename);
}
if($deldel){
if(unlink($folder.$dename)){
echo $ndename. 已经被删除\n;
}else{
echo $ndename. 删除失败\n;
}
}
echo /textarea\n;
mainbottom();
}else{
printerror(无法解压文件.$nfolder.$ndename);
}
}else{
printerror(此服务器上的PHP不支持ZipArchive无法解压文件);
}
}else{
home();
}
}
function deltree($pathdir){
if(is_empty_dir($pathdir)){
rmdir($pathdir);//直接删除
}
else{
$ddir($pathdir);
while($a$d-read()){
if(is_file($pathdir./.$a) ($a!.) ($a!..)){unlink($pathdir./.$a);}if(is_dir($pathdir./.$a) ($a!.) ($a!..)){
if(!is_empty_dir($pathdir./.$a)){
deltree($pathdir./.$a);
}
if(is_empty_dir($pathdir./.$a)){
rmdir($pathdir./.$a);
}
}
}
$d-close();
}
}
function is_empty_dir($pathdir){
$dopendir($pathdir);
$i0;
while($areaddir($d)){
$i;
}
closedir($d);
if($i2){return false;}
else return true;
}
function edit($fename) {
global $meurl,$folder;
$file gCode($folder.$fename);
if (file_exists($file)) {
maintop(编辑);
$contents file_get_contents($file); $list;
if(function_exists(mb_detect_encoding))$encode mb_detect_encoding($contents,array(ASCII,UTF-8,GBK,GB2312));else $encode UTF-8;
if(isset($_REQUEST[encode])){$encode htmlspecialchars($_REQUEST[encode]);}
if($encode!UTF-8 !empty($encode))$contents mb_convert_encoding($contents,UTF-8,$encode);
foreach(mb_list_encodings() as $key $value){
$arrarray(EUC-CN GB2312,CP936 GBK,SJIS-macMacJapanese,SJIS-Mobile#DOCOMOSJIS-DOCOMO,SJIS-Mobile#KDDISJIS-KDDI,SJIS-Mobile#SOFTBANKSJIS-SOFTBANK,UTF-8-Mobile#DOCOMOUTF-8-DOCOMO,UTF-8-Mobile#KDDI-BUTF-8-KDDI,UTF-8-Mobile#SOFTBANKUTF-8-SOFTBANK,ISO-2022-JP-MOBILE#KDDIISO-2022-JP-KDDI);
if(array_key_exists($value, $arr)) $value_text $arr[$value]; else $value_text $value;
if($encode $value) $list.option value$value selected.$value_text./option; else $list.option value$value.$value_text./option;
}
echo form action{$meurl}?opsave methodpostdiv classtitlea href\{$meurl}?ophomefolder{$folder}\返回目录{$folder}/a 编辑文件 {$folder}{$fename}\n
.span classrightselect onchange\javascript:window.location.href({$meurl}?opeditfename$fenamefolder$folderencodethis.value);\ style\width:70px;height:20px;padding:0;margin:0;margin-top:-2px;font-size:12px;\
.option disabled当前文件编码/option.$list
./select »
.select name\encode\ style\width:70px;height:20px;padding:0;margin:0;margin-top:-2px;font-size:12px;\
.option disabled保存文件编码/option.$list
./select/span/div
.textarea rows24 namencontent
.htmlspecialchars($contents)
./textarea
.br\n
.input typehidden namefolder value{$folder}\n
.input typehidden namefename value{$fename}\n
.input typesubmit value保存 classright button mob\n
./form\n;
mainbottom();
}else{
printerror(文件不存在);
}
}
function save($ncontent, $fename, $encode) {
global $meurl,$folder;
if (!$fename ) {
$file gCode($folder.$fename);
$ydata $ncontent;
if($encode!UTF-8) $ydata mb_convert_encoding($ydata,$encode,UTF-8);
if(file_put_contents($file, $ydata) or $ncontent) {
maintop(编辑);
echo div classtitle文件 a href{$folder}{$fename} target_blank{$folder}{$fename}/a 保存成功span classright$encode/span/div\n;
echo div classbox请选择 a href{$meurl}?ophomefolder{$_SESSION[folder]}返回目录/a 或者 a href{$meurl}?opeditfename{$fename}folder{$folder}继续编辑/a/div\n;
$fp null;
mainbottom();
}else{
printerror(文件保存出错);
}
}else{
home();
}
}
function cr() {
global $meurl, $folder;
maintop(创建);
echo form action{$meurl}?opcreate methodpost\n
.div classtitle创建文件 或 目录 span classrightselect nameisfolder stylewidth:100px;height:20px;padding:0;margin:0;margin-top:-2px;font-size:12px;option value0文件 File/option\n
.option value1文件夹 Dir/option/select/span/divdiv classbox styleborder-bottom:nonelabel fornfname文件名/labelinput typetext size20 idnfname placeholder请输入文件名…… namenfname classtext long\n
./divinput typetext classtext idndir stylewidth:calc(100% - 12px);margin:0; namendir placeholder目标目录…… value.$_SESSION[folder].;
echo input typehidden namefolder value$folder\n
.input typesubmit value创建 classright button mob\n
./form\n;
mainbottom();
}
function create($nfname, $isfolder, $ndir) {
global $meurl, $folder;
if (!$nfname ) {
$ndir gCode($ndir);
$nfname gCode($nfname);
if ($isfolder 1) {
if(mkdir($ndir./.$nfname, 0755)) {
$ndir uCode($ndir);
$nfname uCode($nfname);
maintop(创建);
echo div classtitle您的目录a href{$meurl}?ophomefolder./.$nfname./.$ndir.$nfname.//a 已经成功被创建。/divdiv classbox\n
.请选择 a href{$meurl}?ophomefolder.$ndir.$nfname./打开文件夹/a 或者 a href{$meurl}?ophomefolder.$_SESSION[folder].返回目录/a\n;
echo /div;
mainbottom();
}else{
$ndir uCode($ndir);
$nfname uCode($nfname);
printerror(您的目录 .$ndir.$nfname. 不能被创建。请检查您的目录权限是否已经被设置为可写 或者 目录是否已经存在/span\n);
}
}else{
if($wr fopen($ndir./.$nfname, w)) {
$tx \xEF\xBB\xBF 文件 .uCode($nfname);
fwrite($wr,$tx);
fclose($wr);
$ndir uCode($ndir);
$nfname uCode($nfname);
maintop(创建);
echo div classtitle您的文件, a href{$meurl}?opviewframefile.$nfname.folder$ndir.$ndir.$nfname./a 已经成功被创建/divdiv classbox\n
.a href{$meurl}?opeditfename.$nfname.folder.$ndir.编辑文件/a 或者是 a href{$meurl}?ophomefolder.$_SESSION[folder].返回目录/a\n;
echo /div;
mainbottom();
}else{
$ndir uCode($ndir);
$nfname uCode($nfname);
printerror(您的文件 .$ndir.$nfname. 不能被创建。请检查您的目录权限是否已经被设置为可写 或者 文件是否已经存在/span\n);
}
}
}else{
cr();
}
}
function ren($file) {
global $meurl,$folder,$ufolder;
$ufile $file;
if (!$file ) {
maintop(重命名);
echo form action{$meurl}?oprename methodpost\n
.div classtitle重命名 .$ufolder.$ufile./div;
echo input typehidden namerename value.$ufile.\n
.input typehidden namefolder value.$ufolder.\n
.input classtext typetext stylewidth:calc(100% - 12px);margin:0; placeholder请输入文件名…… namenrename value$ufile\n
.input typeSubmit value重命名 classright button mob/form\n;
mainbottom();
}else{
home();
}
}
function renam($rename, $nrename, $folder) {
global $meurl,$folder;
if (!$rename ) {
$loc1 gCode($folder.$rename);
$loc2 gCode($folder.$nrename);
if(rename($loc1,$loc2)) {
maintop(重命名);
echo div classtitle文件 .$folder.$rename. 已被重命名成 .$folder.$nrename./a/div\n
.div classbox请选择 a href{$meurl}?ophomefolder.$_SESSION[folder].返回目录/a 或者 a href?opeditfename{$nrename}folder{$folder}编辑新文件/a/div\n;
mainbottom();
}else{
printerror(重命名出错);
}
}else{
home();
}
}
function movall($file, $ndir, $folder) {
global $meurl,$folder;
if (!$file ) {
maintop(批量移动);
$arr str_split($ndir);
if($arr[count($arr)-1]!/){
$ndir . /;
}
$nndir $ndir;
$nfolder $folder;
$file gCode($file);
$ndir gCode($ndir);
$folder gCode($folder);
if (!file_exists($ndir)){
mkdir($ndir, 0755);
}
$file explode(,,$file);
echo div classtitle您可以 a href{$meurl}?ophomefolder{$nndir}前往文件夹查看文件/a 或者 a href{$meurl}?ophomefolder.$_SESSION[folder].返回目录/a/divtextarea rows20 disabled;
foreach ($file as $v) {
if (file_exists($ndir.$v)){
if (rename($folder.$v, $ndir.$v.(1))){
$v uCode($v);
echo $nndir.$v. 文件已存在自动更名为 {$nndir}(1)\n;
}else{
$v uCode($v);
echo 无法移动 .$nfolder.$v.请检查文件权限\n;
}
}elseif (rename($folder.$v, $ndir.$v)){
$v uCode($v);
echo $nfolder.$v. 已经成功移动到 .$nndir.$v.\n;
}else{
$v uCode($v);
echo 无法移动 .$nfolder.$v.请检查文件权限或文件是否存在\n;
}
}
echo /textarea;
mainbottom();
}else{
home();
}
}
function tocopy($file, $ndir, $folder) {
global $meurl,$folder;
if (!$file ) {
maintop(复制);
$nndir $ndir;
$nfolder $folder;
$file gCode($file);
$ndir gCode($ndir);
$folder gCode($folder);
if (!file_exists($ndir)){
mkdir($ndir, 0755);
}
$file explode(,,$file);
echo div classbox您可以 a href{$meurl}?ophomefolder.$nndir.前往文件夹查看文件/a 或者 a href{$meurl}?ophomefolder.$_SESSION[folder].返回目录/a/divtextarea rows20 disabled;
foreach ($file as $v) {
if (file_exists($ndir.$v)){
if (copy($folder.$v, $ndir.$v.(1))){
$v iconv(GBK, UTF-8,$v);
echo {$nndir}{$v} 文件已存在自动更名为 {$nfolder}{$v}(1)\n;
}else{
$v iconv(GBK, UTF-8,$v);
echo 无法复制 {$nfolder}{$v}请检查文件权限\n;
}
}elseif (copy($folder.$v, $ndir.$v)){
$v iconv(GBK, UTF-8,$v);
echo $nfolder.$v. 已经成功复制到 .$nndir.$v.\n;
}else{
$v iconv(GBK, UTF-8,$v);
echo 无法复制 .$nfolder.$v.请检查文件权限\n;
}
}
echo /textarea;
mainbottom();
}else{
home();
}
}
function logout() {
global $meurl;
setcookie(muser,,time()-60*60*24*1);
setcookie(mpass,,time()-60*60*24*1);
maintop(注销,false);
echo div classbox注销成功br
.a href{$meurl}?ophome点击这里重新登录/a/dvi;
mainbottom();
}
function mainbottom() {
echo /divdiv styletext-align:center;font-size:13px;color:#999 !important;margin:10px 0 45px 0;font-family:Candara;
.FileBox Version 1.10.0.1/div/body\n
./html\n;
exit;
}
function printerror($error) {
maintop(错误);
echo div classtitle错误信息如下/divdiv classboxspan classerror stylefont-size:12px;\n.$error.\n/span a onclickhistory.go(-1); stylecursor:pointer;font-size:12px;返回上一步/a/div;
mainbottom();
}
function deleteall($dename) {
if (!$dename ) {
$udename $dename;
$dename gCode($dename);
if (is_dir($dename)) {
if(is_empty_dir($dename)){
rmdir($dename);
echo $udename. 已经被删除\n;
}else{
deltree($dename);
rmdir($dename);
echo $udename. 已经被删除\n;
}
}else{
if(unlink($dename)) {
echo $udename. 已经被删除\n;
}else{
echo(无法删除文件$udename 。\n参考信息\n1.文件不存在\n2.文件正在执行\n);
}
}
}
}
switch($action) {
case 删除:
if(isset($_POST[select_item])){
maintop(删除);
echo div classbox您可以 a href{$meurl}?ophomefolder.$_SESSION[folder].返回目录/a/div\n;
echo textarea rows15 disabled;
if($_POST[select_item][d]){
foreach($_POST[select_item][d] as $val){
deleteall($val);
}
}
if($_POST[select_item][f]){
foreach($_POST[select_item][f] as $val){
if(deleteall($val)){}
}
}
echo /textarea;
mainbottom();
}else{
printerror(您没有选择文件);
}
break;
case 移动:
if(isset($_POST[select_item])){
maintop(批量移动);
$file ;
if($_POST[select_item][d]){
foreach($_POST[select_item][d] as $key $val){
$file $file.$key.,;
}
}
if($_POST[select_item][f]){
foreach($_POST[select_item][f] as $key $val){
$file $file.$key.,;
}
}
$file substr($file,0,-1);
echo form action{$meurl}?opmovall methodpost;
echo div classtitle移动文件/divdiv classboxinput typehidden namefile value.$file.input typehidden namefolder value.$_SESSION[folder].您将把下列文件移动到
.input typetext classtext namendir value.$_SESSION[folder].\n
./divtextarea rows15 disabled.$file./textarea;
echo input typesubmit value移动 border0 classright button mob\n;
mainbottom();
}else{
printerror(您没有选择文件);
}
break;
case 复制:
if(isset($_POST[select_item])){
maintop(复制);
$file ;
if($_POST[select_item][d]){
foreach($_POST[select_item][d] as $key $val){
$file $file.$key.,;
}
}
if($_POST[select_item][f]){
foreach($_POST[select_item][f] as $key $val){
$file $file.$key.,;
}
}
$file substr($file,0,-1);
echo form action{$meurl}?opcopy methodpost;
echo div classtitle复制文件/divdiv classboxinput typehidden namefile value.$file.input typehidden namefolder value.$_SESSION[folder].您将把下列文件复制到
.input typetext classtext namendir value.$_SESSION[folder].\n
./divtextarea rows15 disabled.$file./textarea;
echo input typesubmit value复制 border0 classright button mob\n;
mainbottom();
}else{
printerror(您没有选择文件);
}
break;
case 压缩:
if(isset($_POST[select_item])){
if(class_exists(ZipArchive)){
maintop(目录压缩);
$tame date(Ymd_His, time());
$tame . _ . rand(101010,909090);
echo !--div classbox $tame /div--;
echo div classbox您可以 a href{$meurl}?ophomefolder.$_SESSION[folder].查看文件夹/a 或者 a href./Bak-{$tame}.zip下载文件/a 或者 a href{$meurl}?ophome返回目录/a/div;
echo textarea rows15 disabled;
class Zipper extends ZipArchive {
public function addDir($path) {
if($_POST[select_item][d]){
foreach($_POST[select_item][d] as $key $val){
$val substr($val,2);
$val gCode($val);
$this-addDir2($val);
}
}
if($_POST[select_item][f]){
foreach($_POST[select_item][f] as $key $val){
$val substr($val,2);
echo $val.\n;
$this-addFile($val);
}
$this-deleteName(./);
}
}
public function addDir2($path) {
$nval iconv(GBK, UTF-8,$path);
echo $nval.\n;
$this-addEmptyDir($path);
$dr opendir($path);
$i0;
while (($file readdir($dr)) ! false){
if($file!. $file!..){
$nodes[$i] $path./.$file;
$i;
}
}
closedir($dr);
foreach ($nodes as $node) {
$nnode iconv(GBK, UTF-8,$node);
echo $nnode . \n;
if (is_dir($node)) {
$this-addDir2($node);
}elseif(is_file($node)){
$this-addFile($node);
}
}
}
}
$rip $tame;
$zip new Zipper;
$res $zip-open($_SESSION[folder].Bak- . $rip . .zip, ZipArchive::CREATE);
if ($res TRUE) {
$f substr($_SESSION[folder], 0, -1);
$zip-addDir($f);
$zip-close();
echo 压缩完成文件保存为 Bak-.$rip..zip /textarea\n;
}else{
echo span classerror压缩失败/span
./textarea\n;
}
mainbottom();
}else{
printerror(此服务器上的PHP不支持ZipArchive无法压缩文件);
}
}else{
printerror(您没有选择文件);
}
break;
case 权限:
if($os ! windows){
if(isset($_POST[select_item])){
maintop(修改权限);
echo div classtitlea href{$meurl}?ophomefolder.$_SESSION[folder].返回目录/a/div\n;
echo textarea rows20 disabled;
$chmod octdec(htmlentities($_REQUEST[chmod]));
function ChmodMine($file, $chmod){
$nfile $file;
$file gCode($file);
if(is_file($file)){
if(chmod($file, $chmod)){
echo 文件.$nfile. 权限修改成功\n;
}else{
echo 文件.$nfile. 权限修改失败\n;
}
}elseif(is_dir($file)){
if(chmod($file, $chmod)){
echo 文件夹.$nfile. 权限修改成功\n;
}else{
echo span classerror文件夹.$nfile. 权限修改失败\n;
}
$foldersAndFiles scandir($file);
$entries array_slice($foldersAndFiles, 2);
foreach($entries as $entry){
$nentry iconv(GBK, UTF-8,$entry);
ChmodMine($nfile./.$nentry, $chmod);
}
}else{
echo $nfile. 文件不存在\n;
}
}
if($_POST[select_item][d]){
foreach($_POST[select_item][d] as $val){
ChmodMine($val,$chmod);
}
}
if($_POST[select_item][f]){
foreach($_POST[select_item][f] as $val){
ChmodMine($val,$chmod);
}
}
echo /textarea;
mainbottom();
}else{
printerror(您没有选择文件);
}
}else{printerror(Windows系统无法修改权限。);}
break;
}
switch($op) {
case home:
home();
break;
case up:
up();
break;
case yupload:
$uzip (isset($_REQUEST[unzip]))?htmlentities($_REQUEST[unzip]):;
$delz (isset($_REQUEST[delzip]))?htmlentities($_REQUEST[delzip]):;
if(!isset($_REQUEST[url])){
printerror(您没有输入文件地址);
}elseif(isset($_REQUEST[ndir])){
yupload($_REQUEST[url], $_REQUEST[ndir], $uzip,$delz);
}else{
yupload($_REQUEST[url], ./,$uzip,$delz);
}
break;
case upload:
$uzip (isset($_REQUEST[unzip]))?htmlentities($_REQUEST[unzip]):;
$delz (isset($_REQUEST[delzip]))?htmlentities($_REQUEST[delzip]):;
if(!isset($_FILES[upfile])){
printerror(您没有选择文件);
}elseif(isset($_REQUEST[ndir])){
upload($_FILES[upfile], $_REQUEST[ndir], $uzip ,$delz);
}else{
upload($_FILES[upfile], ./, $uzip ,$delz);
}
break;
case unz:
unz($_REQUEST[dename]);
break;
case unzip:
$dell (isset($_REQUEST[del]))?htmlentities($_REQUEST[del]):;
unzip($_REQUEST[dename],$_REQUEST[ndir],$dell);
break;
case edit:
edit($_REQUEST[fename]);
break;
case save:
$ecode (isset($_REQUEST[encode]))?htmlentities($_REQUEST[encode]):UTF-8;
save($_REQUEST[ncontent], $_REQUEST[fename], $ecode);
break;
case cr:
cr();
break;
case create:
create($_REQUEST[nfname], $_REQUEST[isfolder], $_REQUEST[ndir]);
break;
case ren:
ren($_REQUEST[file]);
break;
case rename:
renam($_REQUEST[rename], $_REQUEST[nrename], $folder);
break;
case movall:
movall($_REQUEST[file], $_REQUEST[ndir], $folder);
break;
case copy:
tocopy($_REQUEST[file], $_REQUEST[ndir], $folder);
break;
case printerror:
printerror($error);
break;
case logout:
logout();
break;
case z:
z($_REQUEST[dename],$_REQUEST[folder]);
break;
case zip:
zip($_REQUEST[dename],$_REQUEST[folder]);
break;
case mima:
echo md5($_REQUEST[mi].$toke);
break;
default:
$op home;
home();
break;
}
?