|
|
|
|
|
The
if ($cat==1)
echo "Albums";
if ($cat==2)
echo "Singles";
if ($cat==3)
echo "Demos";
if ($cat==4)
echo "DVDs";
?> |
|
$sql="SELECT A.*, COUNT(B.id) AS tracks, SUM( SUBSTRING( B.duration, 1, INSTR( B.duration, ':' ) -1 ) ) AS minutes, SUM( SUBSTRING( B.duration, INSTR( B.duration, ':' ) +1, 2 ) ) AS seconds FROM `albums` AS A, `songs` AS B WHERE A.cat=".$cat." AND B.album = A.id GROUP BY A.id ORDER BY A.year DESC;";
$albums_query=mysql_query($sql,$db);
$albums=mysql_fetch_array($albums_query);
$side=0;
if ($albums!=0)
if (!isset($album_id))
$album_id=$albums["id"];
while ($albums!=0) {
if ($side==0) {
?>
" target="_self"> echo $albums["title"]; ?>
Year of Release:
echo $albums["year"]; ?>
Number of songs
echo $albums["tracks"]; ?>
if ($cat!=4) { ?>
Total running time:
$mins=$albums["minutes"];
$secs=$albums["seconds"];
while ($secs>=60) {
$mins=$mins+1;
$secs=$secs-60;
}
echo $mins."min:".$secs."sec";
}?> |
|
|
|
$side=1;
} else {
?>
|
|
" target="_self"> echo $albums["title"]; ?>
Year of Release:
echo $albums["year"]; ?>
Number of songs
echo $albums["tracks"]; ?>
Total running time:
$mins=$albums["minutes"];
$secs=$albums["seconds"];
while ($secs>=60) {
$mins=$mins+1;
$secs=$secs-60;
}
echo $mins."min:".$secs."sec";
?> |
|
$side=0;
}
$albums=mysql_fetch_array($albums_query);
}
?>
|
|
|
|
|
|
|
|
|
|
$sql="SELECT title, cover, details, cds, directory FROM albums WHERE id=".$album_id.";";
$album_query=mysql_query($sql,$db);
$album=mysql_fetch_array($album_query);
?>
|
echo $album["title"]; ?> |
|
|
|
|
|
" width=" echo $la_width; ?>" height=" echo $la_height; ?>" border="0"> |
|
|
|
|
|
|
|
|
|
if ($cat!=4) { ?>
|
|
|
} ?>
|
|
|
if ($cat!=4) { ?>
|
|
|
} ?>
for ($i=1;$i<=$album["cds"];$i++) {
$j=1;
if ($album["cds"]>1) {
?>
Disc echo $i; ?> |
}
$sql="SELECT * FROM songs WHERE album=".$album_id." AND cd=".$i." ORDER BY pos ASC;";
$songs_query=mysql_query($sql,$db);
$songs=mysql_fetch_array($songs_query);
while ($songs!=0) {
?>
if ($j<10)
echo "0";
echo $j;
?> echo $songs["duration"]; ?> |
: echo $songs["title"]; ?> |
: |
if ($cat!=4) { ?>
if ($songs["tab"]!="") { ?>">
} ?> |
if ($songs["lyrics"]!=0) { ?>/lyrics.html#=$songs["pos"]?>">
} ?> |
if ($songs["clip"]!="") { ?>','discography/media/=$songs["clip"]?>',200,10);">
} ?> |
} ?>
$songs=mysql_fetch_array($songs_query);
$j=$j+1;
}
}
?>
|
|
Details
echo $album["details"];
?> |
|
|
|
|
|
|
|
|
|
include("footer.php3"); ?>