‘ . “\n”;/* Let’s connect to the database. */
$database->Connect();/* Let’s get some stuff going. */
if (isset($_GET[‘alid’]) && is_numeric($_GET[‘alid’])):
$AlbumID = $_GET[‘alid’];$TotalTime = 0;
$Size = 0;
$Tracks = 0;
$e = 0;
$f = 1;
$g = 0;$Result = $database->Query(
“SELECT artist, album, year, time, size, trackcount, disccount, kind “.
“FROM `music` “.
“WHERE albumid = ‘”.mysql_real_escape_string($AlbumID).”‘ “.
“ORDER BY tracknumber ASC”
);
$TracksHave = mysql_num_rows($Result);
while (
$Data = mysql_fetch_assoc($Result)):
if ($e == 0):
$Artist = $Data[‘artist’];
$Album = $Data[‘album’];
$Year = $Data[‘year’];
$Title = “$Artist: $Album ($Year)”; endif;$TotalTime += $Data[‘time’];
$Size += $Data[‘size’];
$TrackCount = $Data[‘trackcount’];
$DiscCount = $Data[‘disccount’];
if (
$e == 0):
$FileType = $Data[‘kind’];
$e++; endif;
if (
$FileType != $Data[‘kind’]):
if ($g == 0):
$FileType = ‘Mixed’;
$g++; endif; endif;
if (
$DiscCount > 0):
if ($f ConvertTime($TotalTime);
$ContentString = “Songs: $TrackText – Length: $TotalTime – Size: “.$music->ConvertSize($Size).” – Album File Type: $FileTypeLink”; else:$Title = ‘Music Listing’;
$Query = ‘SELECT COUNT(DISTINCT artist) AS ArtistCount, ‘.
‘COUNT(DISTINCT album) AS AlbumCount, ‘.
‘COUNT(*) AS SongCount, ‘.
‘SUM(size) AS TotalSize ‘.
‘FROM music’;
$OverallMusicInfo = mysql_query($Query);$Data = mysql_fetch_assoc($OverallMusicInfo);
$ArtistCount = $Data[‘ArtistCount’];
$AlbumCount = $Data[‘AlbumCount’];
$SongCount = $Data[‘SongCount’];
$TotalSize = $Data[‘TotalSize’];$ContentString = “Artists: $ArtistCount – Albums: $AlbumCount – Songs: $SongCount – Total Size: “.$music->ConvertSize($TotalSize); endif;?>
imk.cx –
imk.cx
Copyright ©2002 – 2007 David Rudie. All rights reserved.
#
#