Example #1
0
 function session_logged_in()
 {
     global $php3SessionID, $db, $tableSessions, $strNoDatabase;
     session_killold();
     session_start_php3();
     $Query = "SELECT userID FROM {$tableSessions} WHERE id='{$php3SessionID}'";
     $result = mysql($db, $Query) or die($strNoDatabase);
     $status = mysql_fetch_row($result);
     return $status[0];
 }
Example #2
0
            $password = md5($entered_password);
        } else {
            $password = $entered_password;
        }
        // session hack to make sessions on old php4 versions work
        if (phpversion() > 4.0) {
            $_SESSION['login'] = $login;
            $_SESSION['password'] = $password;
        } else {
            session_register("login");
            session_register("password");
        }
    } else {
        // phpversion = 3
        session_destroy_php3();
        session_start_php3();
        // encrypt entered login & password
        $login = $entered_login;
        if ($passwordEncryptedWithMD5 && function_exists(md5)) {
            $password = md5($entered_password);
        } else {
            $password = $entered_password;
        }
        session_register_php3("login", "STRING", $login);
        session_register_php3("password", "STRING", $password);
    }
}
if (!$login) {
    // no login available
    include $cfgProgDir . "interface.php";
    exit;