alert("Incorrect Password. Please try again.")'; } } else { x_login($uname, $password); } } elseif ($useraction == "logout") { if ($admin) { x_admin_logout(); } else { x_logout(); } } // This file contains additional functionality which should go in mainfile.php3 // include ("functions.php3"); ?> "; exit(); } $section = $section_name; list($person_id, $title, $firstname, $surname, $initials, $author_name, $directory_name, $colour, $website) = mysql_fetch_row($result); $section_number = 100000 + $person_id; $section_name = $directory_name; $section_title = "$firstname $initials $surname"; if ($section_name == "") { // $section_name = $section; } if ($pagetitle == "") { $pagetitle = $section_title . " Homesite"; } // Display the page title echo " $sitename: $pagetitle\r\r"; include("javascript.inc"); echo ''; echo "\r\r"; echo "\r\r "; // Insert the currently selected theme's header (a link to themes/Default/header.php3) include("header.php3"); // This required in case pagename begins with a slash // $bodyfile = ereg_replace("//","/","/home/eidnet/public_html/$pagename"); $bodyfile = str_replace("//","/","/home/eidnet/public_html/$pagename"); // $temp = ereg_replace("/","",$pagename); $temp = str_replace("/","",$pagename); // Can't think of a generalised way to do this, short of checking a database if ($temp == "bibliography.html") { include($bodyfile); } elseif ($temp == "homepage.html") { include($bodyfile); } elseif ($temp == "article.html") { include($bodyfile); } elseif ($temp == "oldsectionnews.html") { include($bodyfile); } else { $bodyfile_handle = fopen($bodyfile, "r"); $bodyfile_contents = fread($bodyfile_handle, filesize($bodyfile)); fclose($bodyfile_handle); $bodyfile_contents = trim_raw_html($bodyfile_contents); $bodyfile_contents = convert_images($bodyfile_contents,$section); $bodyfile_contents = convert_urls($bodyfile_contents,$section,$visiting_section,$section_title); // Now output the result echo $bodyfile_contents; } // This is required to trigger the config.php3-defined footer printing include("footer.php3"); // Save referer info into the database to know who are linking us //if ($httpref > 0) // { // if($HTTP_REFERER=="" OR ereg("linuxpreview.org", $HTTP_REFERER) OR ereg("unknown", $HTTP_REREFER) OR ereg("ncc.org.ve", $HTTP_REREFER)) // { // } // else // { // mysql_query("insert into referer values(NULL, '$HTTP_REFERER')"); // } // } ?>