ruạṛ
<?php /** * Get and stream file * direct file access is blocked by .htaccess * @version 0.9 * @author Robert Urquhart <programmer@activatedesign.co.nz> * @package WEP-CMS * @since KPMG */ session_start(); require_once $_SERVER['DOCUMENT_ROOT'].'/admin/scripts-includes/universal.php'; $connID = connect_to_db(); /** * get file details * @var int $file_id * @var object $n file object containing record to be downloaded */ $file_id = is_numeric_id($_GET['file']); $n = new file($file_id); $message = ''; if((MODULE_FILES_REQUIRE_LOGIN && !$customer->logged_in) || !$n->download(false) //active files only ) { getout($message); } // else file will have been streamed, no redirect necessary exit; ?>
cải xoăn