<?
	$bName = $_GET['bName'];
	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;
}
--></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"><strong>
	<a href = "morebm.php?bName=<? echo $bName;?>">更新資料</a>
    <a href = "band_article_edit.php?bName=<? echo $bName;?>">發表評論</a>
    <a href = "b_positive.php?bName=<? echo $bName;?>">觀看所有評論</a>
            </strong></p>
</div>
<center>
  <table border = "0" width="411" cellpadding="1" cellspacing="0" align="center" class="style1">

	<?php
		$query1 = "SELECT * FROM `Band` WHERE `bName` = '$bName' ";
		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">
		<?
			if($row1->bPhoto == ''){
				echo "尚未上傳圖片";
			}else{
				echo "<img src='http://140.117.189.112/WEB/BAND2.0/".$row1->bPhoto."'  height = '70%' width = '70%'>";
			}
		?>
		</div></td>
	</tr><tr><td colspan = "2" height="1"></td></tr>
	<tr>
		<td width="117" height = "21" bgcolor="#6F1E39"><div align = "center">樂團名稱</div></td><td width="0"></td>
		<td width="288" bgcolor="#6F1E39"><div align = "center">
			<?php
				 echo $row1->bName ; 
			?>
		</div></td>
	</tr><tr><td colspan = "2" height="1"></td></tr>
	<tr>
		<td bgcolor="#971825"><div align = "center">樂團成員</div></td><td width="0"></td>
		<td bgcolor="#971825"><div align = "center">
			<? 
				$query2 = "SELECT `name`,`talent` FROM `Bmember` WHERE `bName` = '$bName'";
				$result2 = mysql_query($query2,$connect);
				$num = mysql_num_rows($result2);
				for($i = 1;$i<=$num;$i++)
				{
					$row2 = mysql_fetch_object($result2);
					echo $row2->name ;?>(<? echo $row2->talent ; ?>)<br>
		  <?   }  ?>
		</div></td>
	</tr><tr><td colspan = "2" height="1"></td></tr>
	<tr>
		<td bgcolor="#C35727" height = "21"><div align = "center">成立日期</div></td><td width="0"></td>
		<td bgcolor="#C35727"><div align = "center"><? echo $row1->bStartTime ; ?></div></td>
	</tr><tr><td colspan = "2" height = "1"></td>
	</tr>
	<tr bgcolor="#D6AE4A">
		<td colspan = "3" height = "21"><div align = "center">樂團簡介</div></td>
	</tr>
	<tr bgcolor="#DCCE7C">
		<td colspan = "3">
		  	<? echo $row1->bInfo; ?>
		  	</div></td></tr>
	<tr></tr><tr><td colspan = "2" height="1"></td></tr>
	<tr bgcolor="#D67E62">
		<td height = "21" colspan = "3"><div align = "center">專輯列表</div></td>
	</tr>
	<tr bgcolor="#B33D2F">
	  <td colspan = "3"><? 
		$query4 = "SELECT * FROM `Album` WHERE `bName` = '$bName' ORDER BY `aDate`"; 
		$result4 = mysql_query($query4,$connect);
		$num = mysql_num_rows($result4);
		for($i = 1;$i<=$num;$i++)
		{
			$row4 = mysql_fetch_object($result4);
			echo "<a href='a_show.php?bName=".$bName."&aName=".$row4->aName."'>".$row4->aName."</a>";
			echo "<br>";
		}?>
        <div align="right"><a href = "album_num.php?bName=<? echo $bName;?>">-><strong>新增專輯</strong><-</a></div></td>
    </tr>
	<tr bgcolor="#792820"><td height = "21" colspan = "3"><div align="center">
	<? 
	$query3 = "SELECT `mId`,`dateTime` FROM `AddModify1` WHERE `bName` = '$bName' 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>
