'
  • Invalid User Name/Password
  • User Name required
  • Password required', 4104 => '
  • Service in Progress
  • Login not allowed', 4105 => '
  • Already logged in on the Web Client
  • Login not allowed', 4125 => '
  • A Library Software Update is in progress
  • Login not allowed', 4106 => '
  • System has too many login sessions
  • No more logins allowed', 4126 => '
  • Can\'t communicate with LDAP Server', 4129 => '
  • Diagnostics in Progress
  • Login not allowed' ); // Slava put thisin to make the cookie last forever. CR 48383 made us remove it. // session_set_cookie_params(60 * 60 * 24 * 365); echo""; if( file_exists(REBOOT_FLAG_FILE) ) { error_log("SETTING 10 MIN TIMEOUT FOR SECOND REBOOT"); //## NOTE: This same time is also set in common.js Reboot and RebootSys echo""; } else echo""; $CheckForOthers = $_POST['CheckForOthers']; //error_log("CheckForOthers = ". $_POST['CheckForOthers'] ); //error_log("Username = ". $_POST['username'] ); // If this is 2 - The user has answered NO to the question of kicking off another user. if($CheckForOthers == '2' ) $DoTheLogin = false; else $DoTheLogin = true; //error_log("DoTheLogin = ". $DoTheLogin); $UserName = $_POST['username']; $PassWord = $_POST['password']; //error_log("\n\n\n\n Username = $UserName | Password = $PassWord\n\n\n"); // If 1 we need to check to see if any users will be kicked off. if($CheckForOthers == '1' ) { error_log("We are checking for others this time around..............."); if( logout_others( $_POST['username'] ) ) { error_log("We will be logging others out if we login." ); $DoTheLogin = false; } } if( $DoTheLogin ) { error_log("We are doing the login process with '". $_POST['username'] ."' & '". $_POST['password']); if( isset($_POST['username'] ) && isset($_POST['password']) ) { if( strcmp($_POST['username'],"") && strcmp($_POST['password'],"") ) { session_start(); $result = login( $_POST['username'], $_POST['password'], $_SERVER[REMOTE_HOST], $_SERVER[REMOTE_ADDR], $_POST['LDAPDomain'], session_id() ); $username = $result->username; $role = $result->role; if( strcmp($username,"") && strcmp($role,"") ) { // // Save last click time for inactivity timeout // $lastClick = time(); $_SESSION['lastclick'] = $lastClick; // // set a hash of the user name // $_SESSION['login'] = $_REQUEST['username'].','.md5($_REQUEST['username'].$secret_word); $_SESSION['user'] = $result; log_versions($result); error_log( print_r($_SERVER, true )); header('location:'.HOME_VIEW_PAGE ); } else { error_log("There was an error with the username and password"); $_REQUEST['login_error'] = True; $_REQUEST['reason'] = $result->reason; } } else { error_log("There was an error with the username and password being blank"); $_REQUEST['login_error'] = True; $_REQUEST['reason'] = $result->reason; } } else { // // User coming to the page // session_start(); // // check to see if the user is coming back to page; already logged in // if( isset($_SESSION['login']) ) { if( isset($_SESSION['user']) ) { $user = $_SESSION['user']; list($tmp_username,$cookie_hash) = explode(',',$_SESSION['login']); if( md5($tmp_username.$secret_word) == $cookie_hash ) { // // Check for inactivity // $currentClick = time(); if( isset($_SESSION['lastclick']) ) { if( ($currentClick - $_SESSION['lastclick']) > TIMEOUT_SECS ) { // // inactivity; logout logoff($_SESSION['user']); session_destroy(); } else { error_log("User was already logged in - redirecting them to the homepage"); $_SESSION['lastclick'] = $currentClick; // User is coming back; send to homeview header('location:'.HOME_VIEW_PAGE); } } else { logoff($_SESSION['user']); session_destroy(); } } else { logoff($_SESSION['user']); session_destroy(); } } else { session_destroy(); } } else { session_destroy(); } } } // Load stuff up for the first time $ldap = get_ldap(); // This contains sensitive information and should not be in shipped code. // error_log( "ldap = ". print_r($ldap, true) ); if ( $ldap->enabled == "1" ) error_log( "LDAP is Enabled" ); $LDAPisEnabled = $ldap->enabled; $ldapDomains = get_ldap_domains(); error_log( "ldapDomains = ". print_r($ldapDomains, true) ); $currentDomain = $ldap->domain; ?> <?=LIBTYPE_BRAND ?> - <?=LIBTYPE_NAME ?> Login Screen
     
      border=0 name=adiclogo>   "; else echo "  " . LIBTYPE_NAME ." Login Screen  "; ?>
     


    "; } ?>
    "; $errorMessage = $errorMap[$_REQUEST['reason']]; if( $errorMessage == "" ) { $errorMessage = $errorMap[4103]; } echo $errorMessage; echo "


    User name:
    Password:

     
      border=0 name=adiclogo>
    "; ?>
     
    ** CAUTION **
    Logging in will disconnect other users of the same privilege level or lower from their web client
    or operator panel session. Another user will be logged off if you continue to login.
    Are you sure you wish to continue?

    switchDiv('loginDiv','ConfirmOthers'); "; } else error_log("We are not switching to the cautionDiv."); ?>