Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var email = readCookie('email');
- var password = readCookie('password');
- var uid = readCookie('uid');
- if(email == ""){
- window.location.replace("index.html");
- }
- if(password == ""){
- window.location.replace("index.html");
- }
- if(uid == ""){
- window.location.replace("index.html");
- }
- $.post("https://panel.hostmyservers.fr/api/webapi.php", { apiversion: "1.1", apiusername: email, apipassword: password, apiformat: "json"})
- .done(function(data) {
- if(data.response == "Invalid login"){
- eraseCookie(email);
- eraseCookie(password);
- eraseCookie(uid);
- window.location.replace("index.html");
- }
- })
- .fail(function(jqXHR, textStatus, errorThrown){
- eraseCookie(email);
- eraseCookie(password);
- eraseCookie(uid);
- window.location.replace("index.html");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement