]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/connscheduler.cgi
Add missing patches for compat-wireless.
[people/teissler/ipfire-2.x.git] / html / cgi-bin / connscheduler.cgi
index e99c4fb494a62f71dc4629c85f27b155a5f1fa00..b257adb2e24c72ef6ba0480cd2c1cdce77ad4079 100644 (file)
@@ -1,29 +1,40 @@
 #!/usr/bin/perl
-#
-# IPFire CGI
-# based on:
-#
-# IPCop Connection Scheduler Web-Iface
-#
-# This code is distributed under the terms of the GPL
-#
-# 2006-04-xx created by weizen_42 at ipcop-forum dot de
-# 2006-06-xx added reboot and shutdown
-# 2006-08-20 added ipsecctrl
-#
-
+###############################################################################
+#                                                                             #
+# 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';
 
 require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
 
-require '/var/ipcop/connscheduler/lib.pl';
+require '/var/ipfire/connscheduler/lib.pl';
+
+my %color = ();
+my %mainsettings = ();
+&General::readhash("${General::swroot}/main/settings", \%mainsettings);
+&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
 
 my $buttontext = $Lang::tr{'add'};
 my $hiddenvalue = 'add';
@@ -408,11 +419,11 @@ for my $id ( 0 .. $#CONNSCHED::config )
   }
   elsif ( $id % 2 )
   {
-    $trcolor = "<tr bgcolor='$Header::table2colour'>";
+    $trcolor = "<tr bgcolor='$color{'color20'}'>";
   }
   else 
   {
-    $trcolor = "<tr bgcolor='$Header::table1colour'>";
+    $trcolor = "<tr bgcolor='$color{'color22'}'>";
   }
 
 print <<END
@@ -444,14 +455,14 @@ $trcolor
 <td align='center'>
   <form method='post' name='frm$id' action='$ENV{'SCRIPT_NAME'}'>
   <input type='hidden' name='ACTION' value='up' />
-  <input type='image' name='$Lang::tr{'up'}' src='/images/up.gif' alt='$Lang::tr{'ConnSched up'}' title='$Lang::tr{'ConnSched up'}' />
+  <input type='image' name='$Lang::tr{'ConnSched up'}' src='/images/up.gif' alt='$Lang::tr{'ConnSched up'}' title='$Lang::tr{'ConnSched up'}' />
   <input type='hidden' name='ID' value='$id' />
   </form>
 </td>
 <td align='center'>
   <form method='post' name='frm$id' action='$ENV{'SCRIPT_NAME'}'>
   <input type='hidden' name='ACTION' value='down' />
-  <input type='image' name='$Lang::tr{'down'}' src='/images/down.gif' alt='$Lang::tr{'ConnSched down'}' title='$Lang::tr{'ConnSched down'}' />
+  <input type='image' name='$Lang::tr{'ConnSched down'}' src='/images/down.gif' alt='$Lang::tr{'ConnSched down'}' title='$Lang::tr{'ConnSched down'}' />
   <input type='hidden' name='ID' value='$id' />
   </form>
 </td>
@@ -468,14 +479,6 @@ print <<END
 </table>
 <br />
 <hr />
-<table width='100%'>
-<tr>
-       <td>&nbsp;</td>
-       <td align='right'>
-       <b><small><a href="http://www.ban-solms.de/t/IPCop.html" target="_blank">Connection Scheduler $CONNSCHED::version</a></small></b>
-       </td>
-</tr>
-</table>
 END
 ;