]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/updatexlrator.cgi
Ein Paar Dateien fuer die GPLv3 angepasst.
[people/teissler/ipfire-2.x.git] / html / cgi-bin / updatexlrator.cgi
index 7227de49041e46169ce22fdf81029a485f581e71..fb457a3581149833db60179b15deb3f9b5b1794c 100644 (file)
@@ -1,19 +1,29 @@
 #!/usr/bin/perl
-#
-# IPCop CGIs
-#
-# This code is distributed under the terms of the GPL
-#
-# (c) 2006 marco.s
-#
-# $Id: updatexlrator.cgi,v 1.0.0 2006/09/12 00:00:00 marco.s Exp $
-#
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
 
 use strict;
 
 # enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
 
 use IO::Socket;
 
@@ -21,6 +31,7 @@ require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
 
+my %color = ();
 my %checked=();
 my %selected=();
 my %netsettings=();
@@ -60,6 +71,7 @@ my $chk_cron_mly = "${General::swroot}/updatexlrator/autocheck/cron.monthly";
 &General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
 &General::readhash("${General::swroot}/main/settings", \%mainsettings);
 &General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
+&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
 
 $xlratorsettings{'ACTION'} = '';
 $xlratorsettings{'ENABLE_LOG'} = 'off';
@@ -175,7 +187,7 @@ if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr save and restart'})
 
        &savesettings;
 
-       system('/usr/local/bin/restartsquid');
+       system('/usr/local/bin/squidctrl restart >/dev/null 2>&1');
 }
 
 if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr remove file'})
@@ -385,9 +397,9 @@ END
        {
                $id++;
                if ($id % 2) {
-                       print "<tr bgcolor='$Header::table1colour'>\n"; }
+                       print "<tr bgcolor='$color{'color20'}'>\n"; }
                else {
-                       print "<tr bgcolor='$Header::table2colour'>\n"; }
+                       print "<tr bgcolor='$color{'color22'}'>\n"; }
                $filesize = (-s "$repository/$updatefile");
                1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;
 
@@ -456,6 +468,21 @@ END
                } elsif ($metadata[1] eq 'Symantec')
                {
                        print "<img src='/images/updxl-src-symantec.gif' alt='Symantec'}' />&nbsp;</td>\n";
+               } elsif ($metadata[1] eq 'Avira')
+               {
+                       print "<img src='/images/updxl-src-avira.gif' alt='Avira'}' />&nbsp;</td>\n";
+               } elsif ($metadata[1] eq 'Avast')
+               {
+                       print "<img src='/images/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</td>\n";
+               } elsif ($metadata[1] eq 'IPFire')
+               {
+                       print "<img src='/images/IPFire.png' width='18' height='18' alt='IPFire'}' />&nbsp;</td>\n";
+               } elsif ($metadata[1] eq 'Appel')
+               {
+                       print "<img src='/images/Apple.png' width='18' height='18' alt='Apple'}' />&nbsp;</td>\n";
+               } elsif ($metadata[1] eq 'Linux')
+               {
+                       print "<img src='/images/tux.png' alt='Linux'}' />&nbsp;</td>\n";
                } else
                {
                        print "<img src='/images/updxl-src-unknown.gif' alt='$Lang::tr{'updxlrtr unknown'}' />&nbsp;</td>\n";
@@ -535,8 +562,30 @@ print <<END
                <td align='center'><img src='/images/updxl-src-symantec.gif' alt='Symantec' /></td>
                <td class='base'>Symantec</td>
                <td class='base'>&nbsp;</td>
+               <td align='center'><img src='/images/updxl-src-avira.gif' alt='Avira' /></td>
+               <td class='base'>Avira</td>
+               <td class='base'>&nbsp;</td>
+               <td align='center'><img src='/images/updxl-src-apple.gif' alt='Apple' /></td>
+               <td class='base'>Apple</td>
+               <td class='base'>&nbsp;</td>
+       </tr>
+       <tr>
+               <td class='base' colspan='2'>&nbsp;</td>
+               <td align='center'><img src='/images/IPFire.png' width='18' height='18' alt='IPFire' /></td>
+               <td class='base'>IPFire</td>
+               <td class='base'>&nbsp;</td>
+               <td align='center'><img src='/images/tux.png' alt='Linux' /></td>
+               <td class='base'>Linux</td>
+               <td class='base'>&nbsp;</td>
+               <td align='center'><img src='/images/updxl-src-avast.gif' alt='Avast' /></td>
+               <td class='base'>Avast</td>
+               <td class='base'>&nbsp;</td>
                <td align='center'><img src='/images/updxl-src-unknown.gif' alt='$Lang::tr{'updxlrtr unknown'}' /></td>
                <td class='base'>$Lang::tr{'updxlrtr unknown'}</td>
+               <td class='base'>&nbsp;</td>
+               <td align='center'></td>
+               <td class='base'></td>
+               <td class='base'>&nbsp;</td>
        </tr>
 </table>
 END