<?php
/**
 * $Id: display_image.php
 * @author g_wang
 * @access public
 * @package www
 */
require_once("manager_include.inc");

// パラメータを取得
$file_name = ParamUtil::getRequestString("file_name");

$file_path = SUBJECT_DATA_PATH . "/" . $file_name;

if (file_exists($file_path)) {
	header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
	header("Cache-Control: post-check=0, pre-check=0", false);
	header("Pragma: no-cache");                 // HTTP/1.0

	$handle = fopen($file_path, "rb");
	$mp3_data = fread($handle, filesize($file_path));
	$size = getimagesize($file_path);
	header("Content-type: audio/mpeg");
	header("Content-length: " . strlen($mp3_data));
	print $mp3_data;
	fclose($handle);
	exit;
}
exit;
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
exit;