Hello everyone,
I have a small network of 30 users, I use the RB951 wireless RouterBoard and it works great on the 5.21.
I limited the monthly quota (total of download and upload in gigabytes) for each user. The problem is that users calls me all the time to know how many gigabytes they used and how many are left.
I hope someone of you guys can teach me away that allow each user to know this kind of information by himself/herself, of course without having the admin password.
bax
January 21, 2015, 1:29pm
2
Does you using userman ? hotspot , pppoe server ?
yes.. I use the hotspot to give each user a username and password, and limit the quota.
bax
January 23, 2015, 4:57pm
4
Then it is much easy way to modify status.html
Here is example (translate to your language):
<html>
<head>
<title>Hotspot > status</title></head><body bottommargin="0" topmargin="0" leftmargin="0" rightmargin="0"
$(if advert-pending == 'yes')
onLoad="openAdvert()"
$(endif)
>
$(if refresh-timeout)
<meta http-equiv="refresh" content="$(refresh-timeout-secs)">
$(endif)
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<META HTTP-EQUIV="CACHE-CONTROL" 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;
}
.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=385,height=445');
window.close();
return false;
}
//-->
</script>
<script language="JavaScript">
function readablizeBytes(bytes) {
var s = ['bytes', 'kb', 'MB', 'GB', 'TB', 'PB'];
var e = Math.floor(Math.log(bytes)/Math.log(1024));
return (bytes/Math.pow(1024, Math.floor(e))).toFixed(2)+" "+s[e];
}
</script>
<table width="381" height="475">
<tr>
<td align="center" valign="middle" height="459" width="373">
<form action="$(link-logout)" name="logout" onSubmit="return openLogout()">
<table border="2" class="tabula" width="352" height="304">
$(if login-by == 'trial') <br>
<div style="text-align: center;">Dobro došli trial user!</div>
<br>
$(elif login-by != 'mac') <br>
<div style="text-align: center;">Dobro došli $(username)!</div>
<br>
$(endif)
<tr>
<td align="right" width="193" height="41"><font size="2">Vaša IP addresa:</font></td>
<td width="164" height="41"><font size="2">$(ip)</font></td>
</tr>
<tr>
<td align="right" width="193" height="67"><font size="2">Trenutni
promet Bytes<br>
up/down/total:</font></td>
<td width="164" height="67"><font size="2">$(bytes-in-nice) / $(bytes-out-nice)
/<br>
</font>
<script language="JavaScript">
document.write(readablizeBytes($(bytes-in) + $(bytes-out)));
</script>
</td>
</tr>
<tr>
<td align="right" width="193" height="52"><font size="2">Preostalo
prometa:<br>
(<font color="#0033FF">Racun po prometu</font>)</font> </td>
<td width="164" height="52">
<script language="JavaScript">document.write(readablizeBytes($(remain-bytes-in)));</script>
</td>
<tr>
<td align="right" width="193" height="46"><font size="2">Vrijeme preostalo:<br>
(<font color="#FF0000">Flat racun</font>)</font></td>
<td width="164" height="46"><font size="2">$(session-time-left)</font></td>
<tr>
<td align="right" height="73" width="193"><font size="2">Korisnièke
stranice:</font></td>
<td height="73" width="164"><a href="https://central-user.wisp.hr/user" target="_blank"><font size="2">https://central-user.wisp.hr/user</font></a></td>
</tr>
</table>
<p><font size="2">$(if login-by-mac != 'yes') <br>
Status refresh:$(refresh-timeout)<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">
$(endif) </font></p>
</form>
</td>
</table>
</body>
</html>
Thank you so much
but would you please tell me how to insert these codes to the RouterBoard? , i’m new with the Mikrotik system.
bax
January 23, 2015, 6:51pm
6
Go with ftp client to your mikrotik … there is directory hotspot .
There is all html pages … modify status.html and upload back to mikrotik …
Also read manual
ook i will try to do so
if u have this part of the manual or video please attach it here.