// 1.5 branche creation

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@5881 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2011-04-12 18:24:40 +00:00
commit 10445ad61d
5317 changed files with 432110 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
/**
* delete selected files
* @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
* @link www.phpletter.com
* @since 22/April/2007
*
*/
require_once('../../config/config.inc.php');
require_once('../init.php');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path']))
{
$path = $_GET['path'];
//check if the file size
$fileSize = @filesize($path);
if($fileSize > getMemoryLimit())
{//larger then the php memory limit, redirect to the file
header('Location: ' . $path);
exit;
}else
{//open it up and send out with php
downloadFile($path);
}
}else
{
die(ERR_DOWNLOAD_FILE_NOT_FOUND);
}
?>