function admShowError($errmsg, $errdetail, $errpgtitle)
{
    echo "<HTML>\r\n<HEAD>\r\n<TITLE>" . $errpgtitle . "</TITLE>\r\n";
    echo "<META NAME=\"Author\" CONTENT=\"danomac\">\r\n";
    echo "<LINK REL=\"stylesheet\" HREF=\"admin.css\" TYPE=\"text/css\" TITLE=\"Default\">\r\n</HEAD>\r\n\r\n";
    echo "<BODY CLASS=\"adm_error\">\r\n<P CLASS=\"adm_error\">" . $errmsg . "</P>\r\n";
    echo $errdetail;
    echo "\r\n<BR><BR><CENTER>Session terminated. You will need to go to the <A HREF=\"index.php\">login screen</A> to try again.</CENTER>";
    echo "\r\n</BODY>\r\n</HTML>";
    admKillSession();
}
        session_save_path($GLOBALS["webserver_farm_session_path"]);
    }
}
session_start();
header("Cache-control: private");
/*
 * There are some variables defined in this script that are needed, such as the
 * phpbttracker version strings.
 */
require_once "bta_funcs.php";
/*
 * Let's try to stay HTML 4.01 compliant.
 */
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n";
/*
 * Let's see if the bta_login.php page was used by checking to see if there
 * is a session variable set with the page referrer.
 * If yes, then destroy the session and log out.
 */
if (!isset($_SESSION['authenticated'])) {
    admShowError("You are not logged in.", "Common sense states that before you attempt to log out, you should be logged in to the interface first!", $adm_pageerr_title);
} else {
    //okay, destroy the session.
    admKillSession();
    //ensure the session was destroyed, and display a message
    if (!isset($_SESSION['authenticated'])) {
        admShowMsg("You are now logged off.", "You will need to logon again to use the Administrative interface.", $adm_page_title . " - Logout");
    } else {
        admShowError("ERROR: You are not logged off.", "Could not logoff for an unknown reason.", $adm_pageerr_title);
    }
}