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

📄 down.php

📁 极限网络智能办公系统 - Office Automation 2008 官方100% 源码
💻 PHP
字号:
<?php
 

include_once( "inc/auth.php" );
if ( $SUB_DIR != "" )
{
	$SUB_DIR = urldecode( $SUB_DIR );
}
if ( $FILE_NAME != "" )
{
	$FILE_NAME = urldecode( $FILE_NAME );
}
$FB_STR1 = $FILE_NAME;
if ( strstr( $FB_STR1, "/" ) || strstr( $FB_STR1, "\\" ) )
{
	exit( );
}
if ( strstr( $SUB_DIR, "." ) )
{
	exit( );
}
$query = "SELECT * from PICTURE where PIC_ID='".$PIC_ID."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$PIC_PATH = $ROW['PIC_PATH'];
}
else
{
	exit( );
}
if ( $FILE_NAME != "" )
{
	$FILE_NAME = substr( $FILE_NAME, strrpos( $FILE_NAME, "/" ) );
	if ( $SUB_DIR != "" && substr( $PIC_PATH, strlen( $PIC_PATH ) - 1, 1 ) == "/" )
	{
		$FILE_PATH = $PIC_PATH.$SUB_DIR;
	}
	else
	{
		$FILE_PATH = $PIC_PATH."/".$SUB_DIR;
	}
	$FILE_PATH .= "/".$FILE_NAME;
	if ( !file_exists( $FILE_PATH ) )
	{
		echo "找不到指定文件";
		exit( );
	}
	ob_end_clean( );
	header( "Cache-control: private" );
	header( "Content-type: application/octet-stream" );
	header( "Accept-Ranges: bytes" );
	header( "Accept-Length: ".filesize( $FILE_PATH ) );
	header( "Content-Disposition: attachment; filename=".$FILE_NAME );
	readfile( $FILE_PATH );
}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -