Added code to redirect the user if they are permitted to access the GLink, and show an error JS alert if they are not

php
Aadhavan Srinivasan 2 years ago
parent 96abdd9852
commit cd1261418a

@ -17,7 +17,11 @@ var request;
function requestHandler() {
if (request.readyState === XMLHttpRequest.DONE) {
if (request.status === 200) {
alert(request.responseText);
if (request.responseText == "B") {
alert("You are not authorized to access this GLink, as you are outside the permitted radius. If you think this is an error, please try again on a mobile device.");
} else {
window.location.replace(request.responseText);
}
} else {
console.log("Error sending data to server.");
}

Loading…
Cancel
Save