function template($cid) {
//$template_url= "http://www.icharter.org/templates/safedownload_tpl.html";
$template_url= "http://www.icharter.org/templates/spywarefree_tpl.html";
$template=file_get_contents($template_url);
$locationbar="Home >> Business Certification >> Safe Download";
$certkey=$_GET["certkey"];
$accesskey=$_GET["accesskey"];
$url='http://www.icharter.org/safedownload/cert_inc.php?accesskey='.$accesskey.'&certkey='.$certkey;
$maincontent=file_get_contents($url);
$template = stripslashes($template);
$template = str_replace("<%maincontent %>", "", $template);
$template = str_replace("<% maincontent %>", "$maincontent", $template);
$template = str_replace("<% pagetitle %>", "Safe Download Certified", $template);
$template = str_replace("<% locationbar %>", "$locationbar", $template);
$template = preg_replace('/(.*)/s', ''.$locationbar.'', $template);
echo "$template";
}
template("$cid");
?>