compile(); $_SERVER["meta"]["css"]["apache.css"] = "screen"; } else { // Get page contents $result = FileManager::runPhpFile(URLManager::getRequestedPath()); // Compile error if needed $contents = $result; if(is_a($result, "HTTPError")) { $contents = $result->compile(); $_SERVER["meta"]["css"]["apache.css"] = "screen"; } } ob_start(); $date = date("Y"); $header = array( "home" => array("Home", 0), "whyuseus" => array("Why Use Us", 0), "ourpeople" => array("Our People", 0), "services" => array("Services", 0), "ourclients" => array("Our Clients", 0), "contactus" => array("Contact Us", 0), "accessibility" => array("Accessibility", 1), "privacy" => array("Privacy", 1)); $headerTitle = $header['home'][0]; foreach($header as $href => $vals) { if(URLManager::getPage() == $href.'/') { $file = URLManager::getPage(); $headerTitle = $vals[0]; } } echo<< {$_SERVER["meta"]["title"]} | {$headerTitle} EOT; // Loop through common stylesheets foreach($_SERVER["meta"]["css"] as $css => $media) { echo<< EOT; } // Loop through common javascript documents echo<< EOT; foreach($_SERVER["meta"]["javascript"] as $script) { echo<< EOT; } // This was originally after the next line - MJ. // echo<<
EOT; //Assuming all swfs will be the same size - height and width can be removed $animation = array( "home" => array("SR-B_homepage_06", 0), "whyuseus" => array("SR-B_whyuseus_06", 0), "ourpeople" => array("SR-B_people_06", 0), "services" => array("SR-B_services_06", 0), "ourclients" => array("SR-B_ourclients_06", 0), "contactus" => array("SR-B_contactus_06", 0), "accessibility" => array("SR-B_accessibility", 1), "privacy" => array("SR-B_privacy", 1)); /* $animation = array( "", "whyuseus", "ourpeople", "services", "ourclients", "contactus", "accessibility", "privacy", "termsofuse"); */ $mMedia = $animation['home'][0]; $mType = 0; $ROOT_PATH = "/"; foreach($animation as $href => $vals) { if(URLManager::getPage() == $href.'/') { $file = URLManager::getPage(); $mMedia = $vals[0]; $mType = $vals[1]; } } if($mType == 1) { echo<< {$mMedia}
EOT; } else { echo<<
{$mMedia}
EOT; } echo<< {$contents}
EOT; // Send headers to browser header("Content-Type: text/html; charset=UTF-8"); header("Content-Style-Type: text/css"); header("Content-Length: " . ob_get_length()); header("Content-Language: en-UK"); header("Cache-Control: no-cache"); header("Pragma: no-cache"); header("Date: " . date("c")); // Flush the buffer to stream ob_end_flush(); ?>