Community discussions

MikroTik App
 
CoMmAnDeR
just joined
Topic Author
Posts: 1
Joined: Thu Oct 19, 2006 10:03 pm

need help

Thu Oct 19, 2006 10:11 pm

hello i need help on my login in page
when i change the login.html and put some pic and text on it
when the user come and wanna login in they put there user and password
nothing happend

can any one help me in that or give me script for user and password and told me how to use it plz

thx
 
cmit
Forum Guru
Forum Guru
Posts: 1552
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Fri Oct 20, 2006 10:46 am

You should only modify those HTML carefully and when you know what you do. There is javascript in there, which is essential for a working login page.

I suggest starting over again (by resetting the HTML hotspot pages to the default) and carefully modify/add things again.

Best regards,
Christian Meis
 
ahmedramze
Frequent Visitor
Frequent Visitor
Posts: 96
Joined: Mon Feb 21, 2005 9:29 am
Location: IRAQ
Contact:

Wed Oct 25, 2006 11:15 am

Hi

If you want to change your hotspot Login page read this

1- design you home page with any program (( Front page , MMFlash ...etc ))


2-after complete your design edit it with notepad or WordPad

3- search on this Tage <body>

4- put this code after the above tage


<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 language="JavaScript" src="/md5.js">
	</script>
	<script language="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)

5- Now put the below table in your home page in any location in the page you want
<table width="240" height="240" 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>
</table>
$(if error)
<br><div style="color: #FF8080; font-size: 9px">$(error)</div>
$(endif)

</td>
</tr>
</table>


7- now search on </body> and put this code before it

<script language="JavaScript">
<!--
  document.login.username.focus();
//-->
</script>

</body>

now the compelte HTML page
<html>
<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 language="JavaScript" src="/md5.js">
	</script>
	<script language="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 width="240" height="240" 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>
</table>
$(if error)
<br><div style="color: #FF8080; font-size: 9px">$(error)</div>
$(endif)

</td>
</tr>
</table>

<script language="JavaScript">
<!--
  document.login.username.focus();
//-->
</script>

</body>
</html>

Just if you want put <title> your title </title> to use IE Title

Any more quistion ??
 
fruiz002
just joined
Posts: 13
Joined: Fri Jan 06, 2012 1:35 pm

Re: need help

Wed Jun 13, 2012 5:03 pm

Hello,

I'm tryin to perform several actions before the user logs in the system and the problem is that my login.php page to which I redirect the user does not work. I know that I have to pass the parameters from the user to it, but I have no clue how. Can someone hlep me?

thanks

Regards
 
Devil
Member Candidate
Member Candidate
Posts: 170
Joined: Thu Jul 21, 2011 9:13 am

Re: need help

Thu Jun 14, 2012 10:09 am

This wiki explains the basic setup you need to make it work
Best Regards

Who is online

Users browsing this forum: No registered users and 19 guests