]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
MPFire erweitert
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 17 Jul 2007 19:39:18 +0000 (19:39 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 17 Jul 2007 19:39:18 +0000 (19:39 +0000)
Samba etwas angepasst
Pakfire ueberfluessigen Text entfernt
Tripwire Policy angepasst

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@702 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

14 files changed:
config/backup/include
config/cfgroot/backup-exclude [deleted file]
config/cfgroot/backup-exclude.hardware [deleted file]
config/cfgroot/backup-include [deleted file]
config/mpfire/mpfire.pl
config/mpfire/webradio
config/rootfiles/common/configroot
config/rootfiles/packages/mpfire
config/tripwire/twpol.txt
html/cgi-bin/mpfire.cgi
html/cgi-bin/pakfire.cgi
html/cgi-bin/samba.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index 17588a2697ebabdbd4eb580e6458745f207189d1..67fd29e9a858707d62b6e393fadb660a67972613 100644 (file)
@@ -5,4 +5,16 @@
 /etc/passwd
 /etc/shadow
 /etc/group
-
+/etc/hosts
+/etc/localtime
+/etc/httpd/server.crt
+/etc/httpd/server.csr
+/etc/httpd/server.key
+/etc/rc.d/rc.local
+/etc/rc.d/rc.firewall.local
+/etc/ssh/ssh_host_dsa_key
+/etc/ssh/ssh_host_dsa_key.pub
+/etc/ssh/ssh_host_key
+/etc/ssh/ssh_host_key.pub
+/etc/ssh/ssh_host_rsa_key
+/etc/ssh/ssh_host_rsa_key.pub
diff --git a/config/cfgroot/backup-exclude b/config/cfgroot/backup-exclude
deleted file mode 100644 (file)
index 19f2828..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-var/ipfire/backup/*.system
-var/ipfire/backup/backup.key
-var/ipfire/backup/sets
-var/ipfire/countries.pl
-var/ipfire/dhcpc
-var/ipfire/eciadsl/modems.db
-var/ipfire/eciadsl/firmware00.bin
-var/ipfire/header.pl
-var/ipfire/general-functions.pl
-var/ipfire/lang.pl
-var/ipfire/key
-var/ipfire/langs
-var/ipfire/patches
-var/ipfire/ppp/fake-resolv.conf
-var/ipfire/red
-var/ipfire/time/counter
-var/ipfire/firewall/protocols.pl
-var/ipfire/firewall/defaultservices
-var/ipfire/firewall/icmptypes
-var/ipfire/addon-lang
-var/ipfire/net-traffic
\ No newline at end of file
diff --git a/config/cfgroot/backup-exclude.hardware b/config/cfgroot/backup-exclude.hardware
deleted file mode 100644 (file)
index 5c0360a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var/ipfire/ethernet/settings
diff --git a/config/cfgroot/backup-include b/config/cfgroot/backup-include
deleted file mode 100644 (file)
index ab19ddc..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/etc/passwd
-/etc/shadow
-/etc/hosts
-/etc/localtime
-/etc/httpd/server.crt
-/etc/httpd/server.csr
-/etc/httpd/server.key
-/etc/rc.d/rc.local
-/etc/rc.d/rc.firewall.local
-/etc/ssh/ssh_host_dsa_key
-/etc/ssh/ssh_host_dsa_key.pub
-/etc/ssh/ssh_host_key
-/etc/ssh/ssh_host_key.pub
-/etc/ssh/ssh_host_rsa_key
-/etc/ssh/ssh_host_rsa_key.pub
-/var/ipfire/
index 17006db3bbc09bcf142e8e4eef7f0cea8cfff95c..b0de0e1f1365379abfe692a506f26f958e50e0fd 100644 (file)
@@ -9,7 +9,7 @@ require "${General::swroot}/header.pl";
 
 my $filename = "";
 my %songs = "";
-my $debug = 1;
+my $debug = 0;
 
 if ($ARGV[0] eq 'scan') {
 my $command = "find ";
@@ -36,16 +36,24 @@ if ($ARGV[0] eq 'getdb') {
   print %songs;
   }
 elsif ($ARGV[0] eq 'play') {
+  &checkplaylist();
   if ($debug){print "Yes we are called and we will play $ARGV[1]\n";}
   system("/usr/bin/mpg123 -b 1024 --aggressive -q \"$ARGV[1]\" 2>/dev/null >/dev/null &");
   }
 elsif ($ARGV[0] eq 'stop') {
-  my $PID =  `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{  print \$2 }'`;
-  if ( $PID ne "" ){
-    if ($debug){print "Stopping $PID\n";}
-    system("kill -KILL $PID");
-    }
-  else {&stopweb();}
+  my $PID = `ps -ef \| grep wget \| grep EXTM3U \| head -1 \| grep -v "sh -c" \| awk '{  print \$2 }'`;
+  if ( $PID ne '' ){
+   if ($debug){print "Stopping $PID\n";}
+   system("kill -KILL $PID");
+   my $PID =  `ps -ef \| grep "mpg123 -b 1024 --aggressive -Zq -" \| head -1 \| grep -v "sh -c" \| awk '{  print \$2 }'`;
+   if ($debug){print "Killing Process $PID\n";}
+   system("kill -KILL $PID");
+  }
+  else{
+   my $PID =  `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{  print \$2 }'`;
+   if ($debug){print "Stopping $PID\n";}
+   system("kill -KILL $PID");
+  }
   }
 elsif ($ARGV[0] eq 'volup') {
   if ($debug){print "Increasing Volume\n";}
@@ -56,16 +64,17 @@ elsif ($ARGV[0] eq 'voldown') {
   system("/usr/bin/amixer set Master $ARGV[1]%- 2>/dev/null >/dev/null");
   }
 elsif ($ARGV[0] eq 'playall') {
+  &checkplaylist();
   if ($debug){print "Playing everything\n";}
   system("/usr/bin/mpg123 -b 1024 --aggressive -Zq@ /var/ipfire/mpfire/playlist 2>/dev/null >/dev/null &"); 
   }
 elsif ($ARGV[0] eq 'pause') {
-  my $PID =  `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{  print \$2 }'`;
+  my $PID =  `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{  print \$2 }'`;
   if ($debug){print "Pausing Process $PID\n";}
   system("kill -STOP $PID");
   }
 elsif ($ARGV[0] eq 'resume') {
-  my $PID =  `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{  print \$2 }'`;
+  my $PID =  `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{  print \$2 }'`;
   if ($debug){print "Resuming Process $PID\n";}
   system("kill -CONT $PID");
   }
@@ -80,35 +89,30 @@ elsif ($ARGV[0] eq 'song') {
   my $i = @song;
   if ( $i == 0 ){
   my $song = `ps -ef \| grep wget \| grep EXTM3U \| grep -v "sh -c"`;
-  my @song = split(/\//,$song);
-  print $song[2];
+  my @song = split(/,/,$song);
+  print $song[1];
   }
   else { print $song[$i-1];}
   }
 elsif ($ARGV[0] eq 'playweb') {
   &General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
-  if ($debug){print "Playing webstream\n";}
+
                        if ($proxysettings{'UPSTREAM_PROXY'}) {
                          if ($proxysettings{'UPSTREAM_USER'}) {
-          system("wget -qO - `wget -qO -  $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - -p $proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@$proxysettings{'UPSTREAM_PROXY'} 2>/dev/null >/dev/null &");
+                           &checkm3uproxy();
+                           if ($debug){print "Playing webstream\n";}
+          system("wget -qO - `wget -qO - http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@$proxysettings{'UPSTREAM_PROXY'}$ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &");
           }
-          else {          system("wget -qO - `wget -qO -  $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - -p $proxysettings{'UPSTREAM_PROXY'} 2>/dev/null >/dev/null &");} 
+          else {
+          &checkm3uproxyuser();
+          if ($debug){print "Playing webstream\n";}
+          system("wget -qO - `wget -qO - http://$proxysettings{'UPSTREAM_PROXY'}$ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &");} 
                        } else {
-        system("wget -qO - `wget -qO -  $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &"); 
+        &checkm3u();
+        if ($debug){print "Playing webstream\n";}
+        system("wget -qO - `wget -qO - http://$ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &");
                        }
   }
-elsif ($ARGV[0] eq 'stopweb') {
-  &stopweb();
-  }
-
-sub stopweb(){
-  my $PID =  `ps -ef | grep wget | grep EXTM3U | head -1 | awk '{  print \$2 }'`;
-  if ($debug){print "Stopping $PID\n";}
-  system("kill -KILL $PID");
-  my $PID =  `ps -ef | grep "mpg123 -b 1024 --aggressive -Zq -" | head -1 | awk '{  print \$2 }'`;
-  if ($debug){print "Killing Process $PID\n";}
-  system("kill -KILL $PID");
-  }
 
 sub getSongInfo(){
   my $mp3 = MP3::Tag->new($filename);
@@ -127,3 +131,24 @@ sub getExistingSongs(){
     $songs{$Zeile[0]} = "|".$Zeile[1]."|".$Zeile[2]."|".$Zeile[3]."|".$Zeile[4]."|".$Zeile[5]."|".$Zeile[6]."|".$Zeile[7]."|".$Zeile[8]."|".$Zeile[9]."|".$Zeile[10]."|".$Zeile[11]."\n";
     }
  }
+sub checkplaylist(){
+ my $Datei = "/var/ipfire/mpfire/playlist";
+ my @Info = stat($Datei);
+ if ( $Info[7] eq '' ){print "There is no playlist";exit(1);}
+}
+
+sub checkm3u(){
+ my $Datei = system("wget -q --spider http://$ARGV[1]");
+ if ( $Datei ne '0' ){print "We are unable to get the stream";exit(1);}
+}
+
+sub checkm3uproxy(){
+ my $Datei = system("wget -q --spider http://$ARGV[1]");
+ if ( $Datei ne '0' ){print "We are unable to get the stream";exit(1);}
+}
+
+sub checkm3uproxyuser(){
+ my $Datei = system("wget -q --spider http://$ARGV[1]");
+ if ( $Datei ne '0' ){print "We are unable to get the stream";exit(1);}
+}
index b7bc5aa1f62db0230677601a6de5146def2a13f5..ea84da9438737a46ea6100632eba53c47536dc9d 100644 (file)
@@ -1,5 +1,5 @@
-http://www.89.0rtl.de/webradio/rtl-high.m3u|89.0 RTL Hitradio
-http://metafiles.gl-systemhaus.de/wdr/channel_einslive.m3u|Einslive
-http://www.deepinside.co.uk/ecoute-deepinside-wmp.m3u|Deepinside Radio European
-http://www.bigfm.de/webradio/bigfm-high.m3u|BigFM
-http://www.brocken.de/webradio/brocken-high.m3u|Hit-Radio Brocken
+www.89.0rtl.de/webradio/rtl-high.m3u|89.0 RTL Hitradio
+metafiles.gl-systemhaus.de/wdr/channel_einslive.m3u|Einslive
+www.deepinside.co.uk/ecoute-deepinside-wmp.m3u|Deepinside Radio European
+www.bigfm.de/webradio/bigfm-high.m3u|BigFM
+www.brocken.de/webradio/brocken-high.m3u|Hit-Radio Brocken
index 3ab189bf1875fc04b0dfb5ad8233ecb11b809f6f..57884c6af511b9e7de3b11e3b35fb5c3b94a0ffa 100644 (file)
@@ -4,11 +4,6 @@ var/ipfire/addon-lang
 var/ipfire/auth
 #var/ipfire/auth/users
 var/ipfire/backup
-#var/ipfire/backup/exclude.hardware
-#var/ipfire/backup/exclude.system
-#var/ipfire/backup/exclude.user
-#var/ipfire/backup/include.system
-#var/ipfire/backup/include.user
 var/ipfire/ca
 var/ipfire/certs
 #var/ipfire/certs/index.txt
index 0f554dfe931eda2ba7ab2c5a3eb57f142db9d10a..11be824511ceda30507ed52c7b8d98982d88e9c5 100644 (file)
@@ -8,8 +8,8 @@ var/ipfire/mpfire/db
 var/ipfire/mpfire/db/songs.db
 var/ipfire/mpfire/playlist
 var/ipfire/mpfire/settings
-usr/lib/perl5/site_perl/5.8.8/MP3/Info.pm
-usr/lib/perl5/site_perl/5.8.8/MP3/Tag.pm
-usr/lib/perl5/site_perl/5.8.8/MP3/Tag/File.pm
-usr/lib/perl5/site_perl/5.8.8/MP3/Tag/ID3v1.pm
-usr/lib/perl5/site_perl/5.8.8/MP3/Tag/ID3v2.pm
+usr/lib/perl5/5.8.8/MP3/Info.pm
+usr/lib/perl5/5.8.8/MP3/Tag.pm
+usr/lib/perl5/5.8.8/MP3/Tag/File.pm
+usr/lib/perl5/5.8.8/MP3/Tag/ID3v1.pm
+usr/lib/perl5/5.8.8/MP3/Tag/ID3v2.pm
index 01e6c1ed23f0a7624592a31e1d0347c90f3ce612..96d5bd9d87208661b240bc0be7fd0b2079f8feb2 100644 (file)
@@ -27,10 +27,10 @@ SIG_HI        = 100 ;                # Critical files that are significant point
   $(TWDB)                          -> $(SEC_CRIT) ;
   $(TWPOL)/tw.pol                  -> $(SEC_CRIT) -i ;
   $(TWPOL)/tw.cfg                  -> $(SEC_CRIT) -i ;
-  $(TWLKEY)/local.key  -> $(SEC_CRIT) ;
+  $(TWLKEY)/local.key              -> $(SEC_CRIT) ;
   $(TWSKEY)/site.key               -> $(SEC_CRIT) ;
 
-  /bin                            -> $(SEC_CRIT) ;
+  /bin                                  -> $(SEC_CRIT) ;
   /boot                            -> $(SEC_CRIT) ;
   /etc                             -> $(SEC_CRIT) ;
   /lib                             -> $(SEC_CRIT) ;
@@ -39,6 +39,7 @@ SIG_HI        = 100 ;                # Critical files that are significant point
   /sbin                            -> $(SEC_CRIT) ;
   /usr                             -> $(SEC_CRIT) ;
   !/usr/src                                       ;
+  !usr/share/clamav                               ;
   /etc/mtab                        -> $(SEC_CONFIG) -i ; # Inode number changes on any mount/unmount
 
   #don't scan the individual reports
@@ -70,5 +71,5 @@ SIG_HI        = 100 ;                # Critical files that are significant point
      /proc/mounts                 -> $(Device) ;
      /proc/filesystems            -> $(Device) ;
      /proc/misc                   -> $(Device) ;
-     /var/log                     -> $(SEC_CONFIG) ;
-}
\ No newline at end of file
+     /var/log                     -> $(SEC_LOG) ;
+}
index c294b636924b6a5b4f26d5d0096840c0f290cfb1..da772663c26d4bfa4ad5f7d2fa5462d6d32a50cc 100644 (file)
@@ -19,7 +19,7 @@ my %color = ();
 my %mainsettings = ();
 my %mpfiresettings = ();
 my %checked = ();
-my $message = "";
+my $message = '0';
 my $errormessage = "";
 
 open(DATEI, "<${General::swroot}/mpfire/db/songs.db") || die "No Database found";
@@ -34,6 +34,8 @@ close(DATEI);
 
 sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;' />" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'pagerefresh'}</font></center>";&Header::closebox();}
 
+$mpfiresettings{'PAGE'} = "1";
+
 &Header::getcgihash(\%mpfiresettings);
 &Header::openpage($Lang::tr{'mpfire'}, 1, "<meta http-equiv='refresh' content='120' />");
 &Header::openbigbox('100%', 'left', '', $errormessage);
@@ -43,23 +45,28 @@ sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' cont
 
 if ( $mpfiresettings{'ACTION'} eq "scan" )
 {
-delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresettings{'y'};
+delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresettings{'y'};delete $mpfiresettings{'PAGE'};
 &General::writehash("${General::swroot}/mpfire/settings", \%mpfiresettings);
-system("/usr/local/bin/mpfirectrl scan $mpfiresettings{'SCANDIR'} $mpfiresettings{'SCANDIRDEPS'}");
+$message=system("/usr/local/bin/mpfirectrl scan $mpfiresettings{'SCANDIR'} $mpfiresettings{'SCANDIRDEPS'}");
 refreshpage();
 }
-elsif ( $mpfiresettings{'ACTION'} eq ">" ){system("/usr/local/bin/mpfirectrl","play","\"$mpfiresettings{'FILE'}\"");}
-elsif ( $mpfiresettings{'ACTION'} eq "x" ){system("/usr/local/bin/mpfirectrl stop");}
-elsif ( $mpfiresettings{'ACTION'} eq "||" ){system("/usr/local/bin/mpfirectrl pause");}
-elsif ( $mpfiresettings{'ACTION'} eq "|>" ){system("/usr/local/bin/mpfirectrl resume");}
-elsif ( $mpfiresettings{'ACTION'} eq ">>" ){system("/usr/local/bin/mpfirectrl next");}
-elsif ( $mpfiresettings{'ACTION'} eq "stopweb" ){system("/usr/local/bin/mpfirectrl stopweb");}
-elsif ( $mpfiresettings{'ACTION'} eq "playweb" ){system("/usr/local/bin/mpfirectrl","playweb","\"$mpfiresettings{'FILE'}\"");}
-elsif ( $mpfiresettings{'ACTION'} eq "+" ){system("/usr/local/bin/mpfirectrl volup 5");}
-elsif ( $mpfiresettings{'ACTION'} eq "-" ){system("/usr/local/bin/mpfirectrl voldown 5");}
-elsif ( $mpfiresettings{'ACTION'} eq "++" ){system("/usr/local/bin/mpfirectrl volup 10");}
-elsif ( $mpfiresettings{'ACTION'} eq "--" ){system("/usr/local/bin/mpfirectrl voldown 10");}
-elsif ( $mpfiresettings{'ACTION'} eq "playlist" ){system("/usr/local/bin/mpfirectrl playall");}
+elsif ( $mpfiresettings{'ACTION'} eq ">" ){$message=system("/usr/local/bin/mpfirectrl","play","\"$mpfiresettings{'FILE'}\"");}
+elsif ( $mpfiresettings{'ACTION'} eq "x" ){$message=system("/usr/local/bin/mpfirectrl stop");}
+elsif ( $mpfiresettings{'ACTION'} eq "||" ){$message=system("/usr/local/bin/mpfirectrl pause");}
+elsif ( $mpfiresettings{'ACTION'} eq "|>" ){$message=system("/usr/local/bin/mpfirectrl resume");}
+elsif ( $mpfiresettings{'ACTION'} eq ">>" ){$message=system("/usr/local/bin/mpfirectrl next");}
+elsif ( $mpfiresettings{'ACTION'} eq "playweb" ){$message=system("/usr/local/bin/mpfirectrl","playweb","\"$mpfiresettings{'FILE'}\"");}
+elsif ( $mpfiresettings{'ACTION'} eq "+" ){$message=system("/usr/local/bin/mpfirectrl volup 5");}
+elsif ( $mpfiresettings{'ACTION'} eq "-" ){$message=system("/usr/local/bin/mpfirectrl voldown 5");}
+elsif ( $mpfiresettings{'ACTION'} eq "++" ){$message=system("/usr/local/bin/mpfirectrl volup 10");}
+elsif ( $mpfiresettings{'ACTION'} eq "--" ){$message=system("/usr/local/bin/mpfirectrl voldown 10");}
+elsif ( $mpfiresettings{'ACTION'} eq "playlist" ){$message=system("/usr/local/bin/mpfirectrl playall");}
+elsif ( $mpfiresettings{'ACTION'} eq "emptyplaylist" ){$message=system("unlink ${General::swroot}/mpfire/playlist && touch ${General::swroot}/mpfire/playlist");}
+elsif ( $mpfiresettings{'ACTION'} eq "addtoplaylist" ){
+open(DATEI, ">>${General::swroot}/mpfire/playlist") || die "Could not add playlist";
+print DATEI $mpfiresettings{'FILE'}."\n";
+close(DATEI);
+}
 elsif ( $mpfiresettings{'ACTION'} eq "playalbum" )
 {
 my @temp = "";
@@ -74,7 +81,7 @@ foreach (@songdb){
 open(DATEI, ">${General::swroot}/mpfire/playlist") || die "Could not add playlist";
 print DATEI @temp;
 close(DATEI);
-system("/usr/local/bin/mpfirectrl playall");
+$message=system("/usr/local/bin/mpfirectrl playall");
 }
 elsif ( $mpfiresettings{'ACTION'} eq "playartist" )
 {
@@ -90,7 +97,7 @@ foreach (@songdb){
 open(DATEI, ">${General::swroot}/mpfire/playlist") || die "Could not add playlist";
 print DATEI @temp;
 close(DATEI);
-system("/usr/local/bin/mpfirectrl playall");
+$message=system("/usr/local/bin/mpfirectrl playall");
 }
 elsif ( $mpfiresettings{'ACTION'} eq "playall" )
 {
@@ -103,7 +110,7 @@ foreach (@songdb){
 open(DATEI, ">${General::swroot}/mpfire/playlist") || die "Could not add playlist";
 print DATEI @temp;
 close(DATEI);
-system("/usr/local/bin/mpfirectrl playall");
+$message=system("/usr/local/bin/mpfirectrl playall");
 }
 elsif ( $mpfiresettings{'SHOWLIST'} ){delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresettings{'y'};&General::writehash("${General::swroot}/mpfire/settings", \%mpfiresettings);}
 
@@ -118,7 +125,8 @@ $mpfiresettings{'SHOWLIST'} = "off";
 ############################################################################################################################
 ########################################### rekursiv nach neuen Mp3s Scannen ##############################################ä
 
-if ( $message ne "" )  {       print "<font color='red'>$message</font>"; }
+if ( $message ne '0' ) {       print "<font color='red'>An Error occured while launching the command</font>"; }
+elsif ( $message ne "" && $message ne '0' )    {       print "<font color='red'>$message</font>"; }
 
 &Header::openbox('100%', 'center', $Lang::tr{'mpfire scanning'});
 
@@ -168,6 +176,7 @@ END
 ;
 &Header::closebox();
 
+if ( $#songdb ne '0' ){
 &Header::openbox('100%', 'center', $Lang::tr{'quick playlist'});
 
 my @artist;
@@ -208,6 +217,8 @@ print <<END
 END
 ;
 &Header::closebox();
+}
+
 
 if ( $mpfiresettings{'SHOWLIST'} eq "on" ){
 
@@ -216,6 +227,16 @@ print <<END
 
 <table width='95%' cellspacing='5'>
 <tr bgcolor='$color{'color20'}'><td colspan='9' align='left'><b>$Lang::tr{'Existing Files'}</b></td></tr>
+<tr><td align='center' colspan='9'><br/>$Lang::tr{'Pages'}<br/><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='submit' name='PAGE' value='all' /><br/>
+END
+;
+my $pages =(int($#songdb/100)+1);
+for(my $i = 1; $i <= $pages; $i++) {
+print "<input type='submit' name='PAGE' value='$i' />";
+if (!($i % 205)){print"<br/>";}
+}
+print <<END
+</form></td></tr>
 <tr><td align='center'></td>
     <td align='center'><b>$Lang::tr{'artist'}<br/>$Lang::tr{'title'}</b></td>
     <td align='center'><b>$Lang::tr{'number'}</b></td>
@@ -226,14 +247,25 @@ print <<END
     <td align='center'><b>$Lang::tr{'mode'}</b></td></tr>
 END
 ;
-my $lines = 0;
+my $lines=0;my $i=0;my $begin;my $end;
+if ( $mpfiresettings{'PAGE'} eq 'all' ){
+  $begin=0;
+  $end=$#songdb;
+}
+else{
+  $begin=(($mpfiresettings{'PAGE'}-1) * 100);
+  $end=(($mpfiresettings{'PAGE'} * 100)-1);
+}
 foreach (@songdb){
+  if (!($i >= $begin && $i <= $end)){
+  #print $begin."->".$i."<-".$end."\n";
+  $i++;next;}
   my @song = split(/\|/,$_);
   
   if ($lines % 2) {print "<tr bgcolor='$color{'color20'}'>";} else {print "<tr bgcolor='$color{'color22'}'>";}
   $song[0]=~s/\/\//\//g;   
   print <<END
-  <td align='center' style="white-space:nowrap;"><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='>' /><input type='hidden' name='FILE' value="$song[0]" /><input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' /></form></td>
+  <td align='center' style="white-space:nowrap;"><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='addtoplaylist' /><input type='hidden' name='FILE' value="$song[0]" /><input type='image' alt='$Lang::tr{'add'}' title='$Lang::tr{'add'}' src='/images/list-add.png' /></form><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='>' /><input type='hidden' name='FILE' value="$song[0]" /><input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' /></form></td>
   <td align='center'>$song[1]<br/>$song[2]</td>
   <td align='center'>$song[3]</td>
   <td align='center'>$song[4]</td>
@@ -247,9 +279,10 @@ END
     elsif ( $song[11] eq "2\n" ) {print "<td align='center'>Dual<br/>Channel</td></tr>"; }
     elsif ( $song[11] eq "3\n" ) {print "<td align='center'>Single<br/>Channel</td></tr>"; }
     else {print "<td align='center'></td></tr>"; }
-  $lines++
+  $lines++;
+  $i++;
   }
-print "</table></form>";
+print "</table>";
 &Header::closebox();
 }
 
@@ -268,17 +301,25 @@ foreach (@songdb){
 
 print <<END
 <table width='95%' cellspacing='0'>
-<tr bgcolor='$color{'color20'}'><td colspan='9' align='left'><b>$Lang::tr{'current playlist'}</b></td></tr>
-<tr><td align='center'><textarea cols='120' rows='10' name='playlist' style='font-size:11px' readonly='readonly' >
+<tr bgcolor='$color{'color20'}'><td colspan='2' align='left'><b>$Lang::tr{'current playlist'}</b></td></tr>
+<tr><td align='center' colspan='2' ><textarea cols='100' rows='10' name='playlist' style='font-size:11px;width:650px;' readonly='readonly'>
 END
 ;
 foreach (@playlist){chomp($_);print $hash{$_}."\n";}
 print <<END
-</textarea><br/>
-                       <form method='post' action='$ENV{'SCRIPT_NAME'}'>
-                       <input type='hidden' name='ACTION' value='playlist' />
-                       <input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' />
-      </form></td></tr>
+</textarea></td></tr><tr>
+<td align='right'>
+      <form method='post' action='$ENV{'SCRIPT_NAME'}'>
+      <input type='hidden' name='ACTION' value='emptyplaylist' />
+      <input type='image' alt='$Lang::tr{'clear playlist'}' title='$Lang::tr{'clear playlist'}' src='/images/user-trash.png' />
+      </form>
+</td>
+<td align='left'>
+      <form method='post' action='$ENV{'SCRIPT_NAME'}'>
+      <input type='hidden' name='ACTION' value='playlist' />
+      <input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' />
+      </form>
+      </td></tr>
 </table>
 END
 ;
@@ -300,7 +341,6 @@ foreach (@webradio){
  my @stream = split(/\|/,$_);
  print <<END
  <tr><td>$stream[1]</td>
-     <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='stopweb' /><input type='image' alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/media-playback-stop.png' /></form></td>
      <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='FILE' value='$stream[0]' /><input type='hidden' name='ACTION' value='playweb' /><input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' /></form></td>
 </tr>
 END
index 464d8d8c18e4485d6c38ee8ebe00a6f3ab5647b2..93c493ea7db8646bd0fd652686a2c6d38516f5e9 100644 (file)
@@ -124,7 +124,6 @@ if ($return) {
                        <form method='post' action='$ENV{'SCRIPT_NAME'}'>
                                <input type='image' alt='$Lang::tr{'reload'}' src='/images/view-refresh.png' />
                        </form>
-               ### TO BE CONTINUED.... WE HAVE TO BEAUTIFY THIS A LITTLE BIT :D
                <tr><td colspan='2' align='left'><pre>
 END
 my @output = `tail /var/log/messages | grep pakfire`;
@@ -135,7 +134,6 @@ print <<END;
                </pre>
        </table>
 END
-       ### TO BE CONTINUED.... WE HAVE TO BEAUTIFY THIS A LITTLE BIT :D
        &Header::closebox();
        &Header::closebigbox();
        &Header::closepage();
index f7bdfa9f55fd2cd14f1e7174165a7447dcd4c1c2..a2020c182545cff65aa6400ee5fd0a7807894666 100644 (file)
@@ -304,12 +304,12 @@ END
 if ( -e "/var/ipfire/cups/enable")
        {
        if ( $sambasettings{'SECURITY'} eq 'User' && $sambasettings{'DOMAINMASTER'} eq 'true' ){system("/usr/local/bin/sambactrl smbsafeconfpdccups");refreshpage();}
-       else {system("/usr/local/bin/sambactrl smbsafeconfcups");refreshpage();}
+       else {system("/usr/local/bin/sambactrl smbsafeconfcups");}
        }
 else
        {
        if ( $sambasettings{'SECURITY'} eq 'User' && $sambasettings{'DOMAINMASTER'} eq 'true' ){system("/usr/local/bin/sambactrl smbsafeconfpdc");refreshpage();}
-       else{system("/usr/local/bin/sambactrl smbsafeconf");refreshpage();}
+       else{system("/usr/local/bin/sambactrl smbsafeconf");}
        }
 
 system("/usr/local/bin/sambactrl smbreload");refreshpage();
index b264117e1e177478fbbd6ca538b0e6475a3dc999..70b1247ba7b5aa6d45a5ec586cd318fa3ad8ff06 100644 (file)
@@ -25,6 +25,7 @@
 'Number of Ports for the pie chart' => 'Anzahl der angezeigten Ports im Diagramm',
 'OVPN' => 'OpenVPN',
 'OpenVPN' => 'OpenVPN',
+'Pages' => 'Seiten',
 'Ping' => 'Ping ',
 'Remote IP' => 'Entfernte IP / Hostname (DynDNS)',
 'Remote VPN IP' => 'VPN Subnetz (z.B. 10.0.10.0/255.255.255.0)',
 'cipher' => 'Verschlüsselung',
 'city' => 'Stadt',
 'clear cache' => 'Zwischenspeicher löschen',
+'clear playlist' => 'leere Playlist',
 'clenabled' => 'Uhrzeit dem lokalen Netzwerk zur Verfügung stellen',
 'click to disable' => 'Aktiviert (klicken, um zu deaktivieren)',
 'click to enable' => 'Deaktiviert (klicken, um zu aktivieren)',
 'vpn remote id' => 'Remote ID',
 'vpn subjectaltname' => 'Subjekt Alternativer Name',
 'vpn vhost' => 'Roadwarrior virtuelle IP (manchmal auch Inner-IP genannt)',
-'vpn watch' => 'Netz-zu-Netz VPN neu starten, wenn sich Remote-IP ändert (DynDNS). Dies hilft DPD (Dead Peer Detection)',
+'vpn watch' => 'Netz-zu-Netz VPN neu starten, wenn sich Remote-IP ändert (DynDNS).',
 'waiting to synchronize clock' => 'Bitte warten, die Uhr wird synchronisiert',
 'warn when traffic reaches' => 'Warnen wenn Traffic x % erreicht',
 'warning messages' => 'Warnhinweise',
index 077d67db923f72a9dd6fbea743ee5873d5c98d56..47958db3552a333ab5b5ea498175ff350905f5d4 100644 (file)
@@ -25,6 +25,7 @@
 'Number of Ports for the pie chart' => 'Number of ports for the pie chart',
 'OVPN' => 'OpenVPN',
 'OpenVPN' => 'OpenVPN',
+'Pages' => 'Pages',
 'Ping' => 'Ping :',
 'Remote IP' => 'Remote IP / Hostname (DynDNS):',
 'Remote VPN IP' => 'VPN Subnet (e.g. 10.0.10.0/255.255.255.0):',
 'cipher' => 'Encryption:',
 'city' => 'City',
 'clear cache' => 'Clear Cache',
+'clear playlist' => 'empty playlist',
 'clenabled' => 'Provide time to local network',
 'click to disable' => 'Enabled (click to disable)',
 'click to enable' => 'Disabled (click to enable)',
 'vpn remote id' => 'Remote ID',
 'vpn subjectaltname' => 'Subject Alt Name',
 'vpn vhost' => 'Roadwarrior virtual IP (sometimes called Inner-IP)',
-'vpn watch' => 'Restart net-to-net vpn when remote peer IP changes (dyndns), it helps DPD',
+'vpn watch' => 'Restart net-to-net vpn when remote peer IP changes (dyndns).',
 'waiting to synchronize clock' => 'Waiting to synchronize clock',
 'warn when traffic reaches' => 'Warn when traffic reaches x %',
 'warning messages' => 'Warning messages',