if ($method != "Settings" and $method != "Make_friendship" and $method != "Send_Message" and $method != "Messages") { error("Unknown Method", "The given Method ({$method}) is not known. Please do not call this file directely", __LINE__, __FILE__); } $kat = "/Experts" . $PATH_INFO; foreach ($virt_dir as $dir) { if ($method == $dir and ($extension == "" and substr($PATH_INFO, -1) != '/')) { page_close(); Header("Location: " . $sess->url("/Experts/" . rawurlencode($expert)) . '/' . $method . '/'); exit; } } global $HTTP_POST_VARS; if ($REQUEST_METHOD == "GET" or $HTTP_POST_VARS['username'] != "") { display_form(); } else { do_changes(); } function display_form($passerror = false, $senderror = "", $ssenderror = false, $posconf = false) { global $kat, $expert, $in_login, $perm, $extension, $sess, $method, $ltrstr, $HTTP_GET_VARS, $auth, $viewdata_messages, $PATH_INFO; list($leer, $expert, $method, $extension) = split('/', $PATH_INFO); $pl = build_pathlist($kat, false); $plf = build_pathlist($kat, true); $restriction_list = build_restriction_list($kat); $username = $auth->auth['uname']; $in_login = false; $userdata = get_user_from_name($expert); $capabilities = get_caps($perm, $kat); if (!class_exists("Template")) { include "template.inc"; }
$auth->unauth(true); $sess->unregister("linknode"); $linknode = ""; $sess->unregister("movenode"); $movenode = ""; $sess->unregister("movetrail"); $movetrail = ""; setcookie("ltrLoginAs", "", time() + 2592000); $HTTP_COOKIE_VARS['ltrLoginAs'] = ""; page_close(); Header("Location: {$PHP_SELF}"); } if ($REQUEST_METHOD == "GET") { display_form(); } else { $errors = do_changes(); if ($errors == 0) { $logon_now_as = $uid; if (isset($savepass)) { setcookie("ltrLoginAs", $uid, time() + 2592000); } $sess->register("logon_now_as"); page_close(); display_done(); exit; } $suggestions = ""; if (($errors & ERR_USEREXISTS) != 0) { $suggestions = get_suggestions(strtolower($username)); } $uname = "";