NuestraRED.org/portalcautivo/index_content.html
2018-11-10 15:12:12 -05:00

260 lines
14 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex, nofollow, noodp, noydir" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="copyright" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<title></title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/signin.css" rel="stylesheet">
<link href="css/estilos.css" rel="stylesheet">
<!-- static zone info -->
<script src="js/zone.js"></script>
<script src="js/jquery-1.11.2.min.js"></script>
<script>
function getURLparams()
{
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
$( document ).ready(function() {
/**
* logon action
*/
$("#signin").click(function (event) {
event.preventDefault();
// hide alerts
$("#alertMSG").addClass("hidden");
// try to login
$.ajax({
type: "POST",
url: "/api/captiveportal/access/logon/" + zoneid + "/",
dataType:"json",
data:{ user: $("#inputUsername").val(), password: $("#inputPassword").val() }
}).done(function(data) {
// redirect on successful login
if (data['clientState'] == 'AUTHORIZED') {
if (getURLparams()['redirurl'] != undefined) {
window.location = 'http://'+getURLparams()['redirurl']+'?refresh';
} else {
// no target, reload page
window.location.reload();
}
} else {
$("#inputUsername").val("");
$("#inputPassword").val("");
$("#errorMSGtext").html("authentication failed");
$("#alertMSG").removeClass("hidden");
}
}).fail(function(){
$("#errorMSGtext").html("unable to connect to authentication server");
$("#alertMSG").removeClass("hidden");
});
});
/**
* login anonymous, only applicable when server is configured without authentication
*/
$("#signin_anon").click(function (event) {
event.preventDefault();
// hide alerts
$("#alertMSG").addClass("hidden");
// try to login
$.ajax({
type: "POST",
url: "/api/captiveportal/access/logon/" + zoneid + "/",
dataType:"json",
data:{ user: '', password: '' }
}).done(function(data) {
// redirect on successful login
if (data['clientState'] == 'AUTHORIZED') {
if (getURLparams()['redirurl'] != undefined) {
window.location = 'http://'+getURLparams()['redirurl']+'?refresh';
} else {
window.location.reload();
}
} else {
$("#inputUsername").val("");
$("#inputPassword").val("");
$("#errorMSGtext").html("login failed");
$("#alertMSG").removeClass("hidden");
}
}).fail(function(){
$("#errorMSGtext").html("unable to connect to authentication server");
$("#alertMSG").removeClass("hidden");
});
});
/**
* logoff action
*/
$("#logoff").click(function (event) {
event.preventDefault();
// hide alerts
$("#alertMSG").addClass("hidden");
// try to login
$.ajax({
type: "POST",
url: "/api/captiveportal/access/logoff/" + zoneid + "/",
dataType:"json",
data:{ user: '', password: '' }
}).done(function(data) {
// refresh page
window.location.reload();
}).fail(function(){
$("#errorMSGtext").html("unable to connect to authentication server");
$("#alertMSG").removeClass("hidden");
});
});
/**
* close / hide error message
*/
$("#btnCloseError").click(function(){
$("#alertMSG").addClass("hidden");
});
/**
* execute after pageload
*/
$.ajax({
type: "POST",
url: "/api/captiveportal/access/status/" + zoneid + "/",
dataType:"json",
data:{ user: $("#inputUsername").val(), password: $("#inputPassword").val() }
}).done(function(data) {
if (data['clientState'] == 'AUTHORIZED') {
$("#logout_frm").removeClass('hidden');
} else if (data['authType'] == 'none') {
$("#login_none").removeClass('hidden');
} else {
$("#login_password").removeClass('hidden');
}
}).fail(function(){
$("#errorMSGtext").html("unable to connect to authentication server");
$("#alertMSG").removeClass("hidden");
});
});
</script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">NuestraRED.org</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<form class="navbar-form navbar-right">
<div class="form-group">
<input type="text" placeholder="Email" class="form-control">
</div>
<div class="form-group">
<input type="password" placeholder="Password" class="form-control">
</div>
<button type="submit" class="btn btn-success">Sign in</button>
</form>
</div><!--/.navbar-collapse -->
</div>
</nav>
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron " id="cabezote">
<div class="container text-center">
<h1>NuestraRED</h1>
<p>Red Comunitaria</p>
<img class="img img-responsive center-block" src="images/logoNR.png" height="48" width="200">
</div>
</div>
<div class='container' >
<div class="col-lg-10 col-lg-push-1 text-center">
<span class="linea_botones"> <a class='btn btn-block btn-default btn-circle btn-xl' href="https://wikipedia.redinc.org/wikipedia_es_all_novid?"><i class="fab fa-wikipedia-w"></i></a> <br><a class="texto_botones" href="https://wikipedia.redinc.org/wikipedia_es_all_novid.html">Wikipedia</a></span>
<span class="linea_botones"><a class='btn btn-block btn-primary btn-circle btn-xl' href= "https://wikipedia.redinc.org/wiktionary_es_all_novid?"><i class="fas fa-sort-alpha-down"></i></a><br><a class="texto_botones" href= "https://wikipedia.redinc.org/wiktionary_es_all_novid?">Diccionario</a></span>
<span class="linea_botones"><a class='btn btn-block btn-success btn-circle btn-xl' href="https://wikipedia.redinc.org/wikibooks_es_all_novid?"><i class="fas fa-atlas"></i></i></a><br><a class="texto_botones" href="https://wikipedia.redinc.org/wikibooks_es_all_novid?">Biblioteca</a></span>
<span class="linea_botones"><a class='btn btn-block btn-warning btn-circle btn-xl' href="https://wikipedia.redinc.org/wikivoyage_es_all_novid?"><i class="fas fa-globe"></i></a><br><a class="texto_botones" href="https://wikipedia.redinc.org/wikivoyage_es_all_novid?" >Viajar</a></span>
<span class="linea_botones"><a class='btn btn-block btn-danger btn-circle btn-xl' href="https://wikipedia.redinc.org/vikidia_es_all/"><i class="fas fa-child"></i></a><br><a class="texto_botones" href="https://wikipedia.redinc.org/vikidia_es_all/" >Niños</a></span>
<span class="linea_botones"><a class='btn btn-block btn-default btn-circle btn-xl' href="https://wikipedia.redinc.org/wikiquote_es_all_novid?"><i class="fas fa-broadcast-tower"></i></a><br><a class="texto_botones" href="https://wikipedia.redinc.org/wikiquote_es_all_novid?">Frases</a></span>
<span class="linea_botones"><a class='btn btn-block btn-info btn-circle btn-xl' href="https://wikipedia.redinc.org/wikisource_es_all_novid?"><i class="fas fa-book-reader"></i></a><br><a class="texto_botones" href="https://wikipedia.redinc.org/wikisource_es_all_novid?">Documentos</a></span>
<span class="linea_botones"><a class='btn btn-block btn-success btn-circle btn-xl' href="https://wikipedia.redinc.org/wikiversity_es_all_novid?"><i class="fas fa-user-graduate"></i></a><br><a class="texto_botones" href="https://wikipedia.redinc.org/wikiversity_es_all_novid?">Universidad</a></span>
<span class="linea_botones"><a class='btn btn-block btn-warning btn-circle btn-xl' href="https://wikipedia.redinc.org/wikinews_es_all_novid?"><i class="fab fa-readme"></i></a><br><a class="texto_botones" href="https://wikipedia.redinc.org/wikinews_es_all_novid?">Prensa</a></span>
<span class="linea_botones"><a class='btn btn-block btn-warning btn-circle btn-xl' href="https://redinc.org/es.stackoverflow.com_es_all/?"><i class="fab fa-stack-overflow"></i></a><br><a class="texto_botones" href="https://wikipedia.redinc.org/wikinews_es_all_novid?">Stack Overflow</a></span>
</div>
</div>
<main class="page-content col-sm-6 col-sm-push-3">
<div class='container alert alert-success col-sm-8 col-sm-push-3 button'>
NuestraRed.org ofrece acceso a diferentes contenidos locales a los que puedes acceder sin Interntet o datos en tu celular escribe en tu navegador o da clic: <a href="http://nuestrared.org" class="btn btn-success" target="_blank">NuestraRed.org</a><i class="icon-hand-up"></i>
</div>
<div class='container alert alert-danger col-sm-8 col-sm-push-3 button'>
Si quieres acceso a Internet responde la siguiente <a href="" target="_blank" class="btn btn-danger"> encuesta</a>
</div>
<div class='container alert alert-info col-sm-8 col-sm-push-3'>
NuestraRed.org es un proyecto libre y colaborativo de naturaleza comunitaria que utiliza el espectro electromagnético en las frecuencias 2.4 y 5.2 Mhz
y por lo tanto no requiere permisos adicionales para su operación según Resolución 0689 / 2004 mintic.
</div>
<!-- User option 1: login needed with name and password -->
<div id="login_password" class="hidden">
<form class="form-signin">
<h2 class="form-signin-heading">Please sign in</h2>
<label for="inputUsername" class="sr-only">Username</label>
<input type="text" id="inputUsername" class="form-control" placeholder="Username" required autofocus autocomplete="none" autocapitalize="none" autocorrect="off">
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<button class="btn btn-primary btn-block" id="signin" type="button">Sign in</button>
</form>
</div>
<!-- User option 2: login needed, without username, password -->
<div id="login_none" class="hidden">
<form class="form-signin">
<button class="btn btn-primary btn-block" id="signin_anon" type="button">Sign in</button>
</form>
</div>
<!-- User option 3: Already logged in, show logout button -->
<div id="logout_frm" class="hidden">
<form class="form-signin">
<button class="btn btn-primary btn-block" id="logoff" type="button">Logout</button>
</form>
</div>
<!-- Message dialog -->
<div class="alert alert-danger alert-dismissible hidden" role="alert" id="alertMSG">
<button type="button" class="close" id="btnCloseError" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<span id="errorMSGtext"></span>
</div>
</main>
<!-- bootstrap script -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>