Fixed the calendar

This commit is contained in:
ION606
2022-08-16 14:15:12 -07:00
parent 2f073c0eb2
commit 1e8ed76c18
7 changed files with 337 additions and 177 deletions
+8 -4
View File
@@ -235,8 +235,10 @@
xhr.setRequestHeader('userId', window.sessionStorage.getItem('Id'));
xhr.onloadend = (e) => {
//Maybe have an alert for logged in?
//No need
window.localStorage.removeItem("Id");
window.localStorage.setItem('sessionId', xhr.response);
document.getElementById('alertrow').style = "";
window.location.href = "index.html";
@@ -272,14 +274,16 @@
}
function logout() {
window.localStorage.clear();
window.sessionStorage.clear();
var xhr = new XMLHttpRequest();
xhr.open('post', 'http://www.selmerbot.com/logout/', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('sessionid', window.localStorage.getItem('sessionId'));
xhr.onloadend = (e) => { window.location.href = 'index.html'; }
xhr.onloadend = (e) => {
window.localStorage.clear();
window.sessionStorage.clear();
window.location.href = 'index.html';
}
xhr.send();
}
</script>