Portal cautivo para microTIK

This commit is contained in:
kleper 2019-04-17 10:12:08 -05:00
parent d195b4d637
commit ead73ac74a
18 changed files with 1037 additions and 33 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 39 KiB

98
portalcautivo/login.html Normal file
View File

@ -0,0 +1,98 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>internet hotspot > login</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>
<style type="text/css">
body {color: #737373; font-size: 10px; font-family: verdana;}
textarea,input,select {
background-color: #FDFBFB;
border: 1px solid #BBBBBB;
padding: 2px;
margin: 1px;
font-size: 14px;
color: #808080;
}
a, a:link, a:visited, a:active { color: #AAAAAA; text-decoration: none; font-size: 10px; }
a:hover { border-bottom: 1px dotted #c1c1c1; color: #AAAAAA; }
img {border: none;}
td { font-size: 14px; color: #7A7A7A; }
</style>
</head>
<body>
$(if chap-id)
<form name="sendin" action="$(link-login-only)" method="post">
<input type="hidden" name="username" />
<input type="hidden" name="password" />
<input type="hidden" name="dst" value="$(link-orig)" />
<input type="hidden" name="popup" value="true" />
</form>
<script type="text/javascript" src="/md5.js"></script>
<script type="text/javascript">
<!--
function doLogin() {
document.sendin.username.value = document.login.username.value;
document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
document.sendin.submit();
return false;
}
//-->
</script>
$(endif)
<div align="center">
<a href="$(link-login-only)?target=lv&amp;dst=$(link-orig-esc)">Latviski</a>
</div>
<table width="100%" style="margin-top: 10%;">
<tr>
<td align="center" valign="middle">
<div class="notice" style="color: #c1c1c1; font-size: 9px">Please log on to use the internet hotspot service<br />$(if trial == 'yes')Free trial available, <a style="color: #FF8080"href="$(link-login-only)?dst=$(link-orig-esc)&amp;username=T-$(mac-esc)">click here</a>.$(endif)</div><br />
<table width="280" height="280" style="border: 1px solid #cccccc; padding: 0px;" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="bottom" height="175" colspan="2">
<form name="login" action="$(link-login-only)" method="post"
$(if chap-id) onSubmit="return doLogin()" $(endif)>
<input type="hidden" name="dst" value="$(link-orig)" />
<input type="hidden" name="popup" value="true" />
<table width="100" style="background-color: #ffffff">
<tr><td align="right">login</td>
<td><input style="width: 80px" name="username" type="text" value="$(username)"/></td>
</tr>
<tr><td align="right">password</td>
<td><input style="width: 80px" name="password" type="password"/></td>
</tr>
<tr><td>&nbsp;</td>
<td><input type="submit" value="OK" /></td>
</tr>
</table>
</form>
</td>
</tr>
<tr><td align="center"><a href="http://www.mikrotik.com" target="_blank" style="border: none;"><img src="/img/logobottom.png" alt="mikrotik" /></a></td></tr>
</table>
<br /><div style="color: #c1c1c1; font-size: 9px">Powered by MikroTik RouterOS</div>
$(if error)<br /><div style="color: #FF8080; font-size: 9px">$(error)</div>$(endif)
</td>
</tr>
</table>
<script type="text/javascript">
<!--
document.login.username.focus();
//-->
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

82
portalcautivo/logout.html Normal file
View File

@ -0,0 +1,82 @@
<html>
<head>RedINC Salir</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
<style type="text/css">
<!--
textarea,input,select {
background-color: #FDFBFB;
padding: 2px;
margin: 1px;
font-size: 14px;
color: #808080;
}
input[type="submit"]{
background: -webkit-linear-gradient(left, #3931af, #00c6ff) !important;;
border: none;
padding: 5px 20px 5px 20px;
color: white;
font-weight: 600;
border-radius: 30px;
margin-top: 1em;
}
.tabula{
border-width: 1px;
border-collapse: collapse;
border-color: #c1c1c1;
background-color: transparent;
font-family: verdana;
font-size: 11px;
}
body{ color: #737373; font-size: 12px; font-family: verdana; }
a, a:link, a:visited, a:active { color: #AAAAAA; text-decoration: none; font-size: 12px; }
a:hover { border-bottom: 1px dotted #c1c1c1; color: #AAAAAA; }
img {border: none;}
td { font-size: 12px; padding: 4px;}
-->
</style>
</head>
<body>
<script language="JavaScript">
<!--
function openLogin() {
if (window.name != 'hotspot_logout') return true;
open('$(link-login)', '_blank', '');
window.close();
return false;
}
//-->
</script>
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">
<b>Haz terminado la sesión, ¡Vuelve pronto!</b> <br><br>
<table class="tabula" border="1">
<tr><td align="right">Nombre de usuario</td><td>$(username)</td></tr>
<tr><td align="right">Dirección IP</td><td>$(ip)</td></tr>
<tr><td align="right">Dirección MAC</td><td>$(mac)</td></tr>
<tr><td align="right">Tiempo de sesión</td><td>$(uptime)</td></tr>
$(if session-time-left)
<tr><td align="right">time left</td><td>$(session-time-left)</td></tr>
$(endif)
<tr><td align="right">bytes carga/descarga:</td><td>$(bytes-in-nice) / $(bytes-out-nice)</td></tr>
</table>
<br>
<form action="$(link-login)" name="login" onSubmit="return openLogin()">
<input type="submit" value="Salir">
</form>
</td>
</table>
</body>
</html>

217
portalcautivo/md5.js Normal file
View File

@ -0,0 +1,217 @@
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 1.1 Copyright (C) Paul Johnston 1999 - 2002.
* Code also contributed by Greg Holt
* See http://pajhome.org.uk/site/legal.html for details.
*/
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add(x, y)
{
var lsw = (x & 0xFFFF) + (y & 0xFFFF)
var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
return (msw << 16) | (lsw & 0xFFFF)
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function rol(num, cnt)
{
return (num << cnt) | (num >>> (32 - cnt))
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function cmn(q, a, b, x, s, t)
{
return safe_add(rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)
}
function ff(a, b, c, d, x, s, t)
{
return cmn((b & c) | ((~b) & d), a, b, x, s, t)
}
function gg(a, b, c, d, x, s, t)
{
return cmn((b & d) | (c & (~d)), a, b, x, s, t)
}
function hh(a, b, c, d, x, s, t)
{
return cmn(b ^ c ^ d, a, b, x, s, t)
}
function ii(a, b, c, d, x, s, t)
{
return cmn(c ^ (b | (~d)), a, b, x, s, t)
}
/*
* Calculate the MD5 of an array of little-endian words, producing an array
* of little-endian words.
*/
function coreMD5(x)
{
var a = 1732584193
var b = -271733879
var c = -1732584194
var d = 271733878
for(i = 0; i < x.length; i += 16)
{
var olda = a
var oldb = b
var oldc = c
var oldd = d
a = ff(a, b, c, d, x[i+ 0], 7 , -680876936)
d = ff(d, a, b, c, x[i+ 1], 12, -389564586)
c = ff(c, d, a, b, x[i+ 2], 17, 606105819)
b = ff(b, c, d, a, x[i+ 3], 22, -1044525330)
a = ff(a, b, c, d, x[i+ 4], 7 , -176418897)
d = ff(d, a, b, c, x[i+ 5], 12, 1200080426)
c = ff(c, d, a, b, x[i+ 6], 17, -1473231341)
b = ff(b, c, d, a, x[i+ 7], 22, -45705983)
a = ff(a, b, c, d, x[i+ 8], 7 , 1770035416)
d = ff(d, a, b, c, x[i+ 9], 12, -1958414417)
c = ff(c, d, a, b, x[i+10], 17, -42063)
b = ff(b, c, d, a, x[i+11], 22, -1990404162)
a = ff(a, b, c, d, x[i+12], 7 , 1804603682)
d = ff(d, a, b, c, x[i+13], 12, -40341101)
c = ff(c, d, a, b, x[i+14], 17, -1502002290)
b = ff(b, c, d, a, x[i+15], 22, 1236535329)
a = gg(a, b, c, d, x[i+ 1], 5 , -165796510)
d = gg(d, a, b, c, x[i+ 6], 9 , -1069501632)
c = gg(c, d, a, b, x[i+11], 14, 643717713)
b = gg(b, c, d, a, x[i+ 0], 20, -373897302)
a = gg(a, b, c, d, x[i+ 5], 5 , -701558691)
d = gg(d, a, b, c, x[i+10], 9 , 38016083)
c = gg(c, d, a, b, x[i+15], 14, -660478335)
b = gg(b, c, d, a, x[i+ 4], 20, -405537848)
a = gg(a, b, c, d, x[i+ 9], 5 , 568446438)
d = gg(d, a, b, c, x[i+14], 9 , -1019803690)
c = gg(c, d, a, b, x[i+ 3], 14, -187363961)
b = gg(b, c, d, a, x[i+ 8], 20, 1163531501)
a = gg(a, b, c, d, x[i+13], 5 , -1444681467)
d = gg(d, a, b, c, x[i+ 2], 9 , -51403784)
c = gg(c, d, a, b, x[i+ 7], 14, 1735328473)
b = gg(b, c, d, a, x[i+12], 20, -1926607734)
a = hh(a, b, c, d, x[i+ 5], 4 , -378558)
d = hh(d, a, b, c, x[i+ 8], 11, -2022574463)
c = hh(c, d, a, b, x[i+11], 16, 1839030562)
b = hh(b, c, d, a, x[i+14], 23, -35309556)
a = hh(a, b, c, d, x[i+ 1], 4 , -1530992060)
d = hh(d, a, b, c, x[i+ 4], 11, 1272893353)
c = hh(c, d, a, b, x[i+ 7], 16, -155497632)
b = hh(b, c, d, a, x[i+10], 23, -1094730640)
a = hh(a, b, c, d, x[i+13], 4 , 681279174)
d = hh(d, a, b, c, x[i+ 0], 11, -358537222)
c = hh(c, d, a, b, x[i+ 3], 16, -722521979)
b = hh(b, c, d, a, x[i+ 6], 23, 76029189)
a = hh(a, b, c, d, x[i+ 9], 4 , -640364487)
d = hh(d, a, b, c, x[i+12], 11, -421815835)
c = hh(c, d, a, b, x[i+15], 16, 530742520)
b = hh(b, c, d, a, x[i+ 2], 23, -995338651)
a = ii(a, b, c, d, x[i+ 0], 6 , -198630844)
d = ii(d, a, b, c, x[i+ 7], 10, 1126891415)
c = ii(c, d, a, b, x[i+14], 15, -1416354905)
b = ii(b, c, d, a, x[i+ 5], 21, -57434055)
a = ii(a, b, c, d, x[i+12], 6 , 1700485571)
d = ii(d, a, b, c, x[i+ 3], 10, -1894986606)
c = ii(c, d, a, b, x[i+10], 15, -1051523)
b = ii(b, c, d, a, x[i+ 1], 21, -2054922799)
a = ii(a, b, c, d, x[i+ 8], 6 , 1873313359)
d = ii(d, a, b, c, x[i+15], 10, -30611744)
c = ii(c, d, a, b, x[i+ 6], 15, -1560198380)
b = ii(b, c, d, a, x[i+13], 21, 1309151649)
a = ii(a, b, c, d, x[i+ 4], 6 , -145523070)
d = ii(d, a, b, c, x[i+11], 10, -1120210379)
c = ii(c, d, a, b, x[i+ 2], 15, 718787259)
b = ii(b, c, d, a, x[i+ 9], 21, -343485551)
a = safe_add(a, olda)
b = safe_add(b, oldb)
c = safe_add(c, oldc)
d = safe_add(d, oldd)
}
return [a, b, c, d]
}
/*
* Convert an array of little-endian words to a hex string.
*/
function binl2hex(binarray)
{
var hex_tab = "0123456789abcdef"
var str = ""
for(var i = 0; i < binarray.length * 4; i++)
{
str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
hex_tab.charAt((binarray[i>>2] >> ((i%4)*8)) & 0xF)
}
return str
}
/*
* Convert an array of little-endian words to a base64 encoded string.
*/
function binl2b64(binarray)
{
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
var str = ""
for(var i = 0; i < binarray.length * 32; i += 6)
{
str += tab.charAt(((binarray[i>>5] << (i%32)) & 0x3F) |
((binarray[i>>5+1] >> (32-i%32)) & 0x3F))
}
return str
}
/*
* Convert an 8-bit character string to a sequence of 16-word blocks, stored
* as an array, and append appropriate padding for MD4/5 calculation.
* If any of the characters are >255, the high byte is silently ignored.
*/
function str2binl(str)
{
var nblk = ((str.length + 8) >> 6) + 1 // number of 16-word blocks
var blks = new Array(nblk * 16)
for(var i = 0; i < nblk * 16; i++) blks[i] = 0
for(var i = 0; i < str.length; i++)
blks[i>>2] |= (str.charCodeAt(i) & 0xFF) << ((i%4) * 8)
blks[i>>2] |= 0x80 << ((i%4) * 8)
blks[nblk*16-2] = str.length * 8
return blks
}
/*
* Convert a wide-character string to a sequence of 16-word blocks, stored as
* an array, and append appropriate padding for MD4/5 calculation.
*/
function strw2binl(str)
{
var nblk = ((str.length + 4) >> 5) + 1 // number of 16-word blocks
var blks = new Array(nblk * 16)
for(var i = 0; i < nblk * 16; i++) blks[i] = 0
for(var i = 0; i < str.length; i++)
blks[i>>1] |= str.charCodeAt(i) << ((i%2) * 16)
blks[i>>1] |= 0x80 << ((i%2) * 16)
blks[nblk*16-2] = str.length * 16
return blks
}
/*
* External interface
*/
function hexMD5 (str) { return binl2hex(coreMD5( str2binl(str))) }
function hexMD5w(str) { return binl2hex(coreMD5(strw2binl(str))) }
function b64MD5 (str) { return binl2b64(coreMD5( str2binl(str))) }
function b64MD5w(str) { return binl2b64(coreMD5(strw2binl(str))) }
/* Backward compatibility */
function calcMD5(str) { return binl2hex(coreMD5( str2binl(str))) }

View File

@ -4,6 +4,9 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="captiveportal-bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="captiveportal-all.css" crossorigin="anonymous">
@ -18,16 +21,45 @@
<![endif]-->
<style>
html, body{
height:100%;
}
body{
background: url(captiveportal-imagen_central.jpg);
background-position: center;
background-repeat: no-repeat;
background: url(captiveportal-imagen_central.jpg)no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
textarea,input,select {
background-color: #FDFBFB;
border: 1px solid #BBBBBB;
padding: 2px;
margin: 1px;
font-size: 14px;
color: #808080;
border-radius: 4px;
}
td{
font-weight: bolder;
}
input[type="submit"] {
background: -webkit-linear-gradient(left, #3931af, #00c6ff) !important;;
border: none;
padding: 5px 20px 5px 20px;
color: white;
font-weight: 600;
border-radius: 30px;
margin-top: 1em;
}
.register {
background: -webkit-linear-gradient(left, #3931afb5, #00c6ff);
margin-top: 3%;
padding: 3%;
position: relative;
}
.register-left {
@ -58,7 +90,7 @@
.register-left img {
margin-top: 15%;
margin-bottom: 5%;
width: 25%;
width: 80%;
-webkit-animation: mover 2s infinite alternate;
animation: mover 1s infinite alternate;
}
@ -139,8 +171,8 @@
text-shadow: rgb(0, 0, 0) 0px 2px 3px;
color: white;
text-align: center;
margin-left: 10px;
margin-top: 10%;
margin-left: 10%;
margin-top: 15%;
margin-bottom: -15%;
border-top-left-radius: 35px;
background: -webkit-linear-gradient(left, #3931af, #00c6ff) !important;
@ -188,9 +220,10 @@
font-size: 1em;
}
@media screen and (max-width:990px) {
.register .nav-tabs {
width: 90%;
width: 80%;
}
}
@ -205,7 +238,19 @@
margin-top: 0px;
}
.register-heading{
font-size: 21px;
font-size: 1em;
margin-left: 25px;
}
}
@media only screen and (max-width: 425px) {
.register-right {
border-top-left-radius: 0% 50%;
border-bottom-left-radius: 0% 50%;
background:#f8f9fad4
}
.register-left img {
width: 30%;
}
}
</style>
@ -222,10 +267,10 @@
<div class="col-md-9 register-right">
<ul class="nav nav-tabs nav-justified" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link " id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="false">Con Internet</a>
<a class="nav-link active" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="true">Sin Internet</a>
</li>
<li class="nav-item">
<a class="nav-link active" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="true">Sin Internet</a>
<a class="nav-link " id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="false">Con Internet</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
@ -233,26 +278,67 @@
<h3 class="register-heading">Entrar con Internet</h3>
<div class="row register-form">
<div class="col-md-12">
<form method="post" action="$PORTAL_ACTION$">
<div class="form-group">
<input class="form-control" name="auth_user" type="text" placeholder="Usuario" id="auth_user">
</div>
<div class="form-group">
<input class="form-control" name="auth_pass" type="password" placeholder="Contraseña" id="auth_pass">
</div>
<p> <strong>Si tienes un codigo de acceso, ingresalo aquí:</strong></p>
<div class="form-group">
<input class="form-control" name="auth_voucher" type="text" placeholder="Codigo Voucher">
</div>
<div class="form-group">
<input class="form-control" name="redirurl" type="hidden" value="$PORTAL_REDIRURL$">
</div>
<div class="form-group">
<input name="zone" type="hidden" value="$PORTAL_ZONE$">
</div>
<div class="form-group">
<input class="btn register nav-tabs register-left" name="accept" type="submit" value="Entrar">
</div>
<p> <strong>Si tienes un código de acceso, ingrésalo aquí:</strong></p>
$(if chap-id)
<form name="sendin" action="$(link-login-only)" method="post">
<input type="hidden" name="username" />
<input type="hidden" name="password" />
<input type="hidden" name="dst" value="$(link-orig)" />
<input type="hidden" name="popup" value="true" />
</form>
<script type="text/javascript" src="/md5.js"></script>
<script type="text/javascript">
<!--
function doLogin() {
document.sendin.username.value = document.login.username.value;
document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
document.sendin.submit();
return false;
}
//-->
</script>
$(endif)
<table>
<tr>
<td align="center" valign="middle">
<table>
<tr>
<td align="center" valign="bottom" colspan="2">
<form name="login" action="$(link-login-only)" method="post"
$(if chap-id) onSubmit="return doLogin()" $(endif)>
<input type="hidden" name="dst" value="$(link-orig)" />
<input type="hidden" name="popup" value="true" />
<table width="100%">
<tr><td align="right">Usuario: </td>
<td><input style="width: 100%" name="username" type="text" value="$(username)"/></td>
</tr>
<tr><td align="right">Contraseña: </td>
<td><input style="width: 100%" name="password" type="password"/></td>
</tr>
<tr><td>&nbsp;</td>
<td><input type="submit" value="Ingresar" /></td>
</tr>
</table>
</form>
</td>
</tr>
<tr><td align="center"><a href="http://www.colnodo.apc.org" target="_blank" style="border: none;"><img src="/img/logo_colnodo.png" alt="colnodo" /></a></td></tr>
</table>
$(if error)<br /><div style="color: #FF8080; font-size: 9px">$(error)</div>$(endif)
</td>
</tr>
</table>
<script type="text/javascript">
<!--
document.login.username.focus();
//-->
</script>
</form>
</div>

113
portalcautivo/status.html Normal file
View File

@ -0,0 +1,113 @@
<html>
<head>
<title>RedINC> estado</title>
$(if refresh-timeout)
<meta http-equiv="refresh" content="$(refresh-timeout-secs)">
$(endif)
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
<style type="text/css">
<!--
textarea,input,select {
background-color: #FDFBFB;
border: 1px #BBBBBB solid;
padding: 2px;
margin: 1px;
font-size: 14px;
color: #808080;
}
input[type="submit"]{
background: -webkit-linear-gradient(left, #3931af, #00c6ff) !important;;
border: none;
padding: 5px 20px 5px 20px;
color: white;
font-weight: 600;
border-radius: 30px;
margin-top: 1em;
}
.tabula{
border-width: 1px;
border-collapse: collapse;
border-color: #c1c1c1;
background-color: transparent;
font-family: verdana;
font-size: 11px;
}
body{ color: #737373; font-size: 12px; font-family: verdana; }
a, a:link, a:visited, a:active { color: #AAAAAA; text-decoration: none; font-size: 12px; }
a:hover { border-bottom: 1px dotted #c1c1c1; color: #AAAAAA; }
img {border: none;}
td { font-size: 12px; padding: 4px;}
-->
</style>
<script language="JavaScript">
<!--
$(if advert-pending == 'yes')
var popup = '';
function focusAdvert() {
if (window.focus) popup.focus();
}
function openAdvert() {
popup = open('$(link-advert)', 'hotspot_advert', '');
setTimeout("focusAdvert()", 1000);
}
$(endif)
function openLogout() {
if (window.name != 'hotspot_status') return true;
open('$(link-logout)', 'hotspot_logout', 'toolbar=0,location=0,directories=0,status=0,menubars=0,resizable=1,width=280,height=250');
window.close();
return false;
}
//-->
</script>
</head>
<body bottommargin="0" topmargin="0" leftmargin="0" rightmargin="0"
$(if advert-pending == 'yes')
onLoad="openAdvert()"
$(endif)
>
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">
<form action="$(link-logout)" name="logout" onSubmit="return openLogout()">
<table border="1" class="tabula">
$(if login-by == 'trial')
<br><div style="text-align: center;">BienvenidX!</div><br>
$(elif login-by != 'mac')
<br><div style="text-align: center;">BienvenidX! $(username)!</div><br>
$(endif)
<tr><td align="right">IP address:</td><td>$(ip)</td></tr>
<tr><td align="right">bytes subida/descarga:</td><td>$(bytes-in-nice) / $(bytes-out-nice)</td></tr>
$(if session-time-left)
<tr><td align="right">conectado / left:</td><td>$(uptime) / $(session-time-left)</td></tr>
$(else)
<tr><td align="right">conectado:</td><td>$(uptime)</td></tr>
$(endif)
$(if blocked == 'yes')
<tr><td align="right">status:</td><td><div style="color: #FF8080">
<a href="$(link-advert)" target="hotspot_advert">advertisement</a> required</div></td>
$(elif refresh-timeout)
<tr><td align="right">status refresh:</td><td>$(refresh-timeout)</td>
$(endif)
</table>
$(if login-by-mac != 'yes')
<br>
<!-- user manager link. if user manager resides on other router, replace $(hostname) by its address
<button onclick="document.location='http://$(hostname)/user?subs='; return false;">status</button>
<!-- end of user manager link -->
<input type="submit" value="Salir">
$(endif)
</form>
</td>
</table>
</body>
</html>

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

94
portalcautivo2/cutof.html Normal file
View File

@ -0,0 +1,94 @@
<!-- <div class="form-group">
<input type="text" class="form-control" placeholder="First Name *" value="" />
</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="Last Name *" value="" />
</div>
<div class="form-group">
<input type="password" class="form-control" placeholder="Password *" value="" />
</div>
<div class="form-group">
<input type="password" class="form-control" placeholder="Confirm Password *" value="" />
</div>
<div class="form-group">
<div class="maxl">
<label class="radio inline">
<input type="radio" name="gender" value="male" checked>
<span> Male </span>
</label>
<label class="radio inline">
<input type="radio" name="gender" value="female">
<span>Female </span>
</label>
</div>
</div> -->
<!-- <div class="col-md-6">
<div class="form-group">
<input type="email" class="form-control" placeholder="Your Email *" value="" />
</div>
<div class="form-group">
<input type="text" minlength="10" maxlength="10" name="txtEmpPhone" class="form-control" placeholder="Your Phone *" value="" />
</div>
<div class="form-group">
<select class="form-control">
<option class="hidden" selected disabled>Please select your Sequrity Question</option>
<option>What is your Birthdate?</option>
<option>What is Your old Phone Number</option>
<option>What is your Pet Name?</option>
</select>
</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="Enter Your Answer *" value="" />
</div>
<input type="submit" class="btnRegister" value="Register"/>
</div> -->
<!-- <div class="col-md-6">
<div class="form-group">
<input type="text" class="form-control" placeholder="First Name *" value="" />
</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="Last Name *" value="" />
</div>
<div class="form-group">
<input type="email" class="form-control" placeholder="Email *" value="" />
</div>
<div class="form-group">
<input type="text" maxlength="10" minlength="10" class="form-control" placeholder="Phone *" value="" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="password" class="form-control" placeholder="Password *" value="" />
</div>
<div class="form-group">
<input type="password" class="form-control" placeholder="Confirm Password *" value="" />
</div>
<div class="form-group">
<select class="form-control">
<option class="hidden" selected disabled>Please select your Sequrity Question</option>
<option>What is your Birthdate?</option>
<option>What is Your old Phone Number</option>
<option>What is your Pet Name?</option>
</select>
</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="`Answer *" value="" />
</div>
<input type="submit" class="btnRegister" value="Register"/>
</div>
</div> -->
<!-- <button type="button" class="btn btn-default btn-circle btn-xl"><i class="glyphicon glyphicon-ok"></i></button>
<button type="button" class="btn btn-primary btn-circle btn-xl"><i class="glyphicon glyphicon-list"></i></button>
<button type="button" class="btn btn-success btn-circle btn-xl"><i class="fas fa-images"></i></i></button>
<button type="button" class="btn btn-info btn-circle btn-xl"><i class="fab fa-wikipedia-w"></i></i></button>
<button type="button" class="btn btn-warning btn-circle btn-xl"><i class="glyphicon glyphicon-remove"></i></button>
<button type="button" class="btn btn-danger btn-circle btn-xl"><i class="fab fa-youtube"></i></button> -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

290
portalcautivo2/portal.html Normal file
View File

@ -0,0 +1,290 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="captiveportal-bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="captiveportal-all.css" crossorigin="anonymous">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Acceso a la red comunitaria</title>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
body{
background: url(captiveportal-imagen_central.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.register {
background: -webkit-linear-gradient(left, #3931afb5, #00c6ff);
margin-top: 3%;
padding: 3%;
}
.register-left {
text-align: center;
color: #fff;
margin-top: 4%;
}
.register-left input {
border: none;
border-radius: 1.5rem;
padding: 2%;
width: 60%;
background: #f8f9fa;
font-weight: bold;
color: #383d41;
margin-top: 30%;
margin-bottom: 3%;
cursor: pointer;
}
.register-right {
background: #f8f9fa;
border-top-left-radius: 20% 50%;
border-bottom-left-radius: 20% 50%;
}
.register-left img {
margin-top: 15%;
margin-bottom: 5%;
width: 25%;
-webkit-animation: mover 2s infinite alternate;
animation: mover 1s infinite alternate;
}
@-webkit-keyframes mover {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-20px);
}
}
@keyframes mover {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-20px);
}
}
.register-left p {
font-weight: lighter;
padding: 12%;
margin-top: -9%;
}
.register .register-form {
padding: 10%;
margin-top: 10%;
}
.btnRegister {
float: right;
margin-top: 10%;
border: none;
border-radius: 1.5rem;
padding: 2%;
background: #0062cc;
color: #fff;
font-weight: 600;
width: 50%;
cursor: pointer;
}
.register .nav-tabs {
margin-top: 3%;
border: none;
background: #0062cc;
border-radius: 1.5rem;
width: 40%;
float: right;
}
.register .nav-tabs .nav-link {
padding: 2%;
height: 34px;
font-weight: 600;
color: #fff;
border-top-right-radius: 1.5rem;
border-bottom-right-radius: 1.5rem;
}
.register .nav-tabs .nav-link:hover {
border: none;
}
.register .nav-tabs .nav-link.active {
width: 100%;
color: #0062cc;
border: 2px solid #0062cc;
border-top-left-radius: 1.5rem;
border-bottom-left-radius: 1.5rem;
}
.register-heading {
text-shadow: rgb(0, 0, 0) 0px 2px 3px;
color: white;
text-align: center;
margin-left: 10px;
margin-top: 10%;
margin-bottom: -15%;
border-top-left-radius: 35px;
background: -webkit-linear-gradient(left, #3931af, #00c6ff) !important;
}
.tab-content {
padding-top: 1em;
}
.boton_entrar{
margin-left: auto !important;
margin-right: auto !important;
}
.circle_button {
box-shadow: 2px 4px 0 2px rgba(0, 0, 0, 0.1);
border: .5em solid #c7d400;
font-size: 1em;
line-height: 1.1em;
color: #ffffff;
background-color: #76be4e;
margin: auto;
border-radius: 50%;
height: 7em;
width: 7em;
position: relative;
}
.circle_button:hover {
color: #ffffff;
background-color: #226093;
text-decoration: none;
border-color: #c7d400;
}
.circle_button:visited {
color: #ffffff;
background-color: #c7d400;
text-decoration: none;
}
.circle-link-greater-than {
font-size: 1em;
}
@media screen and (max-width:990px) {
.register .nav-tabs {
width: 90%;
}
}
@media screen and (max-width:768px) {
.register-left {
margin-top: 0px;
}
.register-left p {
font-weight: lighter;
padding: 0px;
margin-top: 0px;
}
.register-heading{
font-size: 21px;
}
}
</style>
</head>
<body>
<div class="container register">
<div class="row">
<div class="col-md-3 register-left">
<img src="captiveportal-logoRedINC.png" alt="" />
<h3>¡Bienvenid@!</h3>
<p>¡Estás muy cerca de entrar al mundo Web!</p>
</div>
<div class="col-md-9 register-right">
<ul class="nav nav-tabs nav-justified" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link " id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="false">Con Internet</a>
</li>
<li class="nav-item">
<a class="nav-link active" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="true">Sin Internet</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show" id="home" role="tabpanel" aria-labelledby="home-tab">
<h3 class="register-heading">Entrar con Internet</h3>
<div class="row register-form">
<div class="col-md-12">
<form method="post" action="$PORTAL_ACTION$">
<div class="form-group">
<input class="form-control" name="auth_user" type="text" placeholder="Usuario" id="auth_user">
</div>
<div class="form-group">
<input class="form-control" name="auth_pass" type="password" placeholder="Contraseña" id="auth_pass">
</div>
<p> <strong>Si tienes un codigo de acceso, ingresalo aquí:</strong></p>
<div class="form-group">
<input class="form-control" name="auth_voucher" type="text" placeholder="Codigo Voucher">
</div>
<div class="form-group">
<input class="form-control" name="redirurl" type="hidden" value="$PORTAL_REDIRURL$">
</div>
<div class="form-group">
<input name="zone" type="hidden" value="$PORTAL_ZONE$">
</div>
<div class="form-group">
<input class="btn register nav-tabs register-left" name="accept" type="submit" value="Entrar">
</div>
</form>
</div>
</div>
</div>
<div class="tab-pane fade show active" id="profile" role="tabpanel" aria-labelledby="profile-tab">
<h3 class="register-heading">Ver contenidos sin Internet</h3>
<div class="row register-form">
<div class="boton_entrar">
<div class="container boton_entrar">
<div class="col-md-12 ">
<a href="https://redinc.org">
<button class="btn btn-default circle_button" > <strong style="font-size: 25px">Entrar</strong> <span class="circle-greater-than"></span></button>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="captiveportal-jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="captiveportal-bootstrap.min.js"></script>
</body>
</html>