X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fupnp.cgi;h=8d2666ec75be4292aac4611dbf5efe8becf2438e;hb=7274a673f0e2941c17c0745285d2f46f97728db3;hp=eb635bb5bd9a90e464fef3ff60d6839d4a0dbd96;hpb=5a3e0dca58c1efebdd0c4f8d8c3e9c3146d35f3e;p=people%2Fteissler%2Fipfire-2.x.git diff --git a/html/cgi-bin/upnp.cgi b/html/cgi-bin/upnp.cgi index eb635bb5b..8d2666ec7 100644 --- a/html/cgi-bin/upnp.cgi +++ b/html/cgi-bin/upnp.cgi @@ -1,16 +1,28 @@ #!/usr/bin/perl -# -# IPFire CGIs -# -# This code is distributed under the terms of the GPL -# -# (c) The IPFire Team -# +############################################################################### +# # +# 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 . # +# # +############################################################################### 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"; @@ -24,6 +36,11 @@ my %selected= () ; my %servicenames =('UPnP Daemon' => 'upnpd',); +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + &Header::showhttpheaders(); ############################################################################################################################ ############################################### Setzen von Standartwerten ################################################## @@ -74,7 +91,7 @@ xml_document_path = $upnpsettings{'XML'} END ; close FILE; - system("/usr/local/bin/upnpctrl upnpxml $upnpsettings{'XML'} $upnpsettings{'DESCRIPTION'} $upnpsettings{'manufacturer'}"); + system("/usr/local/bin/upnpctrl","upnpxml","$upnpsettings{'friendlyName'}","$upnpsettings{'XML'}","$upnpsettings{'DESCRIPTION'}"); } elsif ($upnpsettings{'ACTION'} eq 'Start') { @@ -122,12 +139,7 @@ my $lines = 0; my $key = ''; foreach $key (sort keys %servicenames) { - if ($lines % 2) - {print "\n";} - else - {print "\n"; } - - print "$key\n"; + print "$key\n"; my $shortname = $servicenames{$key}; my $status = &isrunning($shortname); print "$status\n"; @@ -144,7 +156,7 @@ print <
- +
$Lang::tr{'options'}
$Lang::tr{'options'}

UPnP Device Name: