]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Captive-Portal: fix some typos and missing dir
authorAlexander Marx <alexander.marx@ipfire.org>
Wed, 10 Feb 2016 14:05:35 +0000 (15:05 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Sep 2017 17:54:45 +0000 (18:54 +0100)
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
config/rootfiles/common/web-user-interface
html/cgi-bin/captive.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index 71c8756b64c32ea100014c6f7bcf1637da7bb292..3975738cdcb08c70fa06e2f0b26652a9a3dffdf1 100644 (file)
@@ -98,6 +98,7 @@ srv/web/ipfire/html/captive/assets/captive.css
 srv/web/ipfire/html/captive/assets/internet.png
 srv/web/ipfire/html/captive/assets/favicon.ico
 srv/web/ipfire/html/captive/index.cgi
+srv/web/ipfire/html/captive/logo
 #srv/web/ipfire/html/images
 srv/web/ipfire/html/images/IPFire.png
 srv/web/ipfire/html/images/add.gif
index c4373b57c6cb6b37c34387aee272a927e052708b..2d995663231c97f82bc2d7b2197d5943ad61010e 100755 (executable)
@@ -58,6 +58,11 @@ unless (-e $voucherout)      { system("touch $voucherout"); }
 
 #actions
 if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}"){
+       #Check Expiretime
+       if($cgiparams{'EXP_HOUR'}+$cgiparams{'EXP_DAY'}+$cgiparams{'EXP_WEEK'}+$cgiparams{'EXP_MONTH'} == 0 && $cgiparams{'UNLIMITED'} == ''){
+               $errormessage=$Lang::tr{'Captive noexpiretime'};
+       }
+
        my $file = $cgiparams{'uploaded_file'};
        if ($file){
                #Check if extension is png
@@ -85,8 +90,8 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}"){
                        my $PNG1=<PNG>;
                        close(PNG);
                        my ($width,$height)=&pngsize($PNG1);
-                       if($width > 1920 || $height > 800 || $width < 1280 || $height < 4000){
-                               $errormessage.="$Lang::tr{'Captive invalid logosize'} <br>Filedimensions width: $width   height: $height<br>";
+                       if($width > 1920 || $height > 800 || $width < 1280 || $height < 400){
+                               $errormessage.="$Lang::tr{'Captive invalid logosize'} <br>Filedimensions width: $width  height: $height ";
                                unlink("$logopath/logo.png");
                        }
                }
@@ -600,7 +605,8 @@ sub pngsize {
                my $PNG = $1;
                ($width,$height) = unpack( "NN", $PNG );
        } else {
-               $width=$Lang::tr{'acct invalid png'};
+               $width="invalid";
+               $height= "invalid";
        };
        return ($width,$height);
 }
index d05d26fe6c67e8a0d899156db5984266d89c2772..0843c10a360fa4847bc33dbf5b2d46f86e216277 100644 (file)
@@ -27,6 +27,7 @@
 'Captive mac' => 'MAC-Adresse',
 'Captive menu' => 'Captive-Portal',
 'Captive nr' => 'Nummer',
+'Captive noexpiretime' => 'Es wurde kein gültiger Verbindungszeitraum angegeben',
 'Captive nolimit' => 'Unbegrenzt',
 'Captive voactive' => 'Aktive Gutscheine',
 'Captive vout' => 'Ausgegebene Gutscheine',
index 013885480a161283051a8a62052cdbeed4570b84..0166cb6c7cf4e2504dc627796563b0e96b1dbea9 100644 (file)
@@ -27,6 +27,7 @@
 'Captive mac' => 'MAC-Address',
 'Captive menu' => 'Captive Portal',
 'Captive nr' => 'Number',
+'Captive noexpiretime' => 'No valid connection timerange given',
 'Captive nolimit' => 'no limit',
 'Captive voactive' => 'Active Vouchers',
 'Captive vout' => 'Issued vouchers',
@@ -35,7 +36,7 @@
 'Captive wrong ext' => 'Uploaded file has wrong filetype',
 'Captive voucher' => 'Voucher',
 'Captive voucherout' => 'Ticket transfer',
-'Captive vouchervalid' => 'Conenction timerange',
+'Captive vouchervalid' => 'Connection timerange',
 'Choose Rule' => 'Choose <u>one</u> of the following rules.',
 'Class' => 'Class',
 'Class was deleted' => 'with potential subclasses was deleted',