SESSION['lamurl'] and SESSION['lampath'] added

This commit is contained in:
duergner 2003-09-26 14:38:12 +00:00
parent 5aafd379fa
commit f3c10eb9eb
1 changed files with 8 additions and 1 deletions

View File

@ -262,7 +262,6 @@ if($_POST['action'] == "checklogin")
$current_language = explode(":",$_SESSION['language']); $current_language = explode(":",$_SESSION['language']);
$_SESSION['header'] = "<?xml version=\"1.0\" encoding=\"" . $current_language[1] . "\"?>\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n\n"; $_SESSION['header'] = "<?xml version=\"1.0\" encoding=\"" . $current_language[1] . "\"?>\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n\n";
include("./main.php"); // Load main frame include("./main.php"); // Load main frame
} }
else else
@ -290,6 +289,14 @@ elseif($_POST['action'] == "profileChange") {
else else
{ {
$_SESSION['lampath'] = realpath('../') . "/";
$protocol = explode("/",$_SERVER['SERVER_PROTOCOL']);
$protocol = strToLower($protocol[0]) . "://";
$_SESSION['lamurl'] = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
$_SESSION['lamurl'] = substr($_SESSION['lamurl'],0,strlen($_SESSION['lamurl'])-19);
echo "lampath=" . $_SESSION['lampath'] . "<br>";
echo "lamurl=" . $_SESSION['lamurl'] . "<br>";
$default_Config = new CfgMain(); $default_Config = new CfgMain();
$default_Profile = $default_Config->default; $default_Profile = $default_Config->default;
$_SESSION["config"] = new Config($default_Profile); // Create new Config object $_SESSION["config"] = new Config($default_Profile); // Create new Config object