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/captiveportal/index.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/captiveportal/index.php')
-rwxr-xr-x | usr/local/captiveportal/index.php | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 59456d7..bd5a91c 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -467,38 +467,8 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut $logouturl = "http://{$ourhostname}/"; } - echo <<<EOD -<HTML> -<HEAD><TITLE>Redirecting...</TITLE></HEAD> -<BODY> -<SPAN STYLE="font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 11px;"> -<B>Redirecting to <A HREF="{$my_redirurl}">{$my_redirurl}</A>...</B> -</SPAN> -<SCRIPT LANGUAGE="JavaScript"> -<!-- -LogoutWin = window.open('', 'Logout', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=256,height=64'); -if (LogoutWin) { - LogoutWin.document.write('<HTML>'); - LogoutWin.document.write('<HEAD><TITLE>Logout</TITLE></HEAD>') ; - LogoutWin.document.write('<BODY BGCOLOR="#435370">'); - LogoutWin.document.write('<DIV ALIGN="center" STYLE="color: #ffffff; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 11px;">') ; - LogoutWin.document.write('<B>Click the button below to disconnect</B><P>'); - LogoutWin.document.write('<FORM METHOD="POST" ACTION="{$logouturl}">'); - LogoutWin.document.write('<INPUT NAME="logout_id" TYPE="hidden" VALUE="{$sessionid}">'); - LogoutWin.document.write('<INPUT NAME="logout" TYPE="submit" VALUE="Logout">'); - LogoutWin.document.write('</FORM>'); - LogoutWin.document.write('</DIV></BODY>'); - LogoutWin.document.write('</HTML>'); - LogoutWin.document.close(); -} + include("{$g['varetc_path']}/captiveportal-logout.html"); -document.location.href="{$my_redirurl}"; ---> -</SCRIPT> -</BODY> -</HTML> - -EOD; } else { if($_POST['ORIGINAL_PORTAL_IP'] && $_SERVER['SERVER_NAME'] != $_POST['ORIGINAL_PORTAL_IP']) { header ('HTTP/1.1 301 Moved Permanently'); |