diff --git a/app/basic_operator_panel/index.php b/app/basic_operator_panel/index.php
index 49804a2186..658844af48 100644
--- a/app/basic_operator_panel/index.php
+++ b/app/basic_operator_panel/index.php
@@ -244,11 +244,20 @@ unset($refresh_default);
}
loadXmlHttp.prototype.stateChanged=function () {
- if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
- //this.el.innerHTML = this.xmlHttp.responseText;
- document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
- if(document.getElementById('sort')){
- if(document.getElementById('sort').value != "")
+ var url = new URL(this.xmlHttp.responseURL);
+ if (/login\.php$/.test(url.pathname)) {
+ // You are logged out. Stop refresh!
+ refresh_stop();
+ url.searchParams.set('path', '');
+ window.location.href = url.href;
+ return;
+ }
+
+ if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
+ //this.el.innerHTML = this.xmlHttp.responseText;
+ document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
+ if (document.getElementById('sort')) {
+ if (document.getElementById('sort').value != "")
document.getElementById('sort1').value=document.getElementById('sort').value;
}
}
diff --git a/app/call_center_active/call_center_active.php b/app/call_center_active/call_center_active.php
index de5ea328d3..5e89d220b5 100644
--- a/app/call_center_active/call_center_active.php
+++ b/app/call_center_active/call_center_active.php
@@ -85,9 +85,17 @@
}
loadXmlHttp.prototype.stateChanged=function () {
- if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
- //this.el.innerHTML = this.xmlHttp.responseText;
- document.getElementById('ajax_response').innerHTML = this.xmlHttp.responseText;
+ var url = new URL(this.xmlHttp.responseURL);
+ if (/login\.php$/.test(url.pathname)) {
+ // You are logged out. Stop refresh!
+ url.searchParams.set('path', '');
+ window.location.href = url.href;
+ return;
+ }
+
+ if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
+ //this.el.innerHTML = this.xmlHttp.responseText;
+ document.getElementById('ajax_response').innerHTML = this.xmlHttp.responseText;
//link table rows (except the last - the list_control_icons cell) on a table with a class of 'tr_hover', according to the href attribute of the
tag
$('.tr_hover tr,.list tr').each(function(i,e) {
diff --git a/app/conferences_active/conference_interactive.php b/app/conferences_active/conference_interactive.php
index f4316b3b7d..b17f59a17d 100644
--- a/app/conferences_active/conference_interactive.php
+++ b/app/conferences_active/conference_interactive.php
@@ -84,9 +84,17 @@ function loadXmlHttp(url, id) {
}
loadXmlHttp.prototype.stateChanged=function () {
-if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
- //this.el.innerHTML = this.xmlHttp.responseText;
- document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
+ var url = new URL(this.xmlHttp.responseURL);
+ if (/login\.php$/.test(url.pathname)) {
+ // You are logged out. Stop refresh!
+ url.searchParams.set('path', '');
+ window.location.href = url.href;
+ return;
+ }
+
+ if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
+ //this.el.innerHTML = this.xmlHttp.responseText;
+ document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
//link table rows (except the last - the list_control_icons cell) on a table with a class of 'tr_hover', according to the href attribute of the
tag
$('.tr_hover tr,.list tr').each(function(i,e) {
diff --git a/app/conferences_active/conferences_active.php b/app/conferences_active/conferences_active.php
index 6a6f647fea..128e80d7e9 100644
--- a/app/conferences_active/conferences_active.php
+++ b/app/conferences_active/conferences_active.php
@@ -79,9 +79,17 @@ function loadXmlHttp(url, id) {
}
loadXmlHttp.prototype.stateChanged=function () {
-if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
- //this.el.innerHTML = this.xmlHttp.responseText;
- document.getElementById('ajax_response').innerHTML = this.xmlHttp.responseText;
+ var url = new URL(this.xmlHttp.responseURL);
+ if (/login\.php$/.test(url.pathname)) {
+ // You are logged out. Stop refresh!
+ url.searchParams.set('path', '');
+ window.location.href = url.href;
+ return;
+ }
+
+ if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
+ //this.el.innerHTML = this.xmlHttp.responseText;
+ document.getElementById('ajax_response').innerHTML = this.xmlHttp.responseText;
//link table rows (except the last - the list_control_icons cell) on a table with a class of 'tr_hover', according to the href attribute of the
tag
$('.tr_hover tr,.list tr').each(function(i,e) {
diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php
index 38db669146..97fe5292f7 100644
--- a/app/destinations/resources/classes/destinations.php
+++ b/app/destinations/resources/classes/destinations.php
@@ -440,6 +440,12 @@ if (!class_exists('destinations')) {
//alert(action);
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
+ var url = new URL(this.xmlHttp.responseURL);
+ if (/login\.php$/.test(url.pathname)) {
+ // You are logged out. Not much we can de here.
+ return;
+ }
+
if (this.readyState == 4 && this.status == 200) {
document.getElementById(id).innerHTML = this.responseText;
}
diff --git a/app/fifo_list/fifo_interactive.php b/app/fifo_list/fifo_interactive.php
index a46b5a473a..1e3e17aa25 100644
--- a/app/fifo_list/fifo_interactive.php
+++ b/app/fifo_list/fifo_interactive.php
@@ -93,9 +93,17 @@ function loadXmlHttp(url, id) {
}
loadXmlHttp.prototype.stateChanged=function () {
-if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
- //this.el.innerHTML = this.xmlHttp.responseText;
- document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
+ var url = new URL(this.xmlHttp.responseURL);
+ if (/login\.php$/.test(url.pathname)) {
+ // You are logged out. Stop refresh!
+ url.searchParams.set('path', '');
+ window.location.href = url.href;
+ return;
+ }
+
+ if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
+ //this.el.innerHTML = this.xmlHttp.responseText;
+ document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
}
var requestTime = function() {
diff --git a/app/fifo_list/fifo_list.php b/app/fifo_list/fifo_list.php
index 04e6e56e8d..587428b7cc 100644
--- a/app/fifo_list/fifo_list.php
+++ b/app/fifo_list/fifo_list.php
@@ -71,9 +71,17 @@ function loadXmlHttp(url, id) {
}
loadXmlHttp.prototype.stateChanged=function () {
-if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
- //this.el.innerHTML = this.xmlHttp.responseText;
- document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
+ var url = new URL(this.xmlHttp.responseURL);
+ if (/login\.php$/.test(url.pathname)) {
+ // You are logged out. Stop refresh!
+ url.searchParams.set('path', '');
+ window.location.href = url.href;
+ return;
+ }
+
+ if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
+ //this.el.innerHTML = this.xmlHttp.responseText;
+ document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
}
var requestTime = function() {
diff --git a/app/registrations/registration_reload.php b/app/registrations/registration_reload.php
index 487578bad1..33943d8997 100644
--- a/app/registrations/registration_reload.php
+++ b/app/registrations/registration_reload.php
@@ -80,9 +80,17 @@
}
loadXmlHttp.prototype.stateChanged=function () {
- if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
- //this.el.innerHTML = this.xmlHttp.responseText;
- document.getElementById('ajax_response').innerHTML = this.xmlHttp.responseText;
+ var url = new URL(this.xmlHttp.responseURL);
+ if (/login\.php$/.test(url.pathname)) {
+ // You are logged out. Stop refresh!
+ url.searchParams.set('path', '');
+ window.location.href = url.href;
+ return;
+ }
+
+ if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
+ //this.el.innerHTML = this.xmlHttp.responseText;
+ document.getElementById('ajax_response').innerHTML = this.xmlHttp.responseText;
}
var requestTime = function() {