<?php
	require("../__common__/__define_common.php");
	require("../__common__/include-common-all.php");
	require("../account/__logincheck.php");

	$file_name = my_GET('file').'';
	if ($file_name == '') {
		exit;
	}
	if (mb_check_encoding($file_name, _SYSTEM_FILE_ENCODING)) {
		$file_name = myfile_DECODE($file_name);
	}
	$fp = fopen(myfile_ENCODE($file_name), "rb");
	if ($fp) {
		if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
			$file_name = myfile_ENCODE(substr($file_name,strrpos($file_name,'/')+1));
		} else {
			$file_name = urlencode(substr($file_name,strrpos($file_name,'/')+1));
		}
		header('Content-type: '.$mime_type.'; name='.$file_name);
		header('Content-Disposition: inline; filename='.$file_name);
		fpassthru($fp);
	}
?>
