]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/updatexlrator.cgi
Fixed maniacs files (mail has convertet to "dos")
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / updatexlrator.cgi
index afca525b76b0ab7b23be2b7fcb716570bc5604b0..618cef790fe9ecae6b86638816f6f086689d0ff5 100644 (file)
@@ -1,11 +1,23 @@
 #!/usr/bin/perl
-#
-# IPCop CGIs
-#
-# This code is distributed under the terms of the GPL
-#
-# (c) 2006 marco.s
-#
+###############################################################################
+#                                                                             #
+# 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;
 
@@ -36,7 +48,7 @@ my $filedate='';
 my $lastaccess='';
 my $lastcheck='';
 
-my $repository = "/srv/web/ipfire/html/updatecache";
+my $repository = "/var/updatecache";
 my $hintcolour = '#FFFFCC';
 
 my $sfNoSource='0';
@@ -63,9 +75,8 @@ my $chk_cron_mly = "${General::swroot}/updatexlrator/autocheck/cron.monthly";
 
 $xlratorsettings{'ACTION'} = '';
 $xlratorsettings{'ENABLE_LOG'} = 'off';
-$xlratorsettings{'CHILDREN'} = '5';
 $xlratorsettings{'PASSIVE_MODE'} = 'off';
-$xlratorsettings{'MAX_DISK_USAGE'} = '75';
+$xlratorsettings{'MAX_DISK_USAGE'} = '95';
 $xlratorsettings{'LOW_DOWNLOAD_PRIORITY'} = 'off';
 $xlratorsettings{'ENABLE_AUTOCHECK'} = 'off';
 $xlratorsettings{'FULL_AUTOSYNC'} = 'off';
@@ -136,11 +147,6 @@ if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr purge'})
 
 if ($xlratorsettings{'ACTION'} eq $Lang::tr{'save'})
 {
-       if (!($xlratorsettings{'CHILDREN'} =~ /^\d+$/) || ($xlratorsettings{'CHILDREN'} < 1))
-       {
-               $errormessage = $Lang::tr{'updxlrtr invalid num of children'};
-               goto ERROR;
-       }
        if (!($xlratorsettings{'MAX_DISK_USAGE'} =~ /^\d+$/) || ($xlratorsettings{'MAX_DISK_USAGE'} < 1) || ($xlratorsettings{'MAX_DISK_USAGE'} > 100))
        {
                $errormessage = $Lang::tr{'updxlrtr invalid disk usage'};
@@ -152,11 +158,6 @@ if ($xlratorsettings{'ACTION'} eq $Lang::tr{'save'})
 
 if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr save and restart'})
 {
-       if (!($xlratorsettings{'CHILDREN'} =~ /^\d+$/) || ($xlratorsettings{'CHILDREN'} < 1))
-       {
-               $errormessage = $Lang::tr{'updxlrtr invalid num of children'};
-               goto ERROR;
-       }
        if (!($xlratorsettings{'MAX_DISK_USAGE'} =~ /^\d+$/) || ($xlratorsettings{'MAX_DISK_USAGE'} < 1) || ($xlratorsettings{'MAX_DISK_USAGE'} > 100))
        {
                $errormessage = $Lang::tr{'updxlrtr invalid disk usage'};
@@ -243,8 +244,6 @@ print <<END
 <tr>
        <td class='base' width='25%'>$Lang::tr{'updxlrtr enable log'}:</td>
        <td class='base' width='20%'><input type='checkbox' name='ENABLE_LOG' $checked{'ENABLE_LOG'}{'on'} /></td>
-       <td class='base' width='25%'>$Lang::tr{'updxlrtr children'}:</td>
-       <td class='base' width='30%'><input type='text' name='CHILDREN' value='$xlratorsettings{'CHILDREN'}' size='5' /></td>
 </tr>
 <tr>
        <td class='base'>$Lang::tr{'updxlrtr passive mode'}:</td>
@@ -449,28 +448,34 @@ END
                print "\t\t<td align='center' nowrap='nowrap'>&nbsp;";
                if ($metadata[1] eq 'Adobe')
                {
-                       print "<img src='/images/updxl-src-adobe.gif' alt='Adobe'}' />&nbsp;</td>\n";
+                       print "<img src='/images/updxl-src-adobe.gif' alt='Adobe' />&nbsp;</td>\n";
                } elsif ($metadata[1] eq 'Microsoft')
                {
-                       print "<img src='/images/updxl-src-windows.gif' alt='Microsoft'}' />&nbsp;</td>\n";
+                       print "<img src='/images/updxl-src-windows.gif' alt='Microsoft' />&nbsp;</td>\n";
                } elsif ($metadata[1] eq 'Symantec')
                {
-                       print "<img src='/images/updxl-src-symantec.gif' alt='Symantec'}' />&nbsp;</td>\n";
+                       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";
+                       print "<img src='/images/updxl-src-avira.gif' alt='Avira' />&nbsp;</td>\n";
+               } elsif ($metadata[1] eq 'AVG')
+               {
+                       print "<img src='/images/updxl-src-avg.gif' alt='AVG' />&nbsp;</td>\n";
                } elsif ($metadata[1] eq 'Avast')
                {
-                       print "<img src='/images/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</td>\n";
+                       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/IPFire.png' width='18' height='18' alt='IPFire' />&nbsp;</td>\n";
+               } elsif ($metadata[1] eq 'Apple')
+               {
+                       print "<img src='/images/updxl-src-apple.gif' alt='Apple' />&nbsp;</td>\n";
+               } elsif ($metadata[1] eq 'Kaspersky')
                {
-                       print "<img src='/images/Apple.png' width='18' height='18' alt='Apple'}' />&nbsp;</td>\n";
+                       print "<img src='/images/updxl-src-kaspersky.gif' alt='Kaspersky' />&nbsp;</td>\n";
                } elsif ($metadata[1] eq 'Linux')
                {
-                       print "<img src='/images/tux.png' alt='Linux'}' />&nbsp;</td>\n";
+                       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";
@@ -553,6 +558,9 @@ print <<END
                <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-avg.gif' alt='AVG' /></td>
+               <td class='base'>AVG</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>
@@ -568,12 +576,12 @@ print <<END
                <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-kaspersky.gif' alt='Kaspersky' /></td>
+               <td class='base'>Kaspersky</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