📄 tempftp.php
字号:
<?php
include( "../config.inc.php" );
include( "../includes/SysGlobal.php" );
include( "language/".$aLan."_".$charset.".php" );
include( "../includes/version.php" );
include( "../includes/pro.php" );
include( "func/adm.inc.php" );
include( "func/common.inc.php" );
include( "func/link.inc.php" );
include( "func/temp.inc.php" );
include( "func/db.inc.php" );
include( "func/nocatch.php" );
needauth( 14 );
echo "<html>\r\n<head >\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo $charset;
echo "\">\r\n<link id=\"style_sheet\" href=\"css/commonstyle.css\" type=\"text/css\" rel=\"stylesheet\">\r\n<title>";
echo $strAdminTitle;
echo "</title>\r\n</head>\r\n\r\n<body class=\"NavigatorBar\">\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" background=\"images/mu8.gif\" height=\"30\" >\r\n <tr> \r\n <td > <img src=\"images/bar.gif\" > ";
echo $strTempFileGl;
echo "</td>\r\n <td width=\"70\" align=\"center\" > </td>\r\n </tr>\r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" background=\"images/mu1.jpg\" height=\"5\">\r\n <tr> \r\n <td></td>\r\n </tr>\r\n</table>\r\n";
$step = $_REQUEST['step'];
$fold = $_REQUEST['fold'];
if ( $fold == "" || strstr( $fold, "/" ) || strstr( $fold, ":" ) )
{
echo "No rights for this fold";
exit( );
}
$openfold = "../templates/".$fold;
$imagefold = "../templates/".$fold."/images";
if ( $step == "upfile" )
{
$pic = $_FILES['jpg'];
if ( 0 < $pic['size'] )
{
uploadtemp( $pic['tmp_name'], $pic['type'], $pic['name'], $pic['size'], $openfold );
}
else
{
err( $strDownNotice9, "tempftp.php", "" );
}
}
if ( $step == "upimg" )
{
$pic = $_FILES['jpg'];
if ( 0 < $pic['size'] )
{
uploadtemp( $pic['tmp_name'], $pic['type'], $pic['name'], $pic['size'], $imagefold );
}
else
{
err( $strDownNotice9, "tempftp.php", "" );
}
}
if ( $step == "delimg" )
{
$fname = $_REQUEST['fname'];
if ( !strstr( $fname, "/" ) && file_exists( $imagefold."/".$fname ) )
{
unlink( $imagefold."/".$fname );
}
}
if ( $step == "delfile" )
{
$fname = $_REQUEST['fname'];
if ( !strstr( $fname, "/" ) && file_exists( $openfold."/".$fname ) )
{
unlink( $openfold."/".$fname );
}
}
echo " \r\n<table width=\"98%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"420\" align=\"center\">\r\n <tr> \r\n <td valign=\"top\"> <br>\r\n <table width=\"380\" border=\"0\" align=\"center\" cellpadding=\"4\" cellspacing=\"0\" style=\"border:1px #cccccc solid\" bgcolor=\"#f0f0f0\" height=\"415\">\r\n <tr>\r\n <td align=\"center\" width=\"30\" > </td>\r\n <td align=\"center\" height=\"30\" > </td>\r\n ";
echo " </tr>\r\n <tr>\r\n <td width=\"30\" > </td>\r\n <form method=\"post\" action=\"tempftp.php\" enctype=\"multipart/form-data\">\r\n <td height=\"50\" > ";
echo $strTempFileUpload;
echo ": <br>\r\n <input type=\"file\" name=\"jpg\">\r\n <input type=\"submit\" name=\"Submit\" value=\"";
echo $strHtmlFlashUpload;
echo "\">\r\n <input type=\"hidden\" name=\"step\" value=\"upfile\">\r\n <input type=\"hidden\" name=\"fold\" value=\"";
echo $fold;
echo "\">\r\n </td>\r\n </form>\r\n </tr>\r\n <tr>\r\n <td height=\"60\" > </td>\r\n <form method=\"post\" action=\"tempftp.php\" enctype=\"multipart/form-data\">\r\n <td height=\"60\" > ";
echo $strTempImgUpload;
echo ": <br>\r\n <input type=\"file\" name=\"jpg\">\r\n <input type=\"submit\" name=\"Submit2\" value=\"";
echo $strHtmlFlashUpload;
echo "\">\r\n <input type=\"hidden\" name=\"step\" value=\"upimg\">\r\n <input type=\"hidden\" name=\"fold\" value=\"";
echo $fold;
echo "\">\r\n </td>\r\n </form>\r\n </tr>\r\n <tr>\r\n <td align=\"center\" width=\"30\" > </td>\r\n <td align=\"center\" > </td>\r\n </tr>\r\n </table>\r\n </td>\r\n <td width=\"600\" valign=\"top\"> <br>\r\n <table width=\"600\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"cccccc\">\r\n <tr bgcolor=\"#f0f0f0\"> \r\n <td>";
echo $strDownList4;
echo "</td>\r\n <td bgcolor=\"#f0f0f0\" width=\"60\">";
echo $strDownAddSize;
echo "</td>\r\n <td bgcolor=\"#f0f0f0\" width=\"130\">";
echo $strUptime;
echo "</td>\r\n <td bgcolor=\"#f0f0f0\" width=\"50\">";
echo $strDownList5;
echo " </td>\r\n <td bgcolor=\"#f0f0f0\" width=\"50\">";
echo $strDelete;
echo "</td>\r\n </tr>\r\n </table>\r\n <table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >\r\n\t\t<tr bgcolor=\"#ffffff\"> \r\n <td colspan=4 height=3></td>\r\n \r\n </tr>\r\n </table>\r\n \r\n \r\n <div id=\"Layer1\" style=\"position:absolute; width:600px; height:390; z-index:1; overflow: auto;border:1px #cccccc solid; \"> \r\n <table width=\"100%\" border=\"0\" c";
echo "ellspacing=\"1\" cellpadding=\"1\" bgcolor=\"#FFFFFF\" height=380>\r\n <tr valign=\"top\"> \r\n <td> \r\n \r\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\r\n <tr id=\"imgclose\"> \r\n <td width=\"18\" style=\"cursor:hand\" onClick=\"imgclose.style.display='none';imgopen.style.displ";
echo "ay='block'; showimg.style.display='block'\"><img src=\"images/plus.gif\" width=\"18\" height=\"18\"></td>\r\n <td width=\"18\" style=\"cursor:hand\" onClick=\"imgclose.style.display='none';imgopen.style.display='block'; showimg.style.display='block'\"><img src=\"images/folder.gif\" width=\"18\" height=\"18\"></td>\r\n <td colspan=\"2\" style=\"cursor:hand\" onClick=\"imgclose.style.display='none';im";
echo "gopen.style.display='block'; showimg.style.display='block'\">images</td>\r\n <td width=\"120\"> </td>\r\n <td width=\"120\"> </td>\r\n <td width=\"120\"> </td>\r\n </tr>\r\n <tr id=\"imgopen\" style=\"display:none\"> \r\n <td width=\"18\" style=\"cursor:hand\" onClick=\"imgclose.style.display='block';imgopen.style.display='none'; sho";
echo "wimg.style.display='none'\"><img src=\"images/minus.gif\" width=\"18\" height=\"18\"></td>\r\n <td width=\"18\" style=\"cursor:hand\" onClick=\"imgclose.style.display='block';imgopen.style.display='none'; showimg.style.display='none'\"><img src=\"images/folderopen.gif\" width=\"18\" height=\"18\"></td>\r\n <td colspan=\"2\" style=\"cursor:hand\" onClick=\"imgclose.style.display='block';imgopen.sty";
echo "le.display='none'; showimg.style.display='none'\">images</td>\r\n <td width=\"120\"> </td>\r\n <td width=\"120\"> </td>\r\n <td width=\"120\"> </td>\r\n </tr>\r\n </table>\r\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" id=\"showimg\" style=\"display:none\">\r\n ";
$handle = opendir( $imagefold );
while ( $filename = readdir( $handle ) )
{
$nowfile = $imagefold."/".$filename;
if ( $filename != "." && $filename != ".." && $filename != "_notes" && !strstr( $filename, "/" ) && !is_dir( $nowfile ) )
{
$fsize = ceil( filesize( $nowfile ) / 1000 );
$ftime = date( "Y-m-d H:i:s", filemtime( $nowfile ) );
$pageimg = "page_blank.gif";
if ( substr( $filename, 0 - 4 ) == ".gif" )
{
$pageimg = "page_gif.gif";
}
if ( substr( $filename, 0 - 4 ) == ".jpg" )
{
$pageimg = "page_jpg.gif";
}
if ( substr( $filename, 0 - 4 ) == ".swf" )
{
$pageimg = "page_swf.gif";
}
if ( substr( $filename, 0 - 4 ) == ".htm" )
{
$pageimg = "page_htm.gif";
}
if ( substr( $filename, 0 - 5 ) == ".html" )
{
$pageimg = "page_htm.gif";
}
if ( substr( $filename, 0 - 4 ) == ".css" )
{
$pageimg = "page_css.gif";
}
echo " \r\n <tr> \r\n <td width=\"18\"><img src=\"images/line.gif\" width=\"18\" height=\"18\"></td>\r\n <td colspan=\"3\">\r\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" >\r\n \r\n <tr> \r\n <td width=\"18\"><img src=\"images/join.gif\" width=\"18\" height=\"18\"></td>\r\n ";
echo " <td colspan=\"2\"> \r\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr> \r\n <td width=\"20\"><img src=\"images/";
echo $pageimg;
echo "\" ></td>\r\n <td>";
echo $filename;
echo "</td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n \r\n </table>\r\n </td>\r\n <td width=\"60\">";
echo $fsize;
echo "KB</td>\r\n <td width=\"130\" style=\"padding-left:5px\">";
echo $ftime;
echo "</td>\r\n <td width=\"39\" style=\"padding-left:5px\"> <a href=\"tempdl.php?step=downimg&fname=";
echo $filename;
echo "&fold=";
echo $fold;
echo "\" target=\"down\"><img src=\"images/down.gif\" border=\"0\"></a> \r\n </td>\r\n <td width=\"39\" style=\"padding-left:10px\"> <a href=\"tempftp.php?step=delimg&fname=";
echo $filename;
echo "&fold=";
echo $fold;
echo "\"><img src=\"images/resycle.gif\" border=\"0\"></a></td>\r\n </tr>\r\n ";
}
}
closedir( $handle );
echo " \r\n </table>\r\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\r\n ";
$handle = opendir( $openfold );
while ( $filename = readdir( $handle ) )
{
$nowfile = $openfold."/".$filename;
if ( $filename != "." && $filename != ".." && $filename != "_notes" && !strstr( $filename, "/" ) && !is_dir( $nowfile ) )
{
$fsize = ceil( filesize( $nowfile ) / 1000 );
$ftime = date( "Y-m-d H:i:s", filemtime( $nowfile ) );
$pageimg = "page_blank.gif";
if ( substr( $filename, 0 - 4 ) == ".gif" )
{
$pageimg = "page_gif.gif";
}
if ( substr( $filename, 0 - 4 ) == ".jpg" )
{
$pageimg = "page_jpg.gif";
}
if ( substr( $filename, 0 - 4 ) == ".swf" )
{
$pageimg = "page_swf.gif";
}
if ( substr( $filename, 0 - 4 ) == ".htm" )
{
$pageimg = "page_htm.gif";
}
if ( substr( $filename, 0 - 5 ) == ".html" )
{
$pageimg = "page_htm.gif";
}
if ( substr( $filename, 0 - 4 ) == ".css" )
{
$pageimg = "page_css.gif";
}
echo " \r\n <tr > \r\n <td width=\"18\"><img src=\"images/join.gif\" width=\"18\" height=\"18\"></td>\r\n <td width=\"18\"><img src=\"images/";
echo $pageimg;
echo "\" ></td>\r\n <td colspan=\"2\">";
echo $filename;
echo "</td>\r\n <td width=\"60\">";
echo $fsize;
echo "KB</td>\r\n <td width=\"130\" style=\"padding-left:5px\">";
echo $ftime;
echo "</td>\r\n <td width=\"39\" style=\"padding-left:5px\"><a href=\"tempdl.php?step=downfile&fname=";
echo $filename;
echo "&fold=";
echo $fold;
echo "\" target=\"down\"><img src=\"images/down.gif\" width=\"14\" height=\"14\" border=\"0\"></a></td>\r\n <td width=\"39\" style=\"padding-left:10px\"><a href=\"tempftp.php?step=delfile&fname=";
echo $filename;
echo "&fold=";
echo $fold;
echo "\"><img src=\"images/resycle.gif\" border=\"0\"></a></td>\r\n </tr>\r\n ";
}
}
closedir( $handle );
echo " \r\n </table>\r\n\r\n</td>\r\n </tr>\r\n </table>\r\n </div>\r\n \r\n </td>\r\n </tr>\r\n</table>\r\n";
if ( $step == "upimg" || $step == "delimg" )
{
echo "<script>\r\n\t\timgclose.style.display='none';\r\n\t\timgopen.style.display='block';\r\n\t\tshowimg.style.display='block';\r\n\t\t</script>";
}
echo "<iframe src='0.htm' name='down' height='1' width='1' scrolling='0' marginheight='0' frameborder='0'>IE</iframe> \r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -