<?php
include("../../session.php");
include("../../connect.php");

$user=$_SESSION["agent"];
$id=$_GET["id"];
//echo "admin success!!!";
				
?>
<html>
<head>
<link href="../header.css" rel="stylesheet" type="text/css"/>
<link type="text/css" rel="stylesheet" href="../overflow.css" />
<script type="text/javascript" src="../jquery.js"></script>
 <link rel="stylesheet" type="text/css" href="facebox/facebox.css" />
<script language="javascript" src="facebox/facebox.js"></script>
<script language="javascript">
$(document).ready(function() {
    $('a[rel*=facebox]').facebox();
})
</script>
</head>
<body>
<div id="content2">
<!-----------------Outer table--------------->
<table width=1000 border=0 cellspacing=10 cellpadding=3 >
<tr>
	<td colspan=2 >
	<?php include("../head.php");?>
	</td>
	</tr>
<tr>
	<td colspan=2>
	<div class=main>&nbsp;&nbsp;>>
			<a href="<?php echo"../agent.php";?>">&nbsp;Home&nbsp;</a>>>
			<a href="<?php echo"cFeedback.php";?>">&nbsp;Company Feedback&nbsp;</a>>>
			<a href="<?php echo"sendbox.php";?>">&nbsp;Send&nbsp;</a>>>
			<a href="<?php echo"sendView.php";?>">&nbsp;Mail <b><?php echo $id;?></b>&nbsp;</a>
			</div></td>
	</tr>
<tr>
	<td width=280 valign=top>
	<!-----------Inner table 1----------------->
	<?php include("feedbackSide.php")?>
	<!-----------------End inner table 1----------------------->
	</td>
	<td valign=top>
	<!--------------------Inner table 2----------------------->
	<?php 
	$query1=mysql_query("SELECT * from send where sendBy='$user'and sendID='$id'");
	$display=mysql_fetch_array($query1);
	$id=$display['sendID'];
	$sendTo=$display['sendTo'];
	$time=$display['time'];
	$date=$display['date'];
	$title=$display['title'];
	$content=$display['content'];
	$status=$display['status'];
	
	?>
	<h3>Message Details</h3>
	<form>
	<table width=700 cellpadding=8 border=1>
	<tr>
		<td width=120>Send ID :</td>
		<td><b><?php echo $id;?></b></td>
		</tr>
	<tr>
		<td>Receive Time :</td>
		<td><?php echo "$date&nbsp;&nbsp;&nbsp;$time";?></td>
		</tr>
	<tr>
		<td>Send To :</td>
		<td><a href='<?php echo "../cDetail.php?id=$sendTo&user=$user"?>' rel='facebox'><?php echo "$sendTo";?></a></td>
		</tr>
	<tr>
		<td>Title :</td>
		<td><?php echo $title;?></td>
		</tr>
	<tr>
		<td>Content :</td>
		<td><textarea rows=5 cols=70 readonly=readonly><?php echo $content;?></textarea></td>
		</tr>
	<tr>
		<td colspan=2 align=center>
			<input type="hidden" name="user" value="<?php echo $user;?>" />
			<input type="button" value="Back" onClick="backFunction(user.value)"/>
		</td>
		</tr>
	<tr>
		<td colspan=2>
		<div id="hide"></div>
		</td>
		</tr>
	</table>
	</form>
	<!----------------------End inner table 2-------------------->
	
	</td>
	</tr>
</table>
</div>
<!-----------------------End outer table-------------------------->
<script type="text/javascript">
function backFunction(user)
{
	window.location="sendbox.php?user="+user;
}
function promptClick()
{


}

</script>



</body>
</html>