0){ # id > 0 when clicked for a superbreak hotel require("show-hotel.php"); }else{ $maincontent=join('',file('_frontpage.html')); $rightcontent="Local finder for all your local needs in Britain"; } //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // MAKE THE SUBSTITUTIONS $response = $template; $response = str_replace("[title]",$title,$response); $response = str_replace("[description]",$description,$response); $response = str_replace("[keywords]",$keywords,$response); $response = str_replace("[main content]",$maincontent,$response); $response = str_replace("[heading]",$heading,$response); # this must be after the maincontent replacement $response = str_replace("[head content]",$headcontent,$response); $response = str_replace("[background colour]",$bgnd_colour,$response); $response = str_replace("[main colour]",$main_colour,$response); $response = str_replace("[footer colour]",$foot_colour,$response); $response = str_replace("[mainboxcolor]",$box_bgnd,$response); $response = str_replace("[location]",$location,$response); $response = str_replace("[Location]",$Clocation,$response); $response = str_replace("[LOCATION]",$Ulocation,$response); $response = str_replace("[county]",$county,$response); $response = str_replace("[County]",$Ccounty,$response); $response = str_replace("[COUNTY]",$Ucounty,$response); $response = str_replace("[town]",$town,$response); $response = str_replace("[Town]",$Ctown,$response); $response = str_replace("[TOWN]",$Utown,$response); $response = str_replace("[extra box 1]",$extrabox1,$response); $response = str_replace("[extra box 1 heading]",$extrabox1heading,$response); $response = str_replace("[overall width]",$overallwidth,$response); $response = str_replace("[main width]",$mainwidth,$response); $response = str_replace("[right column width]",$rightcolwidth,$response); $response = str_replace("[left column width]",$leftcolwidth,$response); $response = str_replace("[extra bottom links]",$extrabottomlinks,$response); $response = str_replace("[adsense 468x15]",$adsense468x15,$response); $response = str_replace("[adsense 468x15 boxed]",$adsense468x15boxed,$response); $response = str_replace("[related resources]",$related_resources,$response); $response = str_replace("[right content]",$rightcontent,$response); # remove the "extra box 1" box if there is no content for it and if the extra box # is in the code. it isn't there when displaying a hotel. if($extrabox1 == ""){ $start=""; $end=""; $pos=strpos($response,$start); if($pos > 0){ $temp=substr($response,0,$pos); $pos=strpos($response,$end); $response = $temp . substr($response,$pos + strlen($end)); } } //----------------------------------------------------------------------------------------------------------------------- // SEND THE PAGE print $response; exit; ?>