<html>
<head>
<title>
Admin view
</title>
</head>
<body style="background:lightyellow url(bgimage.jpg) repeat fixed center center;>

<table align="center" width=70% border=0>
<tr>
<td><img src="logo2_1200x150.jpg"></td>
</tr>
</table>
<hr width=100% align=center/>
<h2 align=center><i>Admin view </i></h2>
<?php
	echo "<h3 align=center> You are login as admin</h3><h4 align=center><a href=http://www.wauhaha.com/karaoke/index.php>Logout</a> | <u><a href=http://www.wauhaha.com/karaoke/adminaccount.php>Back Menu</u></a></h4>";
?>

<h3 align=center>Search for user detail</h3>
<?php echo"
<form action='http://www.wauhaha.com/karaoke/searching.php' method='post'>
<table border='1' cellspacing='0' cellpadding='5' bordercolorlight='tan' align=center>
<tr>
	<td>Search by:</td>
	<td><select name='searchBy'>
	<option value='Name'>Register Name</option>
	<option value='Username'>UserID</option>
	<option value='Email'>Email</option>
	</select>
	</td>
	<td rowspan='2'><input type='submit' name='search' value='Search'>&nbsp;&nbsp;&nbsp;&nbsp;
	
	</td>
</tr>
<tr>
	<td>Keywords:</td>
	<td><input type='text' name='keywords'></td>
</tr>
</table>

</form>";

?>

<h3 align=center>User detail</h3>
<?php

$result2 = mysql_query("SELECT * FROM regmember ORDER BY Username");

echo "<table border=1 align=center style ='font-family:Arial, Helvetica, sans-serif;font-size:1em' color='blue' bordercolorlight='tan' cellspacing=0 cellpadding=4>
 <tr bgcolor=lightblue><th>UserID</th>
							<th>regUser Name</th><th>Email</th><th>Phone</th><th>Handphone</th><th>Note</th><th>Delete</th><th>Edit</th></tr>";


while($row2 = mysql_fetch_array($result2)){
  $reguserid=$row2['Username'];
  
  echo"<tr>";
	
  echo "<td>".$row2['Username']."</td>";
  echo "<td>".$row2['Name']."</td>";
  echo "<td>".$row2['Email']."</td>";
  echo "<td>".$row2['Phone']."</td>";
  echo "<td>".$row2['Hphone']."</td>";
  echo "<td><a href=http://www.wauhaha.com/karaoke/delete.php?userid=$Username />delete</a></td>";
  echo "<td><a href=http://www.wauhaha.com/karaoke/edited.php?userid=$Username />Edit</a></td>";
  
  echo "</tr>";
 
  }
  echo "</table>";

mysql_close($login);
?>