<?php
session_start();
$doc_file = (stripslashes($_GET['filein']));
$doctype_id =  (int)(stripslashes($_GET['type']));
$fload = "doc".$doctype_id."/".$doc_file;
if(!isset($_SESSION['sys_id'])){
	$_SESSION['temp_url'] = "http://report.etllao.com/new_report/document/file_in/$fload"; 
	header("Location: ../?d=index&poplogin=on");
}else{
	$url_download = "http://report.etllao.com/new_report/document/file_in/$fload";
	
	//unset($_SESSION['temp_url']);
	header('Content-type: application/pdf');
	header('Content-Disposition: attachment; filename="'.$doc_file.'"');
	readfile($url_download);
	// header("Location: ../?d=document/docin/docin");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>
<!--
<body onload="window.location='<?php//  echo $url_download; ?>'"> 

</body>
-->
<script>
window.close();
</script>
</html>


