?? tempdl.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/db.inc.php");
include("func/nocatch.php");
NeedAuth(14);
$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=="downimg"){
$fname=$_REQUEST["fname"];
if(!strstr($fname,"/") && file_exists($imagefold."/".$fname)){
header("Content-type: application/octetstream");
header("Content-disposition: attachment;filename=".$fname);
header("Pragma: no-cache");
header("Expires: 0");
$client=getenv("HTTP_USER_AGENT");
if (ereg('[^(]*\((.*)\)[^)]*',$client,$regs)) {
$os = $regs[1];
if (eregi("Win",$os)) $crlf="\r\n";
}
$fd=fopen($imagefold."/".$fname,"r");
$con=fread($fd,filesize($imagefold."/".$fname));
fclose($fd);
echo $con;
exit;
}
}
if($step=="downfile"){
$fname=$_REQUEST["fname"];
if(!strstr($fname,"/") && file_exists($openfold."/".$fname)){
header("Content-type: application/octetstream");
header("Content-disposition: attachment;filename=".$fname);
header("Pragma: no-cache");
header("Expires: 0");
$client=getenv("HTTP_USER_AGENT");
if (ereg('[^(]*\((.*)\)[^)]*',$client,$regs)) {
$os = $regs[1];
if (eregi("Win",$os)) $crlf="\r\n";
}
$fd=fopen($openfold."/".$fname,"r");
$con=fread($fd,filesize($openfold."/".$fname));
fclose($fd);
echo $con;
exit;
}
}
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -