Location: PHPKode > projects > gframe > gframe/template.php
<?PHP

// This file is for all functions around smarty, the compiling template (http://smarty.php.net)



// include Smarty class ....

include('smarty/Smarty.class.php');



function create_info_page($message, $path = NULL, $compile_path = NULL)
{
		
		// if no path was given, use the standard gframe path
		
		if( !isset($path) )
			$path = dirname($_SERVER['PATH_TRANSLATED']) . "/templates" ;
			
		if( !isset($compile_path) )
			$compile_path = dirname($_SERVER['PATH_TRANSLATED']) . "/templates_c" ;
		
		// output the message template
		
		$smarty = new Smarty;
		
		$smarty->template_dir = $path;
		$smarty->compile_dir = $compile_path;
		
		$smarty->assign('message', $message);
		
		$smarty->display("message.tpl");
		die();	
}

function show_info_page($page, $path = NULL, $compile_path = NULL)
{
		
		// if no path was given, use the standard gframe path
		
		if( !isset($path) )
			$path = dirname($_SERVER['PATH_TRANSLATED']) . "/templates" ;
			
		if( !isset($compile_path) )
			$compile_path = dirname($_SERVER['PATH_TRANSLATED']) . "/templates_c" ;
		
		// output the message template
		
		$smarty = new Smarty;
		
		$smarty->template_dir = $path;
		$smarty->compile_dir = $compile_path;
		
		$smarty->display("$page");
		die();	
}

?>
Return current item: gframe