<?php
/**
 * url_jscript_view - View for PDF generation based on an input URL. Include Jscript for SVG and math.
 *
 * @author $Author: dtong $
 * @version $Id: url_jscript_view.php,v 1.10 2011/04/14 15:12:37 dtong Exp $
 * @copyright Copyright (c) 2009, Tiller Software Co., Ltd.
*/
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<?php
	if (isset($use_jscript) && $use_jscript) {
?>
	<script type="text/javascript" src="<?php echo osa_include_path()?>js/app.js"></script>
	<script type="text/javascript" src="<?php echo osa_include_path()?>js/sys.js"></script>
	<script type="text/javascript" src="<?php echo osa_include_path()?>js/tiny_mce/plugins/asciimath/js/ASCIIMathMLwFallback.js"></script>
	<script type="text/javascript" src="<?php echo osa_include_path()?>js/tiny_mce/plugins/asciisvg/js/ASCIIsvgPI.js"></script>
<?php
		$this->load->view('template/jscript_globalvars_view');
	}
	osa_appcss_include()
?>
</head>
<body>
<?php

	if ( isset($url_link) && !empty($url_link) ) {
		echo osa_get_url_content($url_link);
	}
	elseif ( isset($output) && !empty($output) ) {
		echo $output;
	}
	elseif ( isset($display) && !empty($display) ) {
		$this->load->view("mapping/result_list_view");
	}
	else {
		osa_errorlog( __FILE__ . ' - In view url_jscript_view, no output or display object.');
		echo '<br /><br /><center><h2><font color="red">' . lang('gen_pdf_failed_msg_inpdf') . '</font></h2></center>';
	}
?>
</body>
</html>