Hello guys,
I have a captive portal Perl script template that I got from my access point. I inserted the terms and condition under "# HTML Page Body (Bottom)". However, right now the "Agree" checkbox doesn't do anything when the I logged in to the captive portal. I can login to the captive portal wether the checkbox is checked or not. I would like to make the checkbox to work.
For example, when the user enter their username/password and clicked the "Login" button, if the checkbox is not checked, they should not be able to login to the captive portal; and a short message stating that they need to agree to the Terms and Condition by clicking the Agree checkbox. But if the Agree checkbox is checked then the user should be able to login no problem.
Here is the note that I got when inserting the an html code:
Editing the wpr.pl file can customize your splash and login screens. When editing the value of the variables, remember that all text that is placed inside of quotes denotes the value of the
variable. If you are inserting html that has quotes in it, you must escape the quotes with the \
character.
I couldn't attach the .txt file, but this is the content of it.
# Company Name$html_company_name = "Xirrus";
# HTML Document Header
$html_doc_header = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
# Meta Tags
$html_head_metatags = "
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
<meta http-equiv=\"Pragma\" content=\"no-cache\">";
# CSS
$html_head_css = "
<link href=\"${imagepath}hs.css\" rel=\"stylesheet\">";
# HTML Page Body (Logo, Background, Header, and Footer)
$logo = "accesspoint_logo.gif";
$bg = "page_bg.jpg";
$html_body_header = "";
$html_body_footer = "";
# HTML Page Body (Top)
$html_body_top = "
<div id=\"page_container\">
<table cellspacing=\"5\" cellpadding=\"1\" border=\"0\" width=\"100%\" style=\"background: #ffffff url(${imagepath}${bg}) bottom no-repeat;\">
<tr>
<td valign=\"middle\"><div id=\"logo_container\"><img src=\"${imagepath}${logo}\" alt=\"Logo\" width=\"225\" height=\"35\"></div>
$html_body_header";
# HTML Page Body (Bottom)
$html_body_bottom = "
$html_body_footer
</tr>
<table><h2>Terms of Use of Internet</h2>
<h2>TERMS, CONDITION AND NOTICES</h2>
<p>TERMS PARAGRAPH IS LOCATED HERE!!!
<h5>SECURITY OF YOUR ACCESS AND USE</h5>
<p>SECURITY PARAGRAPH IS LOCATED HERE!!!
<input type=\"checkbox\" name=\"Agree\" value=\"agree\" /> Agree<br /></form> </center><br><br></table>
</div>";
$html_splash_submit = "
<tr>
<td align=\"right\"> </td>
<td align=\"left\"><br/><br/><br/><input type=\"submit\" name=\"button\" class=\"button\" value=\"Proceed\"></td>
<p>By clicking the <b>Submit</b> button you agree to the Terms of Use Agreement.</p>
</tr>
";
$html_splash_timeout = "
<script>
function wpr_timeout()
{
document.form1.submit();
}
var TIMEOUT = 0;
setTimeout( 'wpr_timeout()', TIMEOUT * 1000 );
</script>
<input type=\"hidden\" name=\"button\" class=\"button\" value=\"Proceed\">
";
$html_splash_dismiss = $html_splash_submit;
$html_splash = "<table cellpadding=\"2\" cellspacing=\"5\" border=\"0\">$html_splash_submit</table>
";
$html_login = "<table cellpadding=\"2\" cellspacing=\"5\" border=\"0\">
<tr>
<td align=\"right\"> Username:</td>
<td><input name=\"UserName\" type=\"text\" size=\"50\" maxlength=\"64\"></td>
</tr>
<tr>
<td align=\"right\"> Password:</td>
<td align=\"left\"><input name=\"Password\" type=\"password\" size=\"50\" maxlength=\"64\"></td>
</tr>
<tr>
<td align=\"right\"> </td>
<td align=\"left\"><input type=\"submit\" name=\"button\" class=\"button\" value=\"Login\"></td>
</tr>
</table>
";
$html_splash_login = $html_login ;
1;
Thank you,
thm