<?
	include('check_member.php');
	$bName = $_GET['bName'];
	$mId = $_SESSION['mId'];
?>

<!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/bmnum.png);
}
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>

<script  language="JavaScript">

function check()
{
	if (document.forms[0].aName.value == '')
	{
		alert('請輸入專輯名稱');
		return false;
	}
	else
		return true;
}
</script>

<body leftmargin=0 topmargin=0 bgproperties="fixed" rightmargin=0  bottommargin=0 marginwidth=0 marginheight=0>
<center>	 
<form action = "addalbum_act.php?bName=<? echo $bName?>" name = "addband" method = "post" onSubmit="return check()" enctype = "multipart/form-data">
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table border = "0" cellpadding="1" cellspacing="0" align="center" class="style1">
		<tr bgcolor="#201328">
			<td colspan = "3"><div align = "center"><strong>新增<? echo $bName;?>的專輯</strong></div></td>
		</tr><tr><td colspan = "3" height = "1"></td></tr>
		<tr>
		  <td bgcolor="#4D3255"><div align = "center">專輯名稱</div></td><td width="0"></td>
		  <td bgcolor="#4D3255"><div align = "center">
	      <input type="text" size="44" name="aName"></div></td>
		</tr><tr><td colspan = "3" height = "1"></td></tr>
		<tr>
		  <td bgcolor="#65476C"><div align = "center">發行日期</div></td><td width="0"></td>
			<td bgcolor="#65476C"><div align = "center">
				<select name = "year">
				<option  selected>請選擇年份</option>
					<? 
						$j = date("Y");
						for($year = 1970;$year<=$j;$year++)
    					{
            				echo "<option value = '".$year."'>".$year."</option>";
    					}
					?>
			</select>年
		<select name = "month">
			<option  selected>月份</option>
				<? 
					for($month = 0;$month<=12;$month++)
    				{
            			echo "<option value = '".$month."'>".$month."</option>";
    				}
				?>
		</select>月
		<select name = "day">
			<option  selected>日期</option>
				<? 
					for($day = 0;$day<=31;$day++)
    				{
            			echo "<option value = '".$day."'>".$day."</option>";
    				}
				?>
		</select>日<br>(若不確定發行月份.日期請填"0")
		  </div></td>
		</tr><tr><td colspan = "3" height = "1"></td></tr>
		<tr>
		  <td bgcolor="#7C5D7B"><div align = "center">發行公司</div></td><td width="0"></td>
			<td bgcolor="#7C5D7B"><div align = "center">
			  <input type="text" size="44" name="company">
		  </div></td>
		</tr><tr><td colspan = "3" height = "1"></td></tr>
		<tr>
		  <td bgcolor="#957B91"><div align = "center">圖片</div></td><td width="0"></td>
			<td  bgcolor="#957B91"><div align = "center">
			<input type = "hidden" name = "MAX_FILE_SIZE" value = "2048000">
		  <input type="file" name="aPhoto[0]" size = "35"></div></td>
		</tr><tr><td colspan = "3" height = "1"></td></tr>
		<tr>
		  <td bgcolor="#AE959C"><div align = "center">曲目<br>(範例：01.XXX)</div></td><td width="0"></td>
			<td bgcolor="#AE959C"><div align = "center">
			<?  for($i = 1;$i <= $num; $i++){?>
				<input type="text" size="44" name="song[<? echo $i;?>]">
			<br><? }?>
		  </div></td>
		</tr><tr><td colspan = "3" height = "1"></td></tr>
		<tr bgcolor="#87666F">
			<td colspan = "3"><div align = "center">
			<!-- &nbsp;&nbsp; 新增時間:<?// $time=date("Y-m-d- H:i:s"); echo $time; ?> -->
			<input type =  "hidden" name = "mId" value= "<? echo $mId;?>">
			<input type = "submit" name = "submit" value = "新增">
		  <input type = "button" name = "reset" value = "放棄"></div></td>
	  </tr>		
	</table>
  </form>
</center>
</body>
</html>