From: Jan Paul Tuecking Date: Sun, 5 Dec 2010 10:08:54 +0000 (+0100) Subject: Added license agreement for old installations to index.cgi. X-Git-Tag: v2.9-beta1~23^2~8 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=7fa7c7dd2eae612f3fca2cf32b8c9b33cd54fae0 Added license agreement for old installations to index.cgi. --- diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi old mode 100755 new mode 100644 index 052e8cac64..1a42871862 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -64,6 +64,8 @@ if (`find /var/run/need_reboot 2>/dev/null`) { $reboot = 1; } + + if ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown'} || $cgiparams{'ACTION'} eq $Lang::tr{'reboot'}) { $refresh = ""; } elsif ($connstate =~ /$Lang::tr{'connecting'}/ || /$Lang::tr{'connection closed'}/ ){ @@ -135,8 +137,13 @@ my $dialButtonDisabled = "disabled='disabled'"; &Header::openpage($Lang::tr{'main page'}, 1, $refresh); &Header::openbigbox('', 'center'); -&Header::openbox('100%', 'center', &Header::cleanhtml(`/bin/uname -n`,"y")); +# licence agreement +if ($cgiparams{'ACTION'} eq 'Yes' && $cgiparams{'gpl_accepted'} eq '1') { + system('touch /var/ipfire/main/gpl_accepted') +} +if (`find /var/ipfire/main/gpl_accepted 2>/dev/null`) { +&Header::openbox('100%', 'center', &Header::cleanhtml(`/bin/uname -n`,"y")); if ( ( $pppsettings{'VALID'} eq 'yes' && $modemsettings{'VALID'} eq 'yes' ) || ( $netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ )) { @@ -472,5 +479,650 @@ END } &Header::closebox(); +} + +else { +&Header::openbox('100%', 'left', $Lang::tr{'gpl license agreement'}); +print <
+ +

+

+ $Lang::tr{'gpl i accept these terms and conditions'}. +
+ +
+

+ $Lang::tr{'gpl unofficial translation of the general public license v3'} + +END + +&Header::closebox(); +} + &Header::closebigbox(); &Header::closepage(); diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index ddf3352db5..8bdc1007af 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -831,6 +831,10 @@ 'genkey' => 'PSK erzeugen', 'genre' => 'Genre', 'global settings' => 'Globale Einstellungen', +'gpl license agreement' => 'Lizenz Vereinbarung', +'gpl i accept these terms and conditions' => 'Ich akzeptiere diese Bedingungen und Konditionen', +'gpl please read carefully the general public license and accept it below' => 'Bitte die General Public License genau lesen und diese unten akzeptiere', +'gpl unofficial translation of the general public license v3' => 'Inoffizielle Übersetzung der General Public License v3', 'graph' => 'Diagramm', 'graph per' => 'pro', 'green' => 'GRÜN', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index f89d93715a..035c9c7a85 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -857,6 +857,10 @@ 'genkey' => 'Generate PSK', 'genre' => 'Genre', 'global settings' => 'Global settings', +'gpl license agreement' => 'License Agreement', +'gpl i accept these terms and conditions' => 'I accept these terms and conditions', +'gpl please read carefully the general public license and accept it below' => 'Please read carefully the General Public License and accept it below', +'gpl unofficial translation of the general public license v3' => 'Unofficial translation of the General Public License v3', 'graph' => 'Graph', 'graph per' => 'per', 'green' => 'Green', diff --git a/langs/es/cgi-bin/es.pl b/langs/es/cgi-bin/es.pl index ca8a853fbb..7ed5f54094 100644 --- a/langs/es/cgi-bin/es.pl +++ b/langs/es/cgi-bin/es.pl @@ -855,6 +855,10 @@ 'genkey' => 'Generar PSK', 'genre' => 'Género', 'global settings' => 'Configuraciones globales', +'gpl license agreement' => 'License Agreement', +'gpl i accept these terms and conditions' => 'I accept these terms and conditions', +'gpl please read carefully the general public license and accept it below' => 'Please read carefully the General Public License and accept it below', +'gpl unofficial translation of the general public license v3' => 'Unofficial translation of the General Public License v3', 'graph' => 'Gráfico', 'graph per' => 'por', 'green' => 'Green', diff --git a/langs/fr/cgi-bin/fr.pl b/langs/fr/cgi-bin/fr.pl index 8c3c378dc9..951092070b 100644 --- a/langs/fr/cgi-bin/fr.pl +++ b/langs/fr/cgi-bin/fr.pl @@ -856,6 +856,10 @@ 'genkey' => 'Générer PSK', 'genre' => 'Genre', 'global settings' => 'Configuration générale', +'gpl license agreement' => 'License Agreement', +'gpl i accept these terms and conditions' => 'I accept these terms and conditions', +'gpl please read carefully the general public license and accept it below' => 'Please read carefully the General Public License and accept it below', +'gpl unofficial translation of the general public license v3' => 'Unofficial translation of the General Public License v3', 'graph' => 'Graphique', 'graph per' => 'pour', 'green' => 'VERT',