<?PHP
-
// $Id$
//
// This gets called from within the header functions. It establishes or
session_start();
- if ($_SESSION["ctdlsession"]) {
+ if (isset($_SESSION["ctdlsession"])) {
$session = $_SESSION["ctdlsession"];
}
else {
}
// At this point we have a good connection to Citadel.
-
- ctdl_iden(); // Identify client
-
+ $identity=array(
+ "DevelNr" => '0',
+ "ClientID" => '8',
+ "VersionNumber" => '001',
+ "ClientInfoString" => 'PHP web client|',
+ "Remote Address" => $_SERVER['REMOTE_ADDR'] );
+
+ ctdl_iden($identity); // Identify client
+ ctdl_MessageFormatsPrefered(array("text/html","text/plain"));
if ($_SESSION["username"]) {
login_existing_user(
$_SESSION["username"],
}
}
- if (!$_SESSION["serv_humannode"]) {
- ctdl_get_serv_info();
+ if (!isset($_SESSION["serv_humannode"])) {
+ $server_info = ctdl_get_serv_info();
+ print_r($server_info);
+ $keys = array_keys($server_info);
+ foreach ($keys as $key)
+ $_SESSION[$key] = $server_info[$key];
}
// If the user is trying to call up any page other than
// login.php logout.php do_login.php,
// and the session is not logged in, redirect to login.php
//
- if ($_SESSION["logged_in"] != 1) {
+ if (isset($_SESSION["logged_in"]) && ($_SESSION["logged_in"] != 1)) {
$filename = basename(getenv('SCRIPT_NAME'));
if ( (strcmp($filename, "login.php"))
&& (strcmp($filename, "logout.php"))