Location: PHPKode > projects > Oyster FSS Dragon > oydrgn/download.php
<?php
	require_once("./System/Kernel/kernel.php");
	if (!OYIsLoggedIn() and USE_PASSWORD) header("Location: desktop.php");
	$template = new Template();
	$template->_template_read("./System/Design/".DESIGN."/Templates/download.tpl");
	$template->_template_assign("DESIGN", DESIGN);
	$template->_template_assign("BROWSER_TITLE", OYLoadLanguageString("./System/Kernel/Language/".OYGetPref("USE_LANG")."/Core.xml", "DOWNLOAD_BROWSER_TITLE"));
	
	$file = NWCompletePath($_GET["file"]);
	
	if (OYIsRestricted($file) OR !file_exists($file)){
		$template->_template_assign("DOWNLOAD_NOT_AVAILABLE", OYLoadLanguageString("./System/Kernel/Language/".OYGetPref("USE_LANG")."/Core.xml", "DOWNLOAD_NOT_AVAILABLE"));
		echo $template->_template_toHTML();
		exit();
	}
	
	$dateiname = basename($file);
	header('Content-type: application/download');
	header('Content-Disposition: attachment; filename="'.$dateiname.'"');
	readfile($file);
?>
Return current item: Oyster FSS Dragon