start($cacheID))) { // require_once("/var/www/html/library/demo1/lib/init_db.php"); //require_once("/var/www/html/library/demo1/lib/monticello/text.php"); require_once("/home/domains/explorer.monticello.org/docs/lib/init_db.php"); require_once("/home/domains/explorer.monticello.org/docs/lib/monticello/text.php"); /******************************************************** SECTION -- one of: home, plantation, house ********************************************************/ $sect = "home"; if (array_key_exists("sect", $_GET)) { $sect = $_GET["sect"]; } require_once("inc/nav_functions.php"); /******************************************************** SUBSECTION -- for use by navigation include ********************************************************/ $sub = ""; if (array_key_exists("sub", $_GET)) { $sub = $_GET["sub"]; } /******************************************************** ID -- identifies a specific record in whatever section we are in ********************************************************/ $id = ""; if (array_key_exists("id", $_GET)) { $id = $_GET["id"]; } /******************************************************** LID -- location id, identifies a room or a feature ********************************************************/ $lid = ""; if (array_key_exists("lid", $_GET)) { $lid = $_GET["lid"]; } /******************************************************** TYPE -- identifies which type of record to display ********************************************************/ $type = ""; if (array_key_exists("type", $_GET)) { $type = $_GET["type"]; } /******************************************************** PRINT -- identifies a specific item in whatever section we are in ********************************************************/ $print = 0; if (array_key_exists("print", $_GET)) { $print = $_GET["print"]; if ($print) { $print = 1; } else { $print = 0; } } $interactiveURL = ""; $return = 0; // which template file to use to display the content area if ($lid and $sect == "plantation" and !$id) { $template = "feature.php"; $interactiveURL = "../?s1=1|s3=$lid|tp=1"; } else if ($lid and $sect == "house" and !$id) { $template = "room.php"; $interactiveURL = "../?s1=2|s3=$lid"; } else if ($id and $type) { $interactiveURL = "../?s1=0|s4=${type}_${id}"; switch ($type) { case 8: // images or media/animation case 11: case 12: $template = "media.php"; $return = 1; break; case 4: // object $template = "object.php"; $return = 1; break; case 5: // document $template = "document.php"; $return = 1; break; case 6: // arch element $template = "architecture.php"; $return = 1; break; case 7: // person $template = "person.php"; $return = 1; break; // case 9: // related link // $template = "media.php"; // break; case 10: // story $template = "story.php"; $return = 1; break; case 13: // plant $template = "plant.php"; $return = 1; break; default: $template = "home.php"; break; } } else if ($sect == "plantation" && $sub) { $template = "feature.php"; $lid = getDefaultLocation($sub, $nav); $interactiveURL = "../?s1=1|s3=$lid|tp=1"; } else if ($sect == "house" && $sub) { $template = "room.php"; $interactiveURL = "../?s1=2"; $lid = getDefaultLocation($sub, $nav); } else if ($sect == "plantation") { $template = "feature.php"; $lid = "165"; $interactiveURL = "../?s1=1|s3=$lid|tp=1"; } else if ($sect == "house") { $template = "room.php"; $interactiveURL = "../?s1=2"; $lid = 1; } else { $template = "home.php"; $interactiveURL = "../?s1=0"; } // should we display the sidebar? If not, we need to define a class for some container divs $nosidebar = "nosidebar"; if ((!$print) and ($sect == "plantation" or $sect == "house")) { $nosidebar = ""; } // define link to interactive version of page $launchInteractive = ""; if (!$print) { $launchInteractive = " View Interactive Version ]"; } // execute the template. Capture the output of the executed template. $pagecontent = ""; ob_start(); include("templates/$template"); $pagecontent = ob_get_clean(); // Make sure we have a "name" that was returned by the template, otherwise use the default. if ($name) { $name = strip_tags($name); $name = ": $name"; } else { $name = ""; } ?> Monticello Explorer<?= $name ?>
end(); } ?>