mail / index.html
enronarchive's picture
Super-squash branch 'main' using huggingface_hub
fb238c5
<html>
<head>
<title>Enron WebMail</title>
</head>
<body>
<!-- this script handles the login logic-->
<script src="redirectLogic.js"> //see this file for a list of valid logins</script>
<script>
function getTopbarTarget() {
var currentMailbox = localStorage.getItem('enron_current_mailbox');
return currentMailbox ? '/mail/index.html' : '/index.html';
}
function initTopbarLink() {
var topbar = document.getElementById('topbar-link');
if (!topbar) { return; }
topbar.addEventListener('click', function(e) {
e.preventDefault();
window.location.href = getTopbarTarget();
});
}
// Check if user is already logged in
window.addEventListener('DOMContentLoaded', function() {
initTopbarLink();
// Check if navigating to search
if (sessionStorage.getItem('navigating_to_search') === 'true') {
sessionStorage.removeItem('navigating_to_search');
return; // Don't redirect
}
// Check for logout flag first
if (sessionStorage.getItem('logging_out') === 'true') {
sessionStorage.removeItem('logging_out');
localStorage.removeItem('enron_current_mailbox');
return; // Don't redirect
}
// Don't auto-redirect if coming from search
if (sessionStorage.getItem('from_search') === 'true') {
sessionStorage.removeItem('from_search');
return;
}
// Don't redirect if going directly to mailbox from search
if (sessionStorage.getItem('from_search_direct') === 'true') {
sessionStorage.removeItem('from_search_direct');
return;
}
var currentMailbox = localStorage.getItem('enron_current_mailbox');
// Only redirect if we have a mailbox AND we're arriving from a redirect (not manually)
if (currentMailbox && document.referrer && !document.referrer.includes('/index.html')) {
// User is already logged in, redirect to mailbox
window.location.href = '/mail/index.html';
}
});
function handleFormSubmit(event) {
event.preventDefault(); // Prevent default form submission
var usernameInput = document.getElementById("username").value;
var passwordInput = document.getElementById("password").value;
// Call the redirectUser function from redirectLogic.js with only the username input (password is meaningless)
var redirectUrl = redirectUser(usernameInput);
// Redirect the user to the appropriate page
window.location.href = redirectUrl;
}
</script>
<!-- this div contains the whole website-->
<div align="center">
<!-- this is the beginning of the table, width of it is defined here-->
<table border="0" width="727" cellspacing="0" cellpadding="0">
<!-- first row, topbar image - width is defined again here-->
<tr><td colspan=3><a href="/index.html" id="topbar-link" style="display:block; line-height:0;"><img src="/src/topbar.jpg" width="727" height="93" border="0" style="display:block"></a></td></tr>
<!-- line below topbar-->
<tr><td valign="top" colspan=3 bgcolor="#ffffff" width="727"><img src="/src/spacer.gif" width="727" height="1"></td></tr>
<tr>
<!-- hero image goes here; by changing the background colour of the cell, i can fix the scaling issues that happen at different resolutions and zoom levels-->
<td valign="top" width=484 style="background-color: #0066cc;"><img src="/src/home_hero.gif" width=484 height=380></td>
<!-- this adds a 1px line that separates the hero from the content-->
<td valign="top" width=1><img src="/src/spacer.gif" width=1 height=380></td>
<!-- this defines a new column, which is the one at the right with all the content, width is total minus hero-->
<td valign="top" bgcolor="#ffffff" width=242>
<!--this table contains rows 2, 3 and 4-->
<table cellspacing=0 cellpadding=0 border=0>
<!-- row 2 - login section-->
<tr>
<td valign="top" style="background: #0066cc;">
<br>
<div align="center"><img src="src/home_existing.png"><br><br>
<form id="redirectForm" onsubmit="handleFormSubmit(event)">
<label style="color:#ff9900; font-family: arial;" for="username"><b>Username</b></label><br>
<nobr><input type="text" id="username" name="username" required size="10">
<span style="color: white; font-family: arial;">@enron.com</span><br><br></nobr>
<label style="color:#ff9900; font-family: arial;" for="password"><b>Password</b></label><br>
<input type="password" id="password" name="password" required size="25"><br><br>
<input type="image" src="/src/home_login.png" alt="Submit"></div>
</form>
</td>
</tr>
<!-- this creates the line that separates each row-->
<tr><td valign="top" width=242><img src="/src/spacer.gif" width=242 height=1></td></tr>
<!-- row 3 - signup section-->
<tr>
<td valign="top" style="background: #0066cc;">
<div align="center">
<br>
<img src="src/home_new.png"><br><br>
<a href="mailto:webmailaccess@enroncorp.com"><img src="/src/home_request.png"></a><br><br></div>
</td>
</tr>
<!-- this creates the line that separates each row-->
<tr><td valign="top" width=242><img src="/src/spacer.gif" width=242 height=1></td></tr>
<!-- row 4 - credits and legal section-->
<tr>
<td valign="top" background="/src/blue.gif" width=242 height="60">
<h5 align="center"><br>
<a style="color: white; font-family: arial;" href="search.html" onclick="event.preventDefault(); sessionStorage.setItem('navigating_to_search', 'true'); window.location.href='search.html';">Search |</a>
<a style="color: white; font-family: arial;" href="legal.html"">Legal Notice |</a>
<a style="color: white; font-family: arial;" href="https://github.com/enronarchive/enron-mail/blob/main/CHANGELOG.md"">Changelog |</a>
<a style="color: white; font-family: arial;" href="http://archive.enroncorp.com"">About</a>
</h5>
</td>
</td> <!--this is the end of row 4-->
</tr>
</table> <!--this is the end of the table that contains rows 2 and 3-->
</td> <!-- this closes the right column within the big table that is the whole website-->
</tr>
<!--this adds a new row with the bottombar-->
<tr>
<td colspan=3><img src="/src/bottombar.gif">
</td>
</tr>
</table><!--this closes the entire table that is the site-->
</div> <!-- this closes the entire div-->
</body>
</html>