Пример #1
0
function onmouseoverDownloadAlbum($album_id)
{
    global $cfg, $db;
    $filesize = 0;
    $transcode = false;
    $exact = true;
    $extensions = array();
    $query = mysql_query('SELECT track.filesize, cache.filesize AS cache_filesize,
		miliseconds, audio_bitrate, track_id,
		LOWER(SUBSTRING_INDEX(track.relative_file, ".", -1)) AS extension
		FROM track LEFT JOIN cache
		ON track.track_id = cache.id
		AND cache.profile = ' . (int) $cfg['download_id'] . '
		WHERE album_id = "' . mysql_real_escape_string($album_id) . '"');
    if (mysql_num_rows($query) == 1) {
        // By one track return onmouseoverDownloadTrack() info
        $track = mysql_fetch_assoc($query);
        return onmouseoverDownloadTrack($track['track_id']);
    }
    while ($track = mysql_fetch_assoc($query)) {
        if (in_array($track['extension'], $extensions) == false) {
            $extensions[] = $track['extension'];
        }
        $transcode_track = false;
        if (sourceFile($track['extension'], $track['audio_bitrate'], $cfg['download_id']) == false) {
            $transcode_track = true;
            $transcode = true;
        }
        if ($track['cache_filesize']) {
            $filesize += $track['cache_filesize'];
        } elseif ($transcode_track) {
            $filesize += round($cfg['encode_bitrate'][$cfg['download_id']] * $track['miliseconds'] / 8 / 1000);
            $exact = false;
        } else {
            $filesize += $track['filesize'];
        }
    }
    sort($extensions);
    $source = implode($extensions, ', ');
    if ($exact) {
        $list = formattedSize($filesize);
    } else {
        $list = html_entity_decode('± ', null, NJB_DEFAULT_CHARSET) . formattedSize($filesize);
    }
    $list .= '<div class="ol_line"></div>';
    if ($transcode && count($extensions) == 1) {
        $list .= $cfg['encode_name'][$cfg['download_id']] . ' (' . $source . ' source)';
    } elseif ($transcode && count($extensions) > 4) {
        $list .= $cfg['encode_name'][$cfg['download_id']] . ' (mixed source)';
    } elseif ($transcode) {
        $list .= $cfg['encode_name'][$cfg['download_id']] . '<br>(' . $source . ' source)';
    } else {
        $list .= $source;
    }
    $list .= '<div class="ol_line"></div>';
    if ($transcode && $exact) {
        $list .= 'Transcoded:<img src="' . $cfg['img'] . 'tiny_check.png" alt="" class="tiny"><br>';
    } elseif ($transcode && !$exact) {
        $list .= 'Transcoded:<img src="' . $cfg['img'] . 'tiny_uncheck.png" alt="" class="tiny"><br>';
    } else {
        $list .= 'Source:<img src="' . $cfg['img'] . 'tiny_check.png" alt="" class="tiny"><br>';
    }
    return 'onMouseOver="return overlib(\'' . addslashes(html($list)) . '\', CAPTION, \'Download album:\', WIDTH, 200);" onMouseOut="return nd();"';
}
Пример #2
0
function track_title()
{
    global $cfg, $db, $size, $search_string, $group_found, $match_found;
    //$query = mysql_query('SELECT track.artist, track.title, track.featuring, track.album_id, track.track_id, track.miliseconds, album.image_id, album.album FROM track, album ' . $filter_query . ' ' . $order_query);
    $query = mysql_query('SELECT track.artist as track_artist, track.title, track.featuring, track.album_id, track.track_id, track.miliseconds, track.number, album.image_id, album.album, album.artist
	FROM track
	INNER JOIN album ON track.album_id = album.album_id
	WHERE track.title LIKE "%' . mysql_real_escape_string($search_string) . '%"');
    /* $query = mysql_query('SELECT track.artist as track_artist, track.title, track.featuring, track.album_id, track.track_id, track.miliseconds, track.number, album.image_id, album.album, album.artist
    	FROM track
    	INNER JOIN album ON track.album_id = album.album_id
    	WHERE track.title LIKE "%' . mysql_real_escape_string($search_string) . '%"
    	ORDER BY track.artist, track.title'); */
    $rows = mysql_num_rows($query);
    if ($rows > 0) {
        $match_found = true;
        if ($group_found == 'none') {
            $group_found = 'TT';
        }
        ?>
<h1 onclick='toggleSearchResults("TT");' class="pointer"><i id="iconSearchResultsTT" class="fa fa-chevron-circle-down icon-anchor"></i> Track title (<?php 
        if ($rows > 1) {
            echo $rows . " matches found";
        } else {
            $album = mysql_fetch_assoc($query);
            echo $rows . " match found: " . $album['track_artist'];
        }
        ?>
)
</h1>
<div id="searchResultsTT">
<table cellspacing="0" cellpadding="0" class="border">
<tr class="header">
	<td class="icon"></td><!-- track menu -->
	<td class="icon"></td><!-- add track -->
	<td class="track-list-artist">Track artist&nbsp;</td>
	<td>Title&nbsp;</td>
	<td>Album&nbsp;</td>
	<td></td>
	<td align="right" class="time">Time</td>
	<td class="space right"></td>
</tr>

<?php 
        $i = 0;
        /* 
        	$query = mysql_query('SELECT track.artist as track_artist, track.title, track.featuring, track.album_id, track.track_id, track.miliseconds, track.number, album.image_id, album.album, album.artist
        	FROM track
        	INNER JOIN album ON track.album_id = album.album_id
        	WHERE track.title LIKE "%' . mysql_real_escape_string($search_string) . '%"
        	ORDER BY track.artist, track.title');
        */
        $query = mysql_query('SELECT * FROM 
	(SELECT track.artist as track_artist, track.title, track.featuring, track.album_id, track.track_id as tid, track.miliseconds, track.number, track.relative_file, album.image_id, album.album, album.artist
	FROM track
	INNER JOIN album ON track.album_id = album.album_id
	WHERE track.title LIKE "%' . mysql_real_escape_string($search_string) . '%") as a
	LEFT JOIN 
	(SELECT track_id, favorite_id FROM favoriteitem WHERE favorite_id = "' . $cfg['favorite_id'] . '") as b ON b.track_id = a.tid
	ORDER BY a.title, a.artist, a.album');
        while ($track = mysql_fetch_assoc($query)) {
            ?>
<tr class="<?php 
            echo $i++ & 1 ? 'even' : 'odd';
            ?>
 mouseover">
	<td class="icon">
	<span id="menu-track<?php 
            echo $i + 10000;
            ?>
">
	<div onclick='toggleMenuSub(<?php 
            echo $i + 10000;
            ?>
);'>
		<i id="menu-icon<?php 
            echo $i + 10000;
            ?>
" class="fa fa-bars icon-small"></i>
	</div>
	</span>
	</td>
	
	<td class="icon">
	<span>
	<?php 
            if ($cfg['access_add']) {
                echo '<a href="javascript:ajaxRequest(\'play.php?action=addSelect&amp;track_id=' . $track['tid'] . '\');" onMouseOver="return overlib(\'Add track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-plus-circle fa-fw icon-small"></i></a>';
            }
            ?>
	</span>
	</td>
		
	<td class="track-list-artist"><?php 
            if (mysql_num_rows(mysql_query('SELECT track_id FROM track WHERE track.artist="' . mysql_real_escape_string($track['track_artist']) . '"')) > 1) {
                echo '<a href="index.php?action=view2&amp;artist=' . rawurlencode($track['track_artist']) . '&amp;order=year">' . html($track['track_artist']) . '</a>';
            } else {
                echo html($track['track_artist']);
            }
            ?>
</td>
	
	<td><?php 
            if ($cfg['access_play']) {
                echo '<a href="javascript:ajaxRequest(\'play.php?action=insertSelect&amp;playAfterInsert=yes&amp;track_id=' . $track['tid'] . '\');" onMouseOver="return overlib(\'Play track ' . $track['number'] . '\');" onMouseOut="return nd();">' . html($track['title']) . '</a>';
            } elseif ($cfg['access_add']) {
                echo '<a href="javascript:ajaxRequest(\'play.php?action=addSelect&amp;track_id=' . $track['tid'] . '\');" onMouseOver="return overlib(\'Add track\');" onMouseOut="return nd();">' . html($track['title']) . '</a>';
            } elseif ($cfg['access_stream']) {
                echo '<a href="stream.php?action=playlist&amp;track_id=' . $track['tid'] . '&amp;stream_id=' . $cfg['stream_id'] . '" onMouseOver="return overlib(\'Stream track\');" onMouseOut="return nd();">' . html($track['title']) . '</a>';
            } else {
                echo html($track['title']);
            }
            ?>
	<span class="track-list-artist-narrow">by <?php 
            echo html($track['track_artist']);
            ?>
</span> 
	</td>
	<td><a href="index.php?action=view3&amp;album_id=<?php 
            echo $track['album_id'];
            ?>
" <?php 
            echo onmouseoverImage($track['image_id']);
            ?>
><?php 
            echo html($track['album']);
            ?>
</a></td>
	<td onclick="
		var action = '';
		if ($('#favorite_star_TT-<?php 
            echo $track['tid'];
            ?>
').attr('class') == 'fa fa-star-o') {
			action = 'add';
			}
		else {
			action = 'remove';
		}
		ajaxRequest('ajax-favorite.php?action=' + action + '&track_id=<?php 
            echo $track['tid'];
            ?>
&group_type=TT', setFavorite);
	" class="pl-favorites"><i class="fa fa-star<?php 
            if ($track['favorite_id'] != $cfg['favorite_id']) {
                echo '-o';
            }
            ?>
" id="favorite_star_TT-<?php 
            echo $track['tid'];
            ?>
"></i></td>
	<td align="right"><?php 
            echo formattedTime($track['miliseconds']);
            ?>
</td>
	<td></td>
</tr>

<tr class="line">
	<td></td>
	<td colspan="16"></td>
</tr>

<tr>
<td colspan="20">
<div class="menuSub" id="menu-sub-track<?php 
            echo $i + 10000;
            ?>
" onclick='offMenuSub(<?php 
            echo $i + 10000;
            ?>
);'> 
	
	<div><?php 
            if ($cfg['access_play']) {
                echo '<a href="javascript:ajaxRequest(\'play.php?action=insertSelect&amp;playAfterInsert=yes&amp;track_id=' . $track['tid'] . '\');" onMouseOver="return overlib(\'Play track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-play-circle-o fa-fw icon-small"></i>Insert after currently playing track and play</a>';
            }
            ?>
	</div>
	
	<div>
	<?php 
            if ($cfg['access_add']) {
                echo '<a href="javascript:ajaxRequest(\'play.php?action=insertSelect&amp;track_id=' . $track['tid'] . '\');" onMouseOver="return overlib(\'Insert track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-indent fa-fw icon-small"></i>Insert after currently playing track</a>';
            }
            ?>
	</div>
	
	<div>
	<?php 
            if ($cfg['access_add']) {
                echo '<a href="javascript:ajaxRequest(\'play.php?action=addSelect&amp;track_id=' . $track['tid'] . '\');" onMouseOver="return overlib(\'Add track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-plus-circle fa-fw icon-small"></i>Add track to playlist</a>';
            }
            ?>
	</div>
	
	<div><?php 
            if ($cfg['access_play']) {
                echo '<a href="javascript:ajaxRequest(\'play.php?action=playSelect&amp;track_id=' . $track['tid'] . '\');" onMouseOver="return overlib(\'Play track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-play-circle-o fa-fw icon-small"></i>Remove all from playlist and play track</a>';
            }
            ?>
	</div>
	
	<div><?php 
            if ($cfg['access_stream']) {
                echo '<a href="stream.php?action=playlist&amp;track_id=' . $track['tid'] . '&amp;stream_id=' . $cfg['stream_id'] . '" onMouseOver="return overlib(\'Stream track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-rss fa-fw icon-small"></i>Stream track</a>';
            }
            ?>
	</div>
	
	<div><?php 
            if ($cfg['access_download']) {
                echo '<a href="download.php?action=downloadTrack&amp;track_id=' . $track['tid'] . '&amp;download_id=' . $cfg['download_id'] . '" ' . onmouseoverDownloadTrack($track['tid']) . '><i class="fa fa-download fa-fw icon-small"></i>Download track</a>';
            }
            ?>
	</div>
	
	<div><?php 
            if ($cfg['access_play']) {
                echo '<a href="getid3/demos/demo.browse.php?filename=' . $cfg['media_dir'] . urlencode($track['relative_file']) . '" onClick="showSpinner();"><i class="fa fa-info-circle fa-fw icon-small"></i>File details</a>';
            }
            ?>
	</div>
</div>
</td>
</tr>

<?php 
        }
        echo "</table>";
        echo "</div>";
    }
}
Пример #3
0
function view3all()
{
    global $cfg, $db;
    authenticate('access_media');
    $artist = get('artist');
    $title = get('title');
    $filter = get('filter') or $filter = 'start';
    $order = get('order') or $order = 'title';
    $sort = get('sort') == 'desc' ? 'desc' : 'asc';
    $sort_artist = 'asc';
    $sort_title = 'asc';
    $sort_featuring = 'asc';
    $sort_album = 'asc';
    $order_bitmap_artist = '<span class="typcn"></span>';
    $order_bitmap_title = '<span class="typcn"></span>';
    $order_bitmap_featuring = '<span class="typcn"></span>';
    $order_bitmap_album = '<span class="typcn"></span>';
    if (strlen($title) >= 1) {
        // formattedNavigator
        $nav = array();
        $nav['name'][] = 'Library';
        $nav['url'][] = 'index.php';
        $nav['name'][] = $title;
        require_once 'include/header.inc.php';
        if ($filter == 'start') {
            /* $title = strtolower($title);
            			$separator = $cfg['separator'];
            			$count = count($separator);
            			$i=0;
            			for ($i=0; $i<$count; $i++) {
            				$pos = strpos($title,strtolower($separator[$i]));
            				if ($pos !== false) {
            					$title = trim(substr($title, 0 , $pos));
            					//break;
            				}
            			} */
            $separator = $cfg['separator'];
            $count = count($separator);
            $title = findCoreTrackTitle($title);
            $title = mysql_real_escape_like($title);
            $query_string = '';
            $i = 0;
            for ($i = 0; $i < $count; $i++) {
                $query_string = $query_string . ' OR LOWER(track.title) LIKE "' . $title . $separator[$i] . '%"';
            }
            $filter_query = 'WHERE (LOWER(track.title) = "' . $title . '" ' . $query_string . ') AND track.album_id = album.album_id';
            //echo $filter_query;
        } elseif ($filter == 'smart') {
            $filter_query = 'WHERE (track.title LIKE "%' . mysql_real_escape_like($title) . '%" OR track.title SOUNDS LIKE "' . mysql_real_escape_string($title) . '") AND track.album_id = album.album_id';
        } elseif ($filter == 'exact') {
            $filter_query = 'WHERE track.title = "' . mysql_real_escape_string($title) . '" AND track.album_id = album.album_id';
        } else {
            message(__FILE__, __LINE__, 'error', '[b]Unsupported input value for[/b][br]filter');
        }
        $url = 'index.php?action=view3all&amp;title=' . rawurlencode($title) . '&amp;filter=' . $filter;
    } elseif (strlen($artist) >= 1) {
        // formattedNavigator
        $nav = array();
        $nav['name'][] = 'Library';
        $nav['url'][] = 'index.php';
        $nav['name'][] = $artist;
        $nav['url'][] = 'index.php?action=view2&amp;artist=' . rawurlencode($artist) . '&amp;order=year';
        $nav['name'][] = 'All tracks';
        require_once 'include/header.inc.php';
        $filter_query = 'WHERE track.artist="' . mysql_real_escape_string($artist) . '" AND track.album_id = album.album_id';
        //$filter_query = 'WHERE track.artist="' . mysql_real_escape_string($artist) . '"';
        $url = 'index.php?action=view3all&amp;artist=' . rawurlencode($artist);
    } else {
        message(__FILE__, __LINE__, 'warning', '[b]Search string too short - min. 2 characters[/b][br][url=index.php][img]small_back.png[/img]Back to previous page[/url]');
    }
    if ($order == 'artist' && $sort == 'asc') {
        $order_query = 'ORDER BY artist, title';
        $order_bitmap_artist = '<span class="fa fa-sort-alpha-asc"></span>';
        $sort_artist = 'desc';
    } elseif ($order == 'artist' && $sort == 'desc') {
        $order_query = 'ORDER BY artist DESC, title DESC';
        $order_bitmap_artist = '<span class="fa fa-sort-alpha-desc"></span>';
        $sort_artist = 'asc';
    } elseif ($order == 'title' && $sort == 'asc') {
        $order_query = 'ORDER BY title, album';
        $order_bitmap_title = '<span class="fa fa-sort-alpha-asc"></span>';
        $sort_title = 'desc';
    } elseif ($order == 'title' && $sort == 'desc') {
        $order_query = 'ORDER BY title DESC, album DESC';
        $order_bitmap_title = '<span class="fa fa-sort-alpha-desc"></span>';
        $sort_title = 'asc';
    } elseif ($order == 'featuring' && $sort == 'asc') {
        $order_query = 'ORDER BY featuring, title, artist';
        $order_bitmap_featuring = '<span class="fa fa-sort-alpha-asc"></span>';
        $sort_featuring = 'desc';
    } elseif ($order == 'featuring' && $sort == 'desc') {
        $order_query = 'ORDER BY featuring DESC, title DESC, artist DESC';
        $order_bitmap_featuring = '<span class="fa fa-sort-alpha-desc"></span>';
        $sort_featuring = 'asc';
    } elseif ($order == 'album' && $sort == 'asc') {
        $order_query = 'ORDER BY album, relative_file';
        $order_bitmap_album = '<span class="fa fa-sort-alpha-asc"></span>';
        $sort_album = 'desc';
    } elseif ($order == 'album' && $sort == 'desc') {
        $order_query = 'ORDER BY album DESC, relative_file DESC';
        $order_bitmap_album = '<span class="fa fa-sort-alpha-desc"></span>';
        $sort_album = 'asc';
    } else {
        message(__FILE__, __LINE__, 'error', '[b]Unsupported input value for[/b][br]order');
    }
    /*$query = mysql_query('SELECT featuring FROM track, album ' . $filter_query . ' AND featuring <> ""');
    	if (mysql_fetch_row($query))	$featuring = true;
    	else							$featuring = false;
    	*/
    ?>
<table cellspacing="0" cellpadding="0" class="border">
<tr class="header">
	<td class="icon">&nbsp;</td><!-- track menu -->
	<td class="icon">&nbsp;</td><!-- add track -->
	<td class="track-list-artist"><a <?php 
    echo $order_bitmap_artist == '<span class="typcn"></span>' ? '' : 'class="sort_selected"';
    ?>
 href="<?php 
    echo $url;
    ?>
&amp;order=artist&amp;sort=<?php 
    echo $sort_artist;
    ?>
">Artist&nbsp;<?php 
    echo $order_bitmap_artist;
    ?>
</a></td>
	<td><a <?php 
    echo $order_bitmap_title == '<span class="typcn"></span>' ? '' : 'class="sort_selected"';
    ?>
 href="<?php 
    echo $url;
    ?>
&amp;order=title&amp;sort=<?php 
    echo $sort_title;
    ?>
">Title&nbsp;<?php 
    echo $order_bitmap_title;
    ?>
</a></td>
	<td><a <?php 
    echo $order_bitmap_album == '<span class="typcn"></span>' ? '' : 'class="sort_selected"';
    ?>
 href="<?php 
    echo $url;
    ?>
&amp;order=album&amp;sort=<?php 
    echo $sort_album;
    ?>
">Album&nbsp;<?php 
    echo $order_bitmap_album;
    ?>
</a></td>
	<td align="right" class="time">Time</td>
	<td class="space right"></td>
</tr>

<?php 
    $i = 0;
    $query = mysql_query('SELECT track.artist, track.title, track.number, track.featuring, track.album_id, track.track_id, track.miliseconds, track.relative_file, album.image_id, album.album FROM track, album ' . $filter_query . ' ' . $order_query);
    //$query = mysql_query('SELECT track.artist, track.title, track.featuring, track.album_id, track.track_id, track.miliseconds  FROM track ' . $filter_query . ' ' . $order_query);
    while ($track = mysql_fetch_assoc($query)) {
        ?>
<tr class="<?php 
        echo $i++ & 1 ? 'even' : 'odd';
        ?>
 mouseover">
	<td class="icon">
	<span id="menu-track<?php 
        echo $i;
        ?>
">
	<div onclick='toggleMenuSub(<?php 
        echo $i;
        ?>
);'>
		<i id="menu-icon<?php 
        echo $i;
        ?>
" class="fa fa-bars icon-small"></i>
	</div>
	</span>
	</td>
	
	<td class="icon">
	<span>
	<?php 
        if ($cfg['access_add']) {
            echo '<a href="javascript:ajaxRequest(\'play.php?action=addSelect&amp;track_id=' . $track['track_id'] . '\');" onMouseOver="return overlib(\'Add track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-plus-circle fa-fw icon-small"></i></a>';
        }
        ?>
	</span>
	</td>
		
	<td class="track-list-artist"><?php 
        if (mysql_num_rows(mysql_query('SELECT track_id FROM track WHERE artist="' . mysql_real_escape_string($track['artist']) . '"')) > 1) {
            echo '<a href="index.php?action=view2&amp;artist=' . rawurlencode($track['artist']) . '&amp;order=year">' . html($track['artist']) . '</a>';
        } else {
            echo html($track['artist']);
        }
        ?>
</td>
	
	<td><?php 
        if ($cfg['access_play']) {
            echo '<a href="javascript:ajaxRequest(\'play.php?action=insertSelect&amp;playAfterInsert=yes&amp;track_id=' . $track['track_id'] . '\');" onMouseOver="return overlib(\'Play track\');" onMouseOut="return nd();">' . html($track['title']) . '</a>';
        } elseif ($cfg['access_add']) {
            echo '<a href="javascript:ajaxRequest(\'play.php?action=addSelect&amp;track_id=' . $track['track_id'] . '\');" onMouseOver="return overlib(\'Add track\');" onMouseOut="return nd();">' . html($track['title']) . '</a>';
        } elseif ($cfg['access_stream']) {
            echo '<a href="stream.php?action=playlist&amp;track_id=' . $track['track_id'] . '&amp;stream_id=' . $cfg['stream_id'] . '" onMouseOver="return overlib(\'Stream track\');" onMouseOut="return nd();">' . html($track['title']) . '</a>';
        } else {
            echo html($track['title']);
        }
        ?>
		<span class="track-list-artist-narrow">by <?php 
        echo html($track['artist']);
        ?>
</span>
	</td>
	
	<td><a href="index.php?action=view3&amp;album_id=<?php 
        echo $track['album_id'];
        ?>
" <?php 
        echo onmouseoverImage($track['image_id']);
        ?>
><?php 
        echo html($track['album']);
        ?>
</a></td>
	<td align="right"><?php 
        echo formattedTime($track['miliseconds']);
        ?>
</td>
	<td></td>
</tr>

<tr class="line">
	<td></td>
	<td colspan="16"></td>
</tr>

<tr>
<td colspan="20">
<div class="menuSub" id="menu-sub-track<?php 
        echo $i;
        ?>
" onclick='offMenuSub(<?php 
        echo $i;
        ?>
);'> 
	
	<div><?php 
        if ($cfg['access_play']) {
            echo '<a href="javascript:ajaxRequest(\'play.php?action=insertSelect&amp;playAfterInsert=yes&amp;track_id=' . $track['track_id'] . '\');" onMouseOver="return overlib(\'Play track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-play-circle-o fa-fw icon-small"></i>Insert after currently playing track and play</a>';
        }
        ?>
	</div>
	
	<div>
	<?php 
        if ($cfg['access_add']) {
            echo '<a href="javascript:ajaxRequest(\'play.php?action=insertSelect&amp;track_id=' . $track['track_id'] . '\');" onMouseOver="return overlib(\'Insert track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-indent fa-fw icon-small"></i>Insert after currently playing track</a>';
        }
        ?>
	</div>
	
	<div>
	<?php 
        if ($cfg['access_add']) {
            echo '<a href="javascript:ajaxRequest(\'play.php?action=addSelect&amp;track_id=' . $track['track_id'] . '\');" onMouseOver="return overlib(\'Add track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-plus-circle fa-fw icon-small"></i>Add track to playlist</a>';
        }
        ?>
	</div>
	
	<div><?php 
        if ($cfg['access_play']) {
            echo '<a href="javascript:ajaxRequest(\'play.php?action=playSelect&amp;track_id=' . $track['track_id'] . '\');" onMouseOver="return overlib(\'Play track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-play-circle-o fa-fw icon-small"></i>Remove all from playlist and play track</a>';
        }
        ?>
	</div>
	
	<div><?php 
        if ($cfg['access_stream']) {
            echo '<a href="stream.php?action=playlist&amp;track_id=' . $track['track_id'] . '&amp;stream_id=' . $cfg['stream_id'] . '" onMouseOver="return overlib(\'Stream track ' . $track['number'] . '\');" onMouseOut="return nd();"><i class="fa fa-rss fa-fw icon-small"></i>Stream track</a>';
        }
        ?>
	</div>
	
	<div><?php 
        if ($cfg['access_download']) {
            echo '<a href="download.php?action=downloadTrack&amp;track_id=' . $track['track_id'] . '&amp;download_id=' . $cfg['download_id'] . '" ' . onmouseoverDownloadTrack($track['track_id']) . '><i class="fa fa-download fa-fw icon-small"></i>Download track</a>';
        }
        ?>
	</div>
	
	<div><?php 
        if ($cfg['access_play']) {
            echo '<a href="getid3/demos/demo.browse.php?filename=' . $cfg['media_dir'] . urlencode($track['relative_file']) . '" onClick="showSpinner();"><i class="fa fa-info-circle fa-fw icon-small"></i>File details</a>';
        }
        ?>
	</div>
	
</div>
</td>
</tr>

<?php 
    }
    echo '</table>' . "\n";
    require_once 'include/footer.inc.php';
}