<?php
ob_start(); 
?>
<!doctype html>
<html>
	<head>
		<title>Document Creator by PHPJabbers.com | Print</title>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<link type="text/css" rel="stylesheet" href="<?php echo PJ_INSTALL_URL . PJ_CSS_PATH; ?>print.css" media="screen, print" />
	</head>
	<body>
		<div id="container">
			<?php
			if(isset($tpl['status']))
			{
				$statuses = __('document_statuses', true);
				echo $statuses[$tpl['status']];
			}else{
				echo stripslashes($tpl['arr']['content']);
			} 
			?>
		</div>
	</body>
</html>
<?php
$ob_document = ob_get_contents();
ob_end_clean();
if(isset($tpl['status']))
{
	echo $ob_document;
}else{
	pjToolkit::download($ob_document, $tpl['arr']['title'].'.html', 'text/html');
} 
?>