getTitle(); } else { //determine the page to load - if its invalid then load the home page $page = @$_REQUEST['page']; if($page=="" || ereg("\.\.",$page)) { $page = "home"; } $page = str_replace("\\\\","\\",$page); $page = strtolower($page).".html"; //load page data -- if it is empty then load the default home page -- also convert windows newlines to unix style $pagedata = str_replace("\r\n","\n",@file_get_contents("pages/".$page)); if(strlen($pagedata) < 1) { $pagedata = str_replace("\r\n","\n",@file_get_contents("pages/home.html")); } //check for special commands at the start of the file $firstLines = explode("\n",$pagedata,3); foreach($firstLines as $line) { if(substr($line,0,8) == "include ") { $inc = explode(",",substr($line,8)); } elseif(substr($line,0,6) == "title ") { $pageTitle = substr($line,6); } else { @$pagecontent .= $line."\n"; } } } //end if check for calendar request ?> \n"; } if(@$inc) { foreach($inc as $incfile) { list($unused,$type) = explode(".",$incfile); if($type=="js") { echo " \n"; } elseif ($type=="css") { echo " \n"; } } } ?>
Dr. Judy Hankins
printHTML(); } else { //this str_replace auto indents the $pageconent so it follows the indentation of this page - purely cosmetic echo str_replace("\n","\n ",str_replace("\n\n","\n",$pagecontent)); } ?>