From 32ab16debdd7ced91e0f8a0567500e72184c9237 Mon Sep 17 00:00:00 2001 From: maniacikarus Date: Sun, 1 Jul 2007 11:50:48 +0000 Subject: [PATCH] DHCP Webseite angepasst damit beim speichern auch die rc links gesetzt werden MPFire um Quick Playlist Funktionen erweitert git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@656 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- doc/language_issues.de | 5 -- doc/language_issues.en | 5 -- html/cgi-bin/dhcp.cgi | 4 +- html/cgi-bin/mpfire.cgi | 102 ++++++++++++++++++++++++++++++++++++++-- langs/de/cgi-bin/de.pl | 8 ++++ langs/en/cgi-bin/en.pl | 8 ++++ 6 files changed, 116 insertions(+), 16 deletions(-) diff --git a/doc/language_issues.de b/doc/language_issues.de index 48409d1969..5e89b1a3d9 100644 --- a/doc/language_issues.de +++ b/doc/language_issues.de @@ -388,8 +388,3 @@ WARNING: translation string unused: weekly firewallhits WARNING: translation string unused: written sectors WARNING: translation string unused: xtaccess bad transfert WARNING: translation string unused: yearly firewallhits -WARNING: untranslated string: OVPN -WARNING: untranslated string: abort -WARNING: untranslated string: aktiv -WARNING: untranslated string: reload -WARNING: untranslated string: upgrade diff --git a/doc/language_issues.en b/doc/language_issues.en index f18920b13d..a91d08f974 100644 --- a/doc/language_issues.en +++ b/doc/language_issues.en @@ -392,8 +392,3 @@ WARNING: translation string unused: week WARNING: translation string unused: weekly firewallhits WARNING: translation string unused: written sectors WARNING: translation string unused: yearly firewallhits -WARNING: untranslated string: OVPN -WARNING: untranslated string: abort -WARNING: untranslated string: aktiv -WARNING: untranslated string: reload -WARNING: untranslated string: upgrade diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index c51834e8e8..6d88a7f46a 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -1202,11 +1202,9 @@ sub buildconf { print FILE "} #$itf\n"; system ('/usr/bin/touch', "${General::swroot}/dhcp/enable_${lc_itf}"); - system ('/usr/local/bin/dhcpctrl enable'); &General::log("DHCP on ${itf}: " . $Lang::tr{'dhcp server enabled'}) } else { unlink "${General::swroot}/dhcp/enable_${lc_itf}"; - system ('/usr/local/bin/dhcpctrl disable'); &General::log("DHCP on ${itf}: " . $Lang::tr{'dhcp server disabled'}) } } @@ -1229,6 +1227,8 @@ sub buildconf { } } close FILE; + if ( $dhcpsettings{"ENABLE_GREEN"} eq 'on' || $dhcpsettings{"ENABLE_BLUE"} eq 'on' ) {system '/usr/local/bin/dhcpctrl enable >/dev/null 2>&1';} + else {system '/usr/local/bin/dhcpctrl disable >/dev/null 2>&1';} system '/usr/local/bin/dhcpctrl restart >/dev/null 2>&1'; } diff --git a/html/cgi-bin/mpfire.cgi b/html/cgi-bin/mpfire.cgi index 05d2e149da..4716426aea 100644 --- a/html/cgi-bin/mpfire.cgi +++ b/html/cgi-bin/mpfire.cgi @@ -48,7 +48,7 @@ delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresett system("/usr/local/bin/mpfirectrl scan $mpfiresettings{'SCANDIR'} $mpfiresettings{'SCANDIRDEPS'}"); } -if ( $mpfiresettings{'ACTION'} eq ">" ){system("/usr/local/bin/mpfirectrl play $mpfiresettings{'FILE'}");} +if ( $mpfiresettings{'ACTION'} eq ">" ){system("/usr/local/bin/mpfirectrl","play","\"$mpfiresettings{'FILE'}\""); print $mpfiresettings{'FILE'};} if ( $mpfiresettings{'ACTION'} eq "x" ){system("/usr/local/bin/mpfirectrl stop");} if ( $mpfiresettings{'ACTION'} eq "||" ){system("/usr/local/bin/mpfirectrl pause");} if ( $mpfiresettings{'ACTION'} eq "|>" ){system("/usr/local/bin/mpfirectrl resume");} @@ -57,6 +57,39 @@ if ( $mpfiresettings{'ACTION'} eq "+" ){system("/usr/local/bin/mpfirectrl volup if ( $mpfiresettings{'ACTION'} eq "-" ){system("/usr/local/bin/mpfirectrl voldown 5");} if ( $mpfiresettings{'ACTION'} eq "++" ){system("/usr/local/bin/mpfirectrl volup 10");} if ( $mpfiresettings{'ACTION'} eq "--" ){system("/usr/local/bin/mpfirectrl voldown 10");} +if ( $mpfiresettings{'ACTION'} eq "playlist" ){system("/usr/local/bin/mpfirectrl playall");} +if ( $mpfiresettings{'ACTION'} eq "playalbum" ) +{ +my @temp = ""; +my @album = split(/\|/,$mpfiresettings{'album'}); +my %hash = map{ $_, 1 }@album; + +foreach (@songdb){ + my @song = split(/\|/,$_); + chomp($song[0]); + push(@temp,$song[0]."\n") if exists $hash{$song[4]}; + } +open(DATEI, ">${General::swroot}/mpfire/playlist") || die "Could not add playlist"; +print DATEI @temp; +close(DATEI); +system("/usr/local/bin/mpfirectrl playall"); +} +if ( $mpfiresettings{'ACTION'} eq "playartist" ) +{ +my @temp = ""; +my @artist = split(/\|/,$mpfiresettings{'artist'}); +my %hash = map{ $_, 1 }@artist; + +foreach (@songdb){ + my @song = split(/\|/,$_); + chomp($song[0]); + push(@temp,$song[0]."\n") if exists $hash{$song[1]}; + } +open(DATEI, ">${General::swroot}/mpfire/playlist") || die "Could not add playlist"; +print DATEI @temp; +close(DATEI); +system("/usr/local/bin/mpfirectrl playall"); +} if ( $mpfiresettings{'ACTION'} eq "playall" ) { my @temp = ""; @@ -103,7 +136,7 @@ END &Header::closebox(); &Header::openbox('100%', 'center', $Lang::tr{'mpfire controls'}); -print "
"; +print "
"; print < @@ -126,12 +159,52 @@ END ; &Header::closebox(); +&Header::openbox('100%', 'center', $Lang::tr{'quick playlist'}); + +my @artist; +my @album; +foreach (@songdb){ + my @song = split(/\|/,$_); + push(@artist,$song[1]);push(@album,$song[4]);} + my %hash = map{ $_, 1 }@artist; + @artist = sort keys %hash; + my %hash = map{ $_, 1 }@album; + @album = sort keys %hash; +print < + + +
+
+ + +
+
+ + +
+END +; +&Header::closebox(); + if ( $mpfiresettings{'SHOWLIST'} eq "on" ){ &Header::openbox('100%', 'center', $Lang::tr{'mpfire songs'}); print < + @@ -150,7 +223,7 @@ foreach (@songdb){ if ($lines % 2) {print "";} else {print "";} $song[0]=~s/\/\//\//g; print <
+
@@ -170,5 +243,26 @@ print "
$Lang::tr{'Existing Files'}
$Lang::tr{'artist'}
$Lang::tr{'title'}
$song[1]
$song[2]
$song[3] $song[4]
"; &Header::closebox(); } +&Header::openbox('100%', 'center', $Lang::tr{'mpfire playlist'}); + +; + +open(DATEI, "<${General::swroot}/mpfire/playlist") || die "Could not open playlist"; +my @playlist = ; +close(DATEI); + +print < +$Lang::tr{'current playlist'} +
+
+ + +
+ +END +; +&Header::closebox(); + &Header::closebigbox(); &Header::closepage(); diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index acd51cf438..0408248293 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -23,6 +23,7 @@ 'MTU' => 'MTU Size', 'Number of IPs for the pie chart' => 'Anzahl der angezeigten IPs im Diagramm', 'Number of Ports for the pie chart' => 'Anzahl der angezeigten Ports im Diagramm', +'OVPN' => 'OpenVPN', 'OpenVPN' => 'OpenVPN', 'Ping' => 'Ping ', 'Remote IP' => 'Entfernte IP / Hostname (DynDNS)', @@ -35,6 +36,7 @@ 'a ca certificate with this name already exists' => 'Ein CA-Zertifikat mit diesem Namen existiert bereits.', 'a connection with this common name already exists' => 'Eine Verbindung mit diesem gemeinsamen Namen existiert bereits.', 'a connection with this name already exists' => 'Eine Verbindung mit diesem Namen existiert bereits.', +'abort' => 'Abbrechen', 'access allowed' => 'Zugriff erlaubt von:', 'access refused with this oinkcode' => 'Zugriff mit diesem Oink Code verweigert', 'accounting' => 'Benutzerverwaltung', @@ -286,6 +288,7 @@ 'advproxy web browser' => 'Web-Browser', 'advproxy wednesday' => 'Mit', 'again' => 'Wiederholung:', +'aktiv' => 'aktiv', 'album' => 'Album', 'alcatelusb help' => 'Um das Speedtouch USB Modem zu verwenden, müssen Sie die Firmware in Ihre IPFire Box hochladen. Bitte laden sie das Embedded Firmware Paket von speedtouch.com herunter, entpacken es und laden dann die passende Datei für Ihr Modem hoch: KQD6_3.xxx für Revisionsnummern <4 oder ZZZL_3.xxx für Rev.=4 mittels des unten angegebenen Formulars.', 'alcatelusb upload' => 'Speedtouch USB Firmware hochladen', @@ -484,6 +487,7 @@ 'current hosts' => 'Aktuelle Hosts:', 'current media' => 'Aktuelles Medium', 'current ovpn' => 'Aktive OVPN-Verbindung', +'current playlist' => 'Aktuelle Playlist', 'current profile' => 'Aktuelles Profil:', 'current rules' => 'Aktuelle Regeln:', 'custom networks' => 'Benutzerdefinierte Netzwerke', @@ -1026,6 +1030,7 @@ 'mounted on' => 'Mounted auf', 'mpfire' => 'Media Player für IPFire', 'mpfire controls' => 'MPFire Steuerung', +'mpfire playlist' => 'MPFire Playlist', 'mpfire scanning' => 'Nach neuen Dateien suchen', 'mpfire songs' => 'MPFire Songliste', 'my new share' => 'Meine neue Freigabe', @@ -1223,6 +1228,7 @@ 'pulse' => 'Puls', 'pulse dial' => 'Pulswahl:', 'qos graphs' => 'Qos Diagramme', +'quick playlist' => 'Quick Playlist', 'ram' => 'RAM-Speicher', 'read list' => 'Liste der Leseberechtigten', 'read sectors' => 'Sektoren lesen', @@ -1239,6 +1245,7 @@ 'refresh update list' => 'Aktualisiere Update-Liste', 'registered user rules' => 'Sourcefire VRT Regeln für registrierte Benutzer', 'released' => 'Freigegeben', +'reload' => 'neu laden', 'remark' => 'Anmerkung', 'remark title' => 'Anmerkung:', 'remote access' => 'Fernwartung', @@ -1559,6 +1566,7 @@ 'updxlrtr week' => 'einer Woche', 'updxlrtr weekly' => 'wöchentlich', 'updxlrtr year' => 'einem Jahr', +'upgrade' => 'upgrade', 'uplink speed' => 'Uplink-Geschwindigkeit (kBit/sek)', 'upload' => 'Hochladen', 'upload a certificate' => 'Ein Zertifikat hochladen:', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index ac299b79f3..e92d9015d2 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -23,6 +23,7 @@ 'MTU' => 'MTU Size:', 'Number of IPs for the pie chart' => 'Number of IPs for the pie chart', 'Number of Ports for the pie chart' => 'Number of ports for the pie chart', +'OVPN' => 'OpenVPN', 'OpenVPN' => 'OpenVPN', 'Ping' => 'Ping :', 'Remote IP' => 'Remote IP / Hostname (DynDNS):', @@ -35,6 +36,7 @@ 'a ca certificate with this name already exists' => 'A CA Certificate with this name already exists.', 'a connection with this common name already exists' => 'A connection with this common name already exists.', 'a connection with this name already exists' => 'A connection with this name already exists.', +'abort' => 'abort', 'access allowed' => 'Access allowed from:', 'access refused with this oinkcode' => 'Access refused with this Oink Code', 'accounting' => 'Accounting', @@ -287,6 +289,7 @@ 'advproxy web browser' => 'Web browser', 'advproxy wednesday' => 'Wed', 'again' => 'Again:', +'aktiv' => 'active', 'album' => 'Album', 'alcatelusb help' => 'To utilise the Speedtouch 330 or Speedtouch USB modem you must upload the firmware to your IPFire box. Please download the Embedded Firmware package for SpeedTouch 330 from speedtouch.com, unzip and then upload the appropriate file for your modem : KQD6_3.xxx when Rev<4 or ZZZL_3.xxx for Rev=4 using the form below.', 'alcatelusb upload' => 'Upload Speedtouch USB Firmware', @@ -500,6 +503,7 @@ 'current hosts' => 'Current hosts:', 'current media' => 'Current media', 'current ovpn' => 'Active OVPN-Connection:', +'current playlist' => 'Current Playlist', 'current profile' => 'Current profile:', 'current rules' => 'Current rules:', 'custom networks' => 'Custom networks', @@ -1038,6 +1042,7 @@ 'mounted on' => 'Mounted on', 'mpfire' => 'Media Player for IPFire', 'mpfire controls' => 'MPFire Control', +'mpfire playlist' => 'MPFire Playlist', 'mpfire scanning' => 'Scan for new files', 'mpfire songs' => 'MPFire songlist', 'my new share' => 'My new share', @@ -1233,6 +1238,7 @@ 'pulse dial' => 'Pulse dial:', 'qos graphs' => 'Qos Graphs', 'quick control' => 'Quick Control', +'quick playlist' => 'Quick Playlist', 'ram' => 'RAM', 'read list' => 'list with readonly hosts', 'read sectors' => 'Read Sectors', @@ -1249,6 +1255,7 @@ 'refresh update list' => 'Refresh update list', 'registered user rules' => 'Sourcefire VRT rules for registered users', 'released' => 'Released', +'reload' => 'reload', 'remark' => 'Remark', 'remark title' => 'Remark:', 'remote access' => 'Remote access', @@ -1563,6 +1570,7 @@ 'updxlrtr week' => 'one week', 'updxlrtr weekly' => 'weekly', 'updxlrtr year' => 'one year', +'upgrade' => 'upgrade', 'uplink speed' => 'Uplink speed (kbit/sec)', 'upload' => 'Upload', 'upload a certificate' => 'Upload a certificate:', -- 2.39.2