Captive-Portal: SHow always licencebox in config

Also fix index.cgi to show individual title

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
This commit is contained in:
Alexander Marx
2016-02-04 07:30:05 +01:00
committed by Michael Tremer
parent c7e78cc62e
commit e14adf759a
3 changed files with 6 additions and 8 deletions

View File

@@ -28,7 +28,7 @@ use HTML::Entities();
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
unless (-e "${General::swroot}/captive/settings") { system("touch ${General::swroot}/captive/settings"); }
my %settings=();
my %mainsettings;
my %color;
@@ -42,6 +42,7 @@ my %voucherhash=();
my %clientshash=();
my $settingsfile="${General::swroot}/captive/settings";
unless (-e $settingsfile) { system("touch $settingsfile"); }
unless (-e $voucherout) { system("touch $voucherout"); }
&Header::getcgihash(\%cgiparams);
@@ -256,12 +257,9 @@ END
END
;
if($settings{'AUTH'} eq 'LICENSE'){
&agbbox();
}
&agbbox();
print"<tr><td>$Lang::tr{'Captive vouchervalid'}</td><td>";
print "<br><table border='0' with=100%>";
print "<th>$Lang::tr{'hours'}</th><th>$Lang::tr{'days'}</th><th>$Lang::tr{'weeks'}</th><th>$Lang::tr{'months'}</th>";

View File

@@ -168,7 +168,7 @@ print<<END
<body>
<center>
<div class="title">
<h1>$settings{'TITLE'}
<h1>$settings{'TITLE'}</h1>
</div>
<br>
<div class="agb">
@@ -196,7 +196,7 @@ sub voucher(){
<body>
<center>
<div class="title">
<h1>LOGIN</h1>
<h1>$settings{'TITLE'}</h1>
</div>
<br>
<div class="login">

View File

@@ -64,7 +64,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
chown -R root:root /srv/web/ipfire
chmod -R 755 /srv/web/ipfire/cgi-bin
chmod -R 644 /srv/web/ipfire/html
chmod 755 /srv/web/ipfire/html /srv/web/ipfire/html/{index.cgi,redirect.cgi,dial.cgi,images,include,themes,themes/*,themes/*/*,captive/*}
chmod 755 /srv/web/ipfire/html /srv/web/ipfire/html/{index.cgi,redirect.cgi,dial.cgi,images,include,themes,themes/*,themes/*/*,captive/*,captive/*/*}
ln -svf ipfire /srv/web/ipfire/html/themes/ipfire-rounded
# Reset permissions of redirect templates and theme directories