<?php
session_start();
session_register('staff');
include ("connect.php");

if($_SESSION['staff']!= null)
{
?>
<html>
<head>
<title>Daily Bookstore - Management System</title>
<!--include css file-->
<link href="bookstaff.css" rel="stylesheet" type="text/css"/>
</head>

<body>

<?php
include ("stafffunctionbar.php");
?>

</center>

<hr/>
<center>
<h2>Member Detail</h2>
</center>

<div id="mainpage">
<table width="90%">
<tr>
<td width="15%" valign="top">
<fieldset style="margin:0 5 0 0">
<legend><img src="Picture/member.gif" width="30" height="30">Manage Member</legend>
<table>
<tr>
<td valign="top">
<a href="memlist.php"><img src="Picture/list.gif" width="30" height="30" alt="member list"><a href="memlist.php">Member List</a><br/>
<br/>
<a href="newmem.php"><img src="Picture/add.gif" width="30" height="30" alt="approve member"><a href="newmem.php">Approve Member</a><br/>
<br/>
</td>
</tr>
</table>
</fieldset>
</td>

<td width="75%">
<?php
include ("connect.php");



$memberLname=$_GET['memberLname'];

$result = mysql_query("SELECT * FROM membership WHERE memberLname = '$memberLname'");

$row = mysql_fetch_array($result);

echo "<fieldset style='width:80%' align='center'>";
echo "<legend><img src='Picture/member.gif' width='30' height='30'><b>New Member Information</b></legend><br>";

echo "<table width='80%' cellspacing='0' cellpadding='5' border='0' align='center'>";
echo "<tr>";
echo "<td></td>"; 
echo "<td>Login Name</td>"; 
echo "<td>".$row["memberLname"]."";
echo "</td>";
echo "</tr>";
		
echo "<tr>"; 
echo "<td valign='top'></td>";
echo "<td valign='top'>Name</td>"; 
echo "<td>".$row["memberName"].""; 
echo "</tr>";

echo "<tr>";
echo "<td valign='top'></td>";
echo "<td valign='top'>NRIC</td>";
echo "<td>".$row["memberICDate"]."-";
echo "".$row["memberICState"]."-";
echo "".$row["memberICNo"]."";
echo "</tr>";
		
echo "<tr>";
echo "<td></td>";
echo "<td valign='top'>Date of Birth<br/>(DD/MM/YYYY):	</td>";
echo "<td>"; 
echo "".$row["memberBdate"]."";
echo "</tr>";
		
echo "<tr>";
echo "<td></td>";
echo "<td>Gender:</td>";
echo "<td><table border='0'>";
echo "<tr><td>".$row["memberSex"]."</td></tr>";
echo "</table>";
echo "</tr>";
			
echo "<tr>";
echo "<td valign='top'></td>";
echo "<td valign='top'>Race:</td>";
echo "<td>".$row["memberRace"]."</td>";
echo "</tr>";
			
echo "<tr>";
echo "<td valign='top'></td>";
echo "<td valign='top'>Address :</td>";
echo "<td valign='top'>".$row["memberAddress"]."</td>";
echo "</tr>";
			
echo "<tr>";
echo "<td valign='top'></td>";
echo "<td valign='top'>Post Code :</td>";
echo "<td>".$row["memberPcode"]."</td>";
echo "</tr>";

echo "<tr>";
echo "<td valign='top'></td>";
echo "<td valign='top'>City :</td>";
echo "<td>".$row["memberCity"]."</td>";
echo "</tr>";

echo "<tr>";
echo "<td valign='top'></td>";
echo "<td valign='top'>State :</td>";
echo "<td>".$row["memberState"]."</td>";
echo "</tr>";
		
echo "<tr>";
echo "<td valign='top'></td>";
echo "<td valign='top'>Contact :</td>";
echo "<td><table>";
echo "<tr><td>Home :</td>";
echo "<td>".$row["memberHnum1"]."-";
echo "".$row["memberHnum2"]."</td>";
echo "</tr>";

echo "<tr>";
echo "<td>Handphone :</td>";
echo "<td>".$row["memberHpnum1"]."-";
echo "".$row["memberHpnum2"]."";
echo "</td>";
echo "</table></td>";
echo "</tr>";

echo "<tr>";
echo "<td></td>";
echo "<td valign='top'>Email :</td>";
echo "<td>".$row["memberEmail"]."</td>";
echo "</tr>";

echo "<tr>";
echo "<td></td>";
echo "<td valign=''top>Daily Point :</td>";
echo "<td>".$row["memberpoint"]."</td>";
echo "</tr>";
		
echo "<tr>";
echo "<td></td>";
echo "<td></td>";
echo "<td><br>";
echo "<INPUT TYPE='button' VALUE='Back' onClick='history.go(-1);return true;'/>";
echo "</td>";
echo "</tr>";
	
echo "</table>";
echo "</fieldset>";
echo "</form>";
}else{
	echo "<script language='javascript'>alert ('Please login.')</script>";
	echo "<script language='javascript'>window.location='index.php'</script>";
}
?>
</td>
</tr>
</table>
<hr/>

<center>
<div id="bottom">
<br/>
Copyright &#169; with Tian Tian Bookstore 2011. All Rights Reserved.
<br/>
Website:<a href="../bookstore" target="_blank">www.dailybook.com.my
</div>
</center>

</body>
</html>