-$music_dir = './music'; //Local path to directory with music
+$music_dir = 'music'; //Local path to directory with music
+$base_url = preg_replace('/[^\/]*$/', '', $_SERVER['SCRIPT_NAME']); //URL of this directory (always ends with slash)
$sort = 3; //Sort? 0 = none, 1 = playlists, 2 = 1+listings; 3 = 2+search-EXPERIMENTAL! (sorting could eat lot of memory)
$access_limit = 40; //How many files could be accessed without using cache (while searching)
$sort = 3; //Sort? 0 = none, 1 = playlists, 2 = 1+listings; 3 = 2+search-EXPERIMENTAL! (sorting could eat lot of memory)
$access_limit = 40; //How many files could be accessed without using cache (while searching)
-$css_file = $bonus_dir.'/themes/default/jukebox.css'; //CSS (Design)
-$favicon_file = './favicon.png'; //favicon
+$css_file = $base_url.$bonus_dir.'/themes/default/jukebox.css'; //CSS (Design)
+$favicon_file = $base_url.'favicon.png'; //favicon
$header_file = $bonus_dir.'/header.html'; //header file
$footer_file = $bonus_dir.'/footer.html'; //footer file
$header_file = $bonus_dir.'/header.html'; //header file
$footer_file = $bonus_dir.'/footer.html'; //footer file
$flash_player_swf = $bonus_dir.'/player.swf'; //path to musicplayer
$flash_player_frame = 'playframe-show'; //FlashPlayer Target (playframe-show|playframe-hide) - usefull for compatibility with old music player
$flash_player_options = '?bg=000099&loader=000000&tracker=AAAAFF&skip=FFFFFF' //.'&leftbg=000077&rightbg=000077&righticon=999999'
$flash_player_swf = $bonus_dir.'/player.swf'; //path to musicplayer
$flash_player_frame = 'playframe-show'; //FlashPlayer Target (playframe-show|playframe-hide) - usefull for compatibility with old music player
$flash_player_options = '?bg=000099&loader=000000&tracker=AAAAFF&skip=FFFFFF' //.'&leftbg=000077&rightbg=000077&righticon=999999'
$current_dir = ereg_replace('/+', '/', '/'.$_GET['dir'].'/');
if(eregi('(/|\\\\)\\.\\.(/|\\\\)', $current_dir)) { //check for directory traversal ;)
header('Location: ?');
$current_dir = ereg_replace('/+', '/', '/'.$_GET['dir'].'/');
if(eregi('(/|\\\\)\\.\\.(/|\\\\)', $current_dir)) { //check for directory traversal ;)
header('Location: ?');
'" target="'.$GLOBALS['flash_player_frame'].'" class="icon ifplay">F</a>/'.
'<a href="?blank" target="'.$GLOBALS['flash_player_frame'].'" class="icon ifstop">S</a>');
}
'" target="'.$GLOBALS['flash_player_frame'].'" class="icon ifplay">F</a>/'.
'<a href="?blank" target="'.$GLOBALS['flash_player_frame'].'" class="icon ifstop">S</a>');
}
- echo(' </td><td class="maximize-width"><a href="'.$temp.'">'.unxss(str_replace('-',' - ',str_replace('_', ' ',
-$item))).'</a></td><td>'.$filesize." MiB </td></tr>\n");
+ echo(' </td><td class="maximize-width"><a href="'.$temp.'">'.unxss(str_replace('-',' - ',str_replace('_', ' ', $item))).
+ '</a></td><td>'.$filesize." MiB </td></tr>\n");
'<td><a href="#up">'.$i.'</a></td><td class="btntd"><a href="?download&playlist&dir='.$temp.'" class="icon iplay">P</a>/'.
'<a href="?download&recursive&playlist&dir='.$temp.'" class="icon irplay">R</a>');
if($GLOBALS['useflash']) echo('/<a href="?f&playlist&dir='.$temp.'" target="'.$GLOBALS['flash_player_frame'].'" class="icon ifplay">F</a>');
'<td><a href="#up">'.$i.'</a></td><td class="btntd"><a href="?download&playlist&dir='.$temp.'" class="icon iplay">P</a>/'.
'<a href="?download&recursive&playlist&dir='.$temp.'" class="icon irplay">R</a>');
if($GLOBALS['useflash']) echo('/<a href="?f&playlist&dir='.$temp.'" target="'.$GLOBALS['flash_player_frame'].'" class="icon ifplay">F</a>');
- echo('</td><td colspan="100%" class="maximize-width"><span class="icon ifolder">[DIR] </span><a href="?dir='.$temp.'">'.unxss(str_replace('_', ' ', $item)).
+ echo('</td><td colspan="100%" class="maximize-width"><span class="icon ifolder">[DIR] </span><a href="?dir='.$temp.'">'.unxss(str_replace('-',' - ',str_replace('_', ' ', $item))).
if($GLOBALS['flash_player_frame'] == 'playframe-show' && $GLOBALS['useflash']) { ?>
<tr id="playframe-tr">
<td><a href="?blank" target="playframe-show" title="Stop playback" class="icon ifstop">S</a></td>
if($GLOBALS['flash_player_frame'] == 'playframe-show' && $GLOBALS['useflash']) { ?>
<tr id="playframe-tr">
<td><a href="?blank" target="playframe-show" title="Stop playback" class="icon ifstop">S</a></td>
<style> * { margin: 0; padding: 0; border: 0; } </style></head><body>
<object width="100%" height="344">
<embed src="<?php
<style> * { margin: 0; padding: 0; border: 0; } </style></head><body>
<object width="100%" height="344">
<embed src="<?php
if(isset($_GET['song'])) echo(rawurlencode($_GET['song']));
if(isset($_GET['playlist'])) generate_m3u($GLOBALS['dir'], dirname($GLOBALS['music_dir_url']), isset($_GET['recursive']), ',', true);
?>"
if(isset($_GET['song'])) echo(rawurlencode($_GET['song']));
if(isset($_GET['playlist'])) generate_m3u($GLOBALS['dir'], dirname($GLOBALS['music_dir_url']), isset($_GET['recursive']), ',', true);
?>"
if(isset($_GET['download'])) serve_download($playlist_name);
if(isset($_GET['f'])) flash_mp3_player();
if(isset($_GET['song'])) {
if(isset($_GET['download'])) serve_download($playlist_name);
if(isset($_GET['f'])) flash_mp3_player();
if(isset($_GET['song'])) {
if(isset($_GET['playlist'])) {
generate_m3u($dir, dirname($music_dir_url), isset($_GET['recursive']));
die();
if(isset($_GET['playlist'])) {
generate_m3u($dir, dirname($music_dir_url), isset($_GET['recursive']));
die();
<a name="up"></a>
<iframe src="about:blank" name="playframe-hide" width="0" height="0" style="border: none;" class="hide"></iframe><!-- -----------???--------------- -->
<span class="icon"><</span> <a href="javascript: history.go(-1)" class="icon iback">BACK</a>
<a name="up"></a>
<iframe src="about:blank" name="playframe-hide" width="0" height="0" style="border: none;" class="hide"></iframe><!-- -----------???--------------- -->
<span class="icon"><</span> <a href="javascript: history.go(-1)" class="icon iback">BACK</a>
| <a href="?dj" class="icon idjmode">DJ</a>
| <a href="?help" class="icon ihelp">ABOUT/HELP</a>
| <a href="?logout" class="icon ilogout">LOGOUT</a>
| <a href="?dj" class="icon idjmode">DJ</a>
| <a href="?help" class="icon ihelp">ABOUT/HELP</a>
| <a href="?logout" class="icon ilogout">LOGOUT</a>