diff options
author | Ermal <eri@pfsense.org> | 2010-05-28 21:30:47 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-05-28 21:30:47 +0000 |
commit | 5b87b24e07c6bf29c1e905ed6f75b6859d4f5fd7 (patch) | |
tree | 466cfeaf9f2ca68c8e2928d86165b13d290624c6 /usr/local/www/services_captiveportal.php | |
parent | d462a851d8655e0636c9f1ca3912f3f09efcd223 (diff) | |
download | pfsense-5b87b24e07c6bf29c1e905ed6f75b6859d4f5fd7.zip pfsense-5b87b24e07c6bf29c1e905ed6f75b6859d4f5fd7.tar.gz |
Make the logout page configurable like the other pages. The only difference is that this page/code will be treated as a .php page so it may contain internal php CP variables referenced.
Diffstat (limited to 'usr/local/www/services_captiveportal.php')
-rwxr-xr-x | usr/local/www/services_captiveportal.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php index 8d79eb2..fcc5be6 100755 --- a/usr/local/www/services_captiveportal.php +++ b/usr/local/www/services_captiveportal.php @@ -57,6 +57,9 @@ if ($_GET['act'] == "viewhtml") { } else if ($_GET['act'] == "viewerrhtml") { echo base64_decode($config['captiveportal']['page']['errtext']); exit; +} else if ($_GET['act'] == "viewlogouthtml") { + echo base64_decode($config['captiveportal']['page']['logouttext']); + exit; } $pconfig['cinterface'] = $config['captiveportal']['interface']; @@ -203,6 +206,8 @@ if ($_POST) { $config['captiveportal']['page']['htmltext'] = base64_encode(file_get_contents($_FILES['htmlfile']['tmp_name'])); if (is_uploaded_file($_FILES['errfile']['tmp_name'])) $config['captiveportal']['page']['errtext'] = base64_encode(file_get_contents($_FILES['errfile']['tmp_name'])); + if (is_uploaded_file($_FILES['logoutfile']['tmp_name'])) + $config['captiveportal']['page']['logouttext'] = base64_encode(file_get_contents($_FILES['logoutfile']['tmp_name'])); write_config(); @@ -257,6 +262,7 @@ function enable_change(enable_change) { document.iform.radiussession_timeout.disabled = radius_endis; document.iform.htmlfile.disabled = endis; document.iform.errfile.disabled = endis; + document.iform.logoutfile.disabled = endis; document.iform.radiusacctport.disabled = (radius_endis || !document.iform.radacct_enable.checked) && !enable_change; @@ -644,6 +650,20 @@ The contents of the HTML/PHP file that you upload here are displayed when an aut You may include "$PORTAL_MESSAGE$", which will be replaced by the error or reply messages from the RADIUS server, if any.</td> </tr> <tr> + <td width="22%" valign="top" class="vncell">Logout<br> + page<br> + contents</td> + <td class="vtable"> + <input name="logoutfile" type="file" class="formfld file" id="logoutfile"><br> + <?php if ($config['captiveportal']['page']['logouttext']): ?> + <a href="?act=viewlogouthtml" target="_blank">View current page</a> + <br> + <br> + <?php endif; ?> +The contents of the HTML/PHP file that you upload here are displayed when an authentication error occurs. +You may include "$PORTAL_MESSAGE$", which will be replaced by the error or reply messages from the RADIUS server, if any.</td> + </tr> + <tr> <td width="22%" valign="top"> </td> <td width="78%"> <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)"> |