Location: PHPKode > projects > COWeb (Common Objects for Web) > coweb-0.4.1/include/parser.inc.php
<?

// Module de parsing
// Ecrit par Sebastien DIAZ
// Distribue sous license GPL

if (! defined("PARSE"))
{
	define("PARSE",1);

	function Parse($template)
	{
		$template=file($template);
		$template=implode("",$template);
		$template=ereg_replace("##","$"."this->", $template);
		$template=ereg_replace("'","&#039", $template);
		$template=addslashes($template);
		$template="\$template=\"$template\";";
		return $template;
	}

	function ParseParam($param)
	{
		$str=getenv("QUERY_STRING");
		if ($str != "")
		{
			$str=ereg_replace("$param=[0-9]&","&", $str);
			$str=ereg_replace("$param=[0-9]","", $str);
			if ($str != "") $str="&".$str;
		}
		return $str;
	}

}
?>
Return current item: COWeb (Common Objects for Web)