hotspot login..need help

So i’m supposed to make a hotspot login page where the customer can choose either the free internet (capped at 256k) or pay for the premium (5mb down/1mb up) through paypal.

I know im supposed to edit the login.html, but after that i’m lost. I haven’t done HTML since 2004 and have no idea how to do this..

any help would be GREAT

The wiki is a good place to start.
http://wiki.mikrotik.com/wiki/Contents
You did not mention how you are controlling the paid users on the hotspot. I will presume something like User Manager. How do you control your free users? Do they get a user/password? Or do they all login with one user account?

You may edit the login.html file using html editor (with wysiwyg capable is recommended), but leave these blocks intact, there are :
Block 1 :: for re-sending the user login data (hidden form)

$(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)

Block 2 :: for sending the user login data

<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" />

Block 3 :: for trial user link (if activated in hotspot profile)

$(if trial == 'yes')Free trial available (15 minutes), <a style="color: #FF8080"href="$(link-login-only)?dst=$(link-orig-esc)&username=T-$(mac-esc)">click here</a>.$(endif)

Block 4 :: last one before closing body tag

<script type="text/javascript">
<!--
  document.login.username.focus();
//-->
</script>

Also you may change the appearance on error display at :

$(if error)<br /><div style="color: #FF8080; font-size: 9px">$(error)</div>$(endif)

TIPS : using javascript and CSS for more “catchy” login page design, you may look at Login-Page-Sharing-Thread for more inspiration

If you are planning to make credit-limited-type user, using User Manager is recommended …

And what about status.html and logout.html ???

My login.html works with this lines…but not status.html

Thanks :slight_smile:

The examples above apply to the login.html page. The status and logout pages should be limited to user, location, and accounting information variables. The manual has a list of the variables near the bottom of the hotspot page.