session_start(); // Check to see if user turned menus on or off if (isset($_GET['menus'])) { if ($_GET['menus']==1) $_SESSION['menus']="on"; else $_SESSION['menus']="off"; } // Default to menus on if (!isset($_SESSION['menus'])) $_SESSION['menus']="on"; // Check to see if browser supports XHTML 1.1 if ( isset($_SERVER['HTTP_ACCEPT']) && $_SERVER['HTTP_ACCEPT'] != null && strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') == false) { $xhtmltype = '1.0'; header("Content-type: text/html; charset=utf-8"); } else { $xhtmltype = '1.1'; header("Content-type: application/xhtml+xml; charset=utf-8"); } // Output XML headers if browser supports XHTML 1.1 if ($xhtmltype == '1.1') { echo '<'.'?xml version="1.0" encoding="utf-8"?'.'>'."\n"; echo ''."\n"; } else { echo ''."\n"; } // Output remaining headers echo "\n"; echo "
\n"; echo ' '."\n"; echo ' '."\n"; if ($xhtmltype == '1.0') { echo ''."\n"; } // Include menu data include ("menu.php"); // Check for page variable if (isset($_GET['page'])) { $page = preg_replace("/^\/|\.+/",".",addslashes($_GET['page'])); } else { $page = "Home"; } if (!file_exists("$page.inc")) $page=$page."/Home"; // Determine titles if ($page=="Home") $title="CreationTheory.Org: Creationism vs Science"; else { if (!empty($menu["/".$page.".xhtml"][0])) { $title=$menu["/".$page.".xhtml"][0]; } else { $title=$menu["/".dirname($page)."/"][0]; if ($page!="Home") $subtitle=$submenu[dirname($page)][basename($page).".xhtml"][0]; } } // Output title echo "\tLast Updated: . Read the Site FAQ!
Return to main '; echo ''.$title." page
\n"; } else { // If this is not the last page, display "next page" link foreach($submenu[dirname($page)] as $key => $value) { // Locate entry in array corresponding to current page if ($value[0]==$subtitle) { $nextvalue=each($submenu[dirname($page)]); echo 'Continue to '; echo ''.$nextvalue[1][0]."
\n"; } } } // Make jump box ?>Jump to: