diff --git a/config/rootfiles/common/web-user-interface b/config/rootfiles/common/web-user-interface index dbf5a869f..b755e6e7b 100644 --- a/config/rootfiles/common/web-user-interface +++ b/config/rootfiles/common/web-user-interface @@ -96,6 +96,7 @@ srv/web/ipfire/html/blob.gif srv/web/ipfire/html/captive/assets/captive.css srv/web/ipfire/html/captive/assets/favicon.ico srv/web/ipfire/html/captive/assets/internet.png +srv/web/ipfire/html/captive/template.html srv/web/ipfire/html/clwarn.cgi srv/web/ipfire/html/dial.cgi srv/web/ipfire/html/favicon.ico diff --git a/html/cgi-bin/captive/index.cgi b/html/cgi-bin/captive/index.cgi index c3f9d035f..71bff37a2 100755 --- a/html/cgi-bin/captive/index.cgi +++ b/html/cgi-bin/captive/index.cgi @@ -23,6 +23,7 @@ use strict; use CGI ':standard'; use URI::Escape; use HTML::Entities(); +use HTML::Template; # enable only the following on debugging purpose #use warnings; @@ -134,107 +135,25 @@ if($redir == 1){ } #Open HTML Page, load header and css -&head(); -&error(); -&start(); +my $tmpl = HTML::Template->new( + filename => "/srv/web/ipfire/html/captive/template.html", + die_on_bad_params => 0 +); -#Functions -sub start(){ - if ($settings{'AUTH'} eq 'VOUCHER'){ - &voucher(); - }else{ - &agb(); - } -} +$tmpl->param(REDIRECT_URL => $url); -sub error(){ - if ($errormessage){ - print "