My Inbox.php
<?php
include('core/init.inc.php');
$errors[] = array();
if(isset($_GET['delete_conversation']))
{
if(valididate_conversation_id($_GET['id']) == false){
$errors[] = 'Invalid conversation ID.';
}
if(empty($errors)){
delete_conversation($_GET['delete_conversation']);
}
}
$conversations = fetch_conversation_summary();
?>
<head>
<style type="text/css">
.unread
{
font-size: 80%;
font-family: "Courier New", Courier, monospace;
letter-spacing: 0.15em;
background-color: #efefef;
}
</style>
</head>
<a href="new_conversation.php">New Conversation</a>
<div>
<?php
foreach ($conversations as $conversation){
?>
<div class=" <?php if($conversation['unread_messages']) echo 'unread'; ?>">
<h2>
<a href="inbox.php&delete_conversation=<?php echo $conversation['id']; ?>">[x]</a>
<a href=""><?php echo $conversation['subject']; ?></a>
</h2>
<p>Last Reply: <?php echo date('d/m/Y H:i:s', $conversation['last_reply']); ?></p>
</div>
<?php
}
?>
</div>