<?
	$bName = $_GET['bName'];
	$aName = $_GET['aName'];	//ֹΩMMW
	
	require_once('link.php');
	mysql_select_db($database,$connect);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<style>
<!--
.style1 {font-size: 13px; color: #FFFFFF; }
BODY {
	SCROLLBAR-FACE-COLOR: #D4D0C8;
	SCROLLBAR-HIGHLIGHT-COLOR: #D4D0C8;
	SCROLLBAR-SHADOW-COLOR: #999999;
	SCROLLBAR-3DLIGHT-COLOR: #FFFFFF;
	SCROLLBAR-ARROW-COLOR:  #000000;
	SCROLLBAR-TRACK-COLOR: #E3E3E3;
	SCROLLBAR-DARKSHADOW-COLOR: #666666;
	background-color: #000000;
	background-image: url(img/search.png);
	background-attachment: fixed;
}
a:link {
	color: white;
	text-decoration: none;
}
a:visited {
	color: white;
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	color: #FFFFFF;
}
.style5 {
	font-size: 16px;
	font-weight: bold;
}
--></style>

</head>

<body leftmargin=0 topmargin=0 bgproperties="fixed" rightmargin=0  bottommargin=0 marginwidth=0 marginheight=0>
<div align = "right">
	<p>&nbsp;</p>
	<p align="center" class="style5">
	<a href = "b_show.php?bName=<? echo $bName;?>">樂團資料</a>
	<a href = "moresong.php?bName=<? echo $bName;?>&aName=<? echo $aName?>">更新資料</a>
    <a href = "album_article_edit.php?bName=<? echo $bName;?>&aName=<? echo $aName?>">發表評論</a>
    <a href = "a_positive.php?bName=<? echo $bName;?>&aName=<? echo $aName?>">觀看所有評論</a>
            </p>
</div>
<center>
  <p>
  <table  border = "0" width="411" cellpadding="1" cellspacing="0" align="center" class="style1">
<?
	$query1 = "SELECT * FROM `Album` WHERE `bName` = '$bName' AND `aName` = '$aName'";
	mysql_query('SET NAMES utf8');  	   
	$result1 = mysql_query($query1,$connect);
	if(!($result1)){
		echo "NO RESULT FOUND ! " ;
	}else{
		$row1 = mysql_fetch_object($result1);
	}
?>
	<tr bgcolor="#360E2B"><td colspan = "3">
		<div align="center"><? echo $row1->bName; ?></div>
	</td>
	<tr bgcolor="#6F1E39">
		<td colspan = "3"><div align = "center">
		<?
			if($row1->aPhoto == ''){
				echo "尚未上傳圖片";
			}else{
				echo "<img src='http://140.117.189.112/WEB/BAND2.0/".$row1->aPhoto."'  height = '70%' width = '70%'>";
			}
		?>
	  </div></td>
	</tr><tr><td colspan = "2" height="1"></td></tr>
	<tr>
		<td width="156" bgcolor="#971825"><div align = "center">專輯名稱</div></td><td width="0"></td>
		<td width="249" bgcolor="#971825"><div align = "center"><? echo $row1->aName; ?></div></td>
	</tr><tr><td colspan = "2" height="1"></td></tr>
	<tr>
		<td bgcolor="#C35727"><div align = "center">發行日期</div></td><td width="0"></td>
		<td bgcolor="#C35727"><div align = "center"><? echo $row1->aDate ; ?></div></td>
	</tr><tr><td colspan = "2" height="1"></td></tr>
	<tr>
		<td bgcolor="#D6AE4A"><div align = "center">發行公司</div></td><td width="0"></td>
		<td bgcolor="#D6AE4A"><div align = "center"><? echo $row1->company; ?></div></td>
	</tr><tr><td colspan = "2" height="1"></td></tr>
	<tr bgcolor="#DCCE7C">
		<td height = "21" colspan = "3"><div align = "center">曲目<div></td>
	</tr><tr><td colspan = "2" height="1"></td></tr>
	<tr bgcolor="#D67E62">
		<td colspan = "3"><div align = "left">
			<? 
				$query2 = "SELECT * FROM `Song`	WHERE `bName` = '$bName' AND `aName` = '$aName'";
				$result2 = mysql_query($query2,$connect);
				if(!($result2))
				{
					echo "尚未新增專輯";
				}
				else
				{
					$num = mysql_num_rows($result2);
					for($i = 1;$i<=$num;$i++)
					{
						$row2 = mysql_fetch_object($result2);
						echo $row2->song;?><br>
			<?
					}
				}?>
	  </div></td>
	</tr>
	<tr bgcolor="#B33D2F">
		<td height = "21" colspan = "3"><div align = "center">
		<?
			$query3 = "SELECT `mId`,`dateTime` FROM `AddModify2` WHERE `bName` = '$bName' AND `aName` = '$aName' ORDER BY `dateTime` DESC"; //找出最後修改者和時間
			$result3 = mysql_query($query3,$connect);																    
			$row3 = mysql_fetch_object($result3);
		?>
		最後新增：<? echo $row3->dateTime;?>  (by <? echo $row3->mId;?>)  
	  </div></td>
	</tr>
	
</table>
</center>
</body>
</html>
