<title>Inbox Details</title>
<div id="pagetitle">INBOX DETAILS</div>
<div id="batascontent" class="clearfix">
	<?php 
		$id = mysqli_real_escape_string($koneksi, $_GET['id']);
		$db = mysqli_query($koneksi, "SELECT * FROM cmas_pesan WHERE pesan_id='$id'");
		$dt = mysqli_fetch_array($db);
		
		mysqli_query($koneksi, "UPDATE cmas_pesan SET pesan_status='0' WHERE pesan_id='$id'");
	?>
	<div id="wrapgsetting" class="clearfix">
		<div id="gsetting" class="clearfix">
			<div id="gsettinglabel">From</div>
			<div id="gsettinginput">
				<?php echo $dt['pesan_name']; ?> [<?php echo $dt['pesan_email']; ?>]
			</div>
		</div>
		<div id="gsetting" class="clearfix">
			<div id="gsettinglabel">Subject</div>
			<div id="gsettinginput">
				<?php echo $dt['pesan_subject']; ?>
			</div>
		</div>
		<div id="gsetting" class="clearfix">
			<div id="gsettinglabel">Message</div>
			<div id="gsettinginput">
				<?php echo $dt['pesan_message']; ?>
			</div>
		</div>
		<div id="gsetting" class="clearfix">
			<div id="gsettinglabel">Date</div>
			<div id="gsettinginput">
				Send by <?php echo $dt['pesan_ip']; ?> on <?php echo date_format(date_create($dt['postdated']), 'd/m/Y H:i:s'); ?>
			</div>
		</div>
	</div>	
	<div id="tombolsubmit">
		<a href="?m=pesan_index"><input name="Button" type="button" value="KEMBALI" class="myButton"/></a>
		<a href="mailto:<?php echo $dt['pesan_email']; ?>"><input name="submit" type="submit" value="BALAS" class="submitbutton"/></a>
	</div>
</div>
