Community discussions

MikroTik App
 
User avatar
arjuneu
Member Candidate
Member Candidate
Topic Author
Posts: 173
Joined: Fri Oct 07, 2011 10:24 am

Need Help! Hotspot page customizing

Sun Oct 09, 2011 7:58 am

html>

<head>

<title>.:: ACE HomeNet ::.</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">

<link href="img/Style.css" rel="stylesheet" type="text/css">


<style type="text/css">
<!--
textarea,input,select {
background-color: #FDFBFB;
border: 1px #BBBBBB solid;
padding: 2px;
margin: 1px;
font-size: 14px;
color: #808080;
}

.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)
>


<div align="center">
<div class="top-bar"></div>
<div class="middle">
<table width="100%" height="100%">


<tr>

<td align="center" valign="middle">

<form action="$(link-logout)" name="logout" onSubmit="return openLogout()">


<table border="0" class="tabula">
$(if login-by == 'trial')
<br><div style="text-align: center;">Welcome trial user!</div><br>
$(elif login-by != 'mac')
<br><div style="text-align: center;">Welcome $(username)!</div><br>
$(endif)

<tr>
<td align="center" width="140">Download:</td>
<td align="center" width="140">Time Left:</td>
<td align="center" width="140">Upload:</td>
</tr>

<tr>
<td align="center" width="140">$(bytes-out-nice)</td>
<td align="center" width="140">$(session-time-left)</td>
<td align="center" width="140">$(bytes-in-nice)</td>
<tr>
<td align="left" marginleft=5px: colspan="2">IP: $(ip) <br /> MAC: $(mac)</td>
<td>
$(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="Log Off" class="buttonmini">
$(endif)

</td>
</tr>
$(else)



</table></form>


</td>
</tr>

</table>

<div class="bottom"></div>
</div>
</body>

</html>



This is my hotspot status page. But it doesn't shows the session-time-left. I user UM as radius server.
 
User avatar
omega-00
Forum Guru
Forum Guru
Posts: 1167
Joined: Sat Jun 06, 2009 4:54 am
Location: Australia
Contact:

Re: Need Help! Hotspot page customizing

Tue Oct 11, 2011 11:30 pm

What does it currently show in the place of "session-time-left"?

0, or error or nothing at all?
Can you confirm that the session you're authenticating with has a session time limit?
You could try creating a local hotspot user (via winbox, not the user manager) and defining a session time to see if the code is correct.
 
User avatar
arjuneu
Member Candidate
Member Candidate
Topic Author
Posts: 173
Joined: Fri Oct 07, 2011 10:24 am

Re: Need Help! Hotspot page customizing

Wed Oct 12, 2011 6:44 am

Currently, it doesn't show anything. I can't create hospot user via winbox because it doesn't have validity period, User and MAC binding, Pricing, etc. features. And sessions i have authenticating has 20 hours of uptime. When creating user via winbox it shows the left time.

Any suggestions ...........
 
User avatar
omega-00
Forum Guru
Forum Guru
Posts: 1167
Joined: Sat Jun 06, 2009 4:54 am
Location: Australia
Contact:

Re: Need Help! Hotspot page customizing

Wed Oct 12, 2011 3:42 pm

I was meaning to create a hotspot user via winbox with a session time limit just for you to test the code, so you've done that and those show correct remaining uptime?

If so then it would seem the users created in user-manager don't have the correct times (or these are not being passed).
Are you able to export full info for a few test users and confirm the session time limits are listed for those accounts?
 
User avatar
arjuneu
Member Candidate
Member Candidate
Topic Author
Posts: 173
Joined: Fri Oct 07, 2011 10:24 am

Re: Need Help! Hotspot page customizing

Sat Oct 15, 2011 12:55 pm

I exported the full info but all details are displayed except the Assigned Profile. I'm using ROS 5.7. Why is this happening?
 
User avatar
arjuneu
Member Candidate
Member Candidate
Topic Author
Posts: 173
Joined: Fri Oct 07, 2011 10:24 am

Re: Need Help! Hotspot page customizing

Sat Oct 15, 2011 4:05 pm

I want to add Started and Expiry Date in Hotspot Status page. Can anyone know the script for the Started and Expiry Date in Hotspot Status page. My users are claiming about that. I am using Usermanager as Radius server.

Who is online

Users browsing this forum: holvoetn, mongobongo, normis and 100 guests