示例#1
0
if ( $RUN['view']=='print' && $RUN['view0']!='print0'  ) {
	if ($op=="competition" || $op=="comp" || $op=="stat_flights" || $op=='pilot_profile_stats') {
		
		if ($RUN['remote']=='remote') {
			$url="http://".$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"].'0';
			echo "START PDF\n";
			echo "PDF URL:$url\n";	
			echo "END PDF\n";
			//echo "Will make pdf out of $url<BR>";			
		} else {
			require_once dirname(__FILE__)."/CL_pdf.php";
			$url="http://".$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"].'0';
			echo "Wil make pdf out of $url<BR>";
			
			$pdfFile=leoPdf::createPDF($url,md5($url));
			if ($pdfFile) {				
				echo "<a href='".$moduleRelPath.'/'.$CONF['pdf']['tmpPathRel'].'/'.$pdfFile."' target='_blank'>PDF is ready</a>";
				
				echo "\n\n".$moduleRelPath.'/'.$CONF['pdf']['tmpPathRel'].'/'.$pdfFile;
			} else {				
				echo "ERROR: PDF creation failed";
			}
		}					
		
		exit;
	}
}
	
if ($op=="index_full") {
	require $LeoCodeBase."/GUI_index_full.php";