36 lines
1.6 KiB
PHP
36 lines
1.6 KiB
PHP
<!DOCTYPE html>
|
|
<!--SRC: https://codepen.io/colorlib/pen/rxddKy-->
|
|
<html>
|
|
<head>
|
|
<title>Portal</title>
|
|
<link rel="stylesheet" href="css/style.css">
|
|
</head>
|
|
<body>
|
|
<div class="loginPage">
|
|
<?php
|
|
if (array_key_exists('id', $_GET) && array_key_exists('ap', $_GET)) {
|
|
// URL parameter exists
|
|
echo "
|
|
<div class='form' onsubmit='submitFormAjax();return false'>
|
|
<h1>Welcome</h1>
|
|
<p>Connecting to:" . htmlspecialchars(trim($_GET['ssid'])) ."</p>
|
|
<p id='responseMessage'></p>
|
|
<form class='login-form' id='login-from' enctype='multipart/form-data'>
|
|
<input id='accesCode' type='password' placeholder='Acces code' onkeyup='inputEntry()'>
|
|
<input type='hidden' id='apMac' name='apmac' value='" . htmlspecialchars(trim($_GET['ap'])) . "' />
|
|
<input type='hidden' id='clientMac' name='clientmac' value='" . htmlspecialchars(trim($_GET['id'])) . "' />
|
|
<input type='hidden' id='redirectURL' name='redirecturl' value='" . htmlspecialchars(trim($_GET['url'])) . "' />
|
|
</form>
|
|
<button type='button' class='button' id='submitButton' onclick='submitFormAjax()' disabled='true'><span class='buttonText' id='buttonText'>Connect</span></button>
|
|
<script src='js/app.js'></script>
|
|
</div>";
|
|
} else {
|
|
// URL parameter does not exist
|
|
echo '<div class="form"><h1>Something went wrong</h1></div>';
|
|
http_response_code(400);
|
|
}
|
|
?>
|
|
</div>
|
|
</body>
|
|
</html>
|