<html>
<head>
<title>Add Credit</title>
</head>
<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">
<center>
<table>
	<tr>	
		<td><a href="http://www.wauhaha.com/karaoke/adminaccount.php"><img src=admin.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/adminviewmem.php"><img src=member.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/adminviewstaff.php"><img src=staff.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/dutytime.php"><img src=duty.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/salary.php"><img src=salary.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href=adminhistory.php><img src=leave.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href=adminhistory.php><img src=job.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href=adminhistory.php><img src=advertisement.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/room.php"><img src=room.gif width=140 height=140 border=0/><br/></a></td>
		
	</tr>
</table>
</center>
<center><h2>Admin Edit Credit</h2></center>
<center><a href='http://www.wauhaha.com/karaoke/credit.php'>Back</a></center>
<?php
$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);
$time_offset ="240"; 
$time_a = ($time_offset * 120);
$time = date(("F,j,Y, g:i a"),time() + $time_a);
	
$CreNum=$_GET['CreNum'];
$result2 = mysql_query("SELECT * FROM credittran Where CreNum='$CreNum' ");
if($row2 = mysql_fetch_array($result2)){
$Name=$row2["Name"];
$Credit = $row2["Credit"];
$MemID = $row2["MemID"];

echo "<center><form method=post action=admineditcreaction.php?CreNum=$CreNum>
		<table style='font-size:20pt'>
		<tr>
		<td>Transaction ID:</td>
		<td>$CreID</td>
		</tr>
		<tr>
		<td>Member ID:</td>
		<td>$MemID</td>
		</tr>
		<tr>
		<td>Member Name:</td>
		<td>$Name</td>
		</tr>
		<tr>
		<td>Balance Credit:</td>
		<td><input type=text name=balcredit value=".$row2['BalCredit']." ></td>
		</tr>
		<tr>
		<tr>
		<td>Add Credit Date:</td>
		<td>".$row2['AddCreditD']."</td><input type=hidden name=addcreditd value=".$row2['AddCreditD']." >
		</tr>
		<tr>
		<td>Add Credit:</td>
		<td><input type=text name=val1 size=10 value=".$row2['AddCredit']."></td>
		</tr>
		<tr>
		<td>Edit Date:</td>
		<td>$time</td>
		</tr>
		<tr><td colspan=2><center><input type=submit name=submit value=Edit></center></td></tr></table></form></center>";
		}
?>
</body>
</html>