⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tempdl.php

📁 asp新闻网站源码
💻 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 + -