<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>GiantDisc Web Interface</title>
<link href="gdweb.css" rel="stylesheet" type="text/css">
</head>
<body>

<h5>GiantDisc: Show Album Details</h5>
<h2>Show Album Details</h2>

<? 
include "gdweb.php";

#phpinfo();
?>


<? 


if(isset($cddbid)){
  # open data source
  $dbh = mysql_connect();	

  print "<table border=\"0\" cellspacing=\"0\">\n";
  $recset = mysql_db_query ("GiantDisc", "SELECT * FROM album WHERE cddbid='$cddbid'");
  if($row = mysql_fetch_array($recset)) {
    print "<tr><td>Artist:</td><td>".$row["artist"]."</td></tr>";
    print "<tr><td>Title:</td><td>".$row["title"]."</td></tr>";
  }
  print "</table>\n";

  if (strlen($cddbid)>=8){
    exec("/bin/ls musichome/??/img??".$cddbid."-??.jpg", $imglist);
    #print_r ($imglist);
    print "<h5>cover images</h5>";
    reset($imglist);
    print "<p>";
    foreach($imglist as $image){
      print " <a href='?cddbid=$cddbid&fullsz=$image'><img border='0' height='80' src=\"$image\"></a>&nbsp; ";
    }
    print "</p>";
  }
  
  if (isset($fullsz)){
    print "<p><img src=\"$fullsz\"></p>";
  }

  print "<p><small><a href='gdeditalbum.php?cddbid=$cddbid'>[edit album]</a></small></p>";
  
  mysql_free_result($recset);
  
}
?>



<? 
?>
</body>
</html>