| Current Path : /var/www/cesa.co.za/mentanet/ |
| Current File : /var/www/cesa.co.za/mentanet/sentmessages.php |
<?php
include("inc_functions.php");
if (!isset($_SESSION["StudentID"]) || empty($_SESSION["StudentID"])) header("Location: http://www.cesa.co.za/mentanet/login.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>MentaNet</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<!--[if IE 5]>
<style type="text/css">
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixLtHdr #sidebar1 { width: 230px; }
</style>
<![endif]--><!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
</head>
<body class="twoColFixLtHdr">
<div id="container">
<?php include("inc_header.php"); ?>
<?php include("inc_sidebar.php"); ?>
<div id="mainContent">
<h1> Sent Messages</h1>
<table width="700" border="1" cellpadding="5" cellspacing="0">
<tr>
<td width="25%" align="center"><a href="messages.php"><strong>Inbox</strong></a></td>
<td width="25%" align="center"><a href="modcontact.php"><strong>Compose Message</strong></a></td>
<td width="25%" align="center"><a href="sentmessages.php"><strong>Sent Items</strong></a></td>
<td width="25%" align="center"><strong><a href="archivedmessages.php">Archived Items</a></strong></td>
</tr>
</table>
<p>
<?php
$sql = "SELECT CCMMessages.* FROM CCMMessages
WHERE CCMMessages.SentByStudentID=".$_SESSION["StudentID"]."
ORDER BY SentDateTime DESC";
$rec=mysql_query($sql);
if (mysql_num_rows($rec)==0) {
echo "<p>You have no sent messages.</p>";
} else {
?>
</p>
<table border="1" cellpadding="5" cellspacing="0" width="700">
<tr><td><b>Date</b></td>
<td><b>To</b></td><td><b>Subject</b></td><td> </td></tr>
<?php
while ($row=mysql_fetch_assoc($rec)) {
?>
<tr><td><?php echo date("Y-m-d H:i", strtotime($row["SentDateTime"])); ?></td><td><?php echo $row["SentTo"]; ?></td><td><?php echo $row["MessageSubject"]; ?></td><td><a href="readmessage.php?id=<?php echo $row["CCMMessageID"]; ?>">Read Now</a></td></tr>
<?php
}
?>
</table>
<?php
}
mysql_free_result($rec);
?>
<p></p>
</div>
<?php include("inc_footer.php"); ?>
</div>
</body>
</html>