X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=index.php;h=704dc91d92c588a45f082f101863df8992807c04;hb=HEAD;hp=1e7a509fa8c4fa30e04a1a5e3d30cbfb30022774;hpb=a74cdde6f41804cffbc62f2a3112917f26e66b6e;p=mirrors%2FJukeBox.git diff --git a/index.php b/index.php index 1e7a509..704dc91 100755 --- a/index.php +++ b/index.php @@ -1,8 +1,9 @@ F/'. 'S'); } - echo(' '.unxss(str_replace('_', ' ', $item)).''.$filesize." MiB \n"); + echo(' '.unxss(str_replace('-',' - ',str_replace('_', ' ', $item))). + ''.$filesize." MiB \n"); +} + +function render_dir_line($current_dir, $item, $i) { + $parclass=($i%2?'even':'odd'); $parcolor=($i%2?'lightblue':'white'); + $temp=str_replace('%2F', '/', rawurlencode($current_dir)).rawurlencode($item); + echo("". + ''.$i.'P/'. + 'R'); + if($GLOBALS['useflash']) echo('/F'); + echo('[DIR] '.unxss(str_replace('-',' - ',str_replace('_', ' ', $item))). + "\n"); } function render_tr_playframe_show() { if($GLOBALS['flash_player_frame'] == 'playframe-show' && $GLOBALS['useflash']) { ?> -S - +S + '.$GLOBALS['title'].' on GIThub :-)Fork me on GitHub' ); echo(''.$quotes[rand(0,sizeof($quotes)-1)]."\n"); @@ -265,7 +282,7 @@ function flash_mp3_player() { You need Adobe Flash enabled browser to play records directly in website. + > <?php echo "DJ MODE @ $title"; ?> -
Music player (click 'F' link next to the song name to start, 'S' to stop...)
+
Music player (click 'F' link next to the song name to start, 'S' to stop...)
- + + -
+
< BACK - | HOME () + | HOME () + | DJ | ABOUT/HELP | LOGOUT
@@ -363,11 +384,13 @@ if(!isset($_GET['search'])) {
- +
- @@ -382,7 +405,7 @@ if(!isset($_GET['search'])) { ?> - +   @@ -409,8 +432,8 @@ if(!($searchfp = fopen($search_cache, 'r'))) $i = 0; echo(''); render_tr_playframe_show(); -echo(''); while(!feof($searchfp)) { @@ -440,7 +463,8 @@ if($GLOBALS['useflash']) echo('/F'); ?> - + 1) { if(is_file($dir.$item)) { - if($sort > 1) { - $i--; - $items[] = $item; - } else { - render_file_line($dir, $item, $music_dir_url, $i, filesize($dir.$item)); - } + $i--; + $itemsf[] = $item; } if(is_dir($dir.$item)) { - $temp=str_replace('%2F', '/', rawurlencode($current_dir)).rawurlencode($item); - echo("". - '\n"); + $i--; + $itemsd[] = $item; } + } else { + if(is_file($dir.$item)) { + render_file_line($dir, $item, $music_dir_url, $i, filesize($dir.$item)); + } + if(is_dir($dir.$item)) { + render_dir_line($current_dir, $item, $i); + } + } } rewinddir($dd); } + if($sort > 1) { - @sort($items); - foreach($items as $item) { + @sort($itemsf); + @sort($itemsd); + foreach($itemsd as $item) { + $i++; + render_dir_line($current_dir, $item, $i); + } + foreach($itemsf as $item) { $i++; render_file_line($dir, $item, $music_dir_url, $i, filesize($dir.$item)); }
SP'); -if($GLOBALS['useflash']) echo('/F'); +echo('
SP'); +if($GLOBALS['useflash']) echo('/F'); echo('Search: '.unxss($_GET['search']).'
^ [DIR] .. ()
^ [DIR] .. +()
'.$i.'P/'. - 'R'); - if($GLOBALS['useflash']) echo('/F'); - echo('[DIR] '.unxss(str_replace('_', ' ', $item))."