Exemplo n.º 1
0
    if (isEmailAddress($_POST['username'])) {
        $username = explode("@", $_POST['username']);
        $_SESSION["username"] = $username[0];
    } else {
        $_SESSION["username"] = $_POST['username'];
    }
    // Get user's role
    $_SESSION["role"] = GetUserRole($connect, $ldap_connections[$_POST['ldap_connection']]);
    ldap_unbind($connect);
    // Redirect to appropriate url based on role
    if ($_SESSION["role"] != "none") {
        LogEvent("ldap_login.php", "Main", "User " . $_SESSION["username"] . " succesfully logged on as " . $_SESSION["role"]);
        RedirectToUrl("./index.php");
    } else {
        DestroySession();
        RedirectToUrl($_SERVER['SCRIPT_NAME']);
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
	<title>Open-AudIT Login</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="pragma" content="no-cache">
	<link rel="stylesheet" type="text/css" href="ldap_login.css" />
</head>

<!-- Commented by Nick Brown - why are we disabling right-click? This code only works on IE anyway?
<script LANGUAGE="JavaScript">
Exemplo n.º 2
0
**********************************************************************************************************/
include_once "include_config.php";
include_once "include_lang.php";
include_once "include_functions.php";
include "include_dell_warranty_functions.php";
// Added by Andrew Hull to allow us to grab Dell Warranty details from the Dell website
include_once "include_col_scheme.php";
$page = GetVarOrDefaultValue($page);
if ($page == "add_pc") {
    $use_pass = "******";
    $_SESSION["username"] = "******";
    $_SESSION["role"] = "none";
} else {
    if (GetVarOrDefaultValue($use_https) == "y") {
        if ($_SERVER["SERVER_PORT"] != 443) {
            RedirectToUrl("https://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
        }
    }
    if (GetVarOrDefaultValue($use_ldap_login) == 'y') {
        include "include_ldap_login.php";
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link rel="icon" href="favicon.ico" type="image/x-icon">
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> 
    <!--<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />-->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />