<?
	include('check_member.php');
	$num = $_POST['num'];
	$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 {
	color: #FFFFFF;
}
--></style>

</head>

<script  language="JavaScript">
/*function addRow(n)
	var Tr = document.getElementById("inputJob").insertRow(n);
	var Td = Tr.insertCell(n);
	for (var i=0;i<10;i++){
	Td.innerHTML = "姓名:<input type = text name = name size = 15>";
	var Tr = document.getElementById("inputJob").insertRow(n);
	var Td = Tr.insertCell(n);
	Td.innerHTML = "樂器:<input type = text name = talent size = 15>";
}*/

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

<body leftmargin=0 topmargin=0 bgproperties="fixed" rightmargin=0  bottommargin=0 marginwidth=0 marginheight=0>
<p>
<center>	 
<form action = "addband_act.php" name = "addband" method = "post" onSubmit="return check()" enctype = "multipart/form-data">
  <p>&nbsp;</p>
  <table border = "0" cellpadding="1" cellspacing="0" align="center" class="style1">
		<tr bgcolor="#372342">
			<td colspan = "3"><div align = "center"><strong>新增樂團</strong></div></td>
		</tr><tr><td colspan = "3" height = "1"></td></tr>
		<tr>
		  <td bgcolor="#503356"><div align = "center">樂團名稱</div></td><td width="0"></td>
		  <td bgcolor="#503356"><div align = "center">
		    <input type="text" size="44" name="bName"></div></td>
		</tr><tr><td colspan = "3" height = "1"></td>
		</tr>
		<tr>
		  <td bgcolor="#654563"><div align = "center">成立日期</div></td><td width="0"></td>
			<td bgcolor="#654563"><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="#886A81"><div align = "center">圖片</div></td><td width="0"></td>
		  <td bgcolor="#886A81"><div align = "center"><input type = "hidden" name = "MAX" value = "2048000"><input type="file" size="35" name="bPhoto[0]"></div></td>
		</tr><tr><td colspan = "3" height = "1"></td></tr>
		<tr>
		  <td bgcolor="#9F8796"><div align = "center">樂團簡介</div></td><td width="0"></td>
		  <td bgcolor="#9F8796"><div align = "center">
		    <textarea cols = "35" name = "bInfo" rows = "12"></textarea></div></td>
		</tr><tr><td colspan = "3" height = "1"></td></tr>
		<tr>
			<td bgcolor="#886A81">樂團成員</td>
			<td width="0"></td>
			<td bgcolor="#886A81"><div align = "center">
			<?  for($i = 1;$i <= $num; $i++){?>
					姓名: <input type = "text" size = "15" name = "name[<? echo $i;?>]"> 
					樂器: <input type = "text" size = "15" name = "talnet[<? echo $i;?>]"><br><? }?>
			<!--<input type = "hidden" name = "num" value = "<? //$num?>">
				<table id = "inputJob">
					<a href = "javascript:addRow(-1);">增加</a>
				</table>-->
		  </div></td>
		</tr><tr><td colspan = "3" height = "1"></td></tr>
		<tr bgcolor="#452B49">
			<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>