Location: PHPKode > projects > Runner > runner_include/functions_template.php
<?php
/**********************************************************************
 * 
 *                     Functions for Templates
 *             Anything not specific to the used template
 * 
 **********************************************************************
 *  Copyright 2008
 * 
 *  This file is part of Runner.
 * 
 *  Runner is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  Runner is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with Runner.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  
*/


	function _remove_direct_php(&$txt)
	{
		$php = array(
		'#<script\s+language\s*=\s*(["\']?)php\1\s*>.*?</script\s*>#s',
		'#<\?(?:php)?(?:[^\?]+?)\s*[\?\>]{2}#s');
		if(DEBUG == 'true')
			$txt = preg_replace($php, 'NO PHP ALLOWED', $txt);
		else
			$txt = preg_replace($php, '<!--NO PHP ALLOWED-->', $txt);
	}

	function  compile_error($string, $file, $line)
	{
		if(is_array($file))
			$file = array_pop($file);
		if(is_array($line))
			$line = array_pop($line);			
		die("<br><font size='3'><b>Compile Error:</b></font> $string in <b>$file</b> on line <b>$line</b>;");
	}
	

?>
Return current item: Runner