| Current Path : /var/www/cesa.co.za/mentanet/ |
| Current File : /var/www/cesa.co.za/mentanet/inc_sidebar.php |
<div id="sidebar1">
<!-- <p><a href="index.php"><img src="images/house.png" width="16" height="16" border="0" align="left" /> Home</a></p>
<p><a href="guidelines/mentanet_intro.html"><img src="images/information.png" width="16" height="16" border="0" align="left" /> Guidelines</a></p>
<p><a href="milestones.php"><img src="images/application_side_boxes.png" width="16" height="16" border="0" align="left" /> Milestones</a></p>
<p><a href="templates.php"><img src="images/application_side_boxes.png" width="16" height="16" border="0" align="left" /> Templates</a></p>
<p><a href="guidelines.php"><img src="images/application_side_boxes.png" width="16" height="16" border="0" align="left" /> Download Guidelines</a></p>
<p><a href="notices.php"><img src="images/book_open.png" width="16" height="16" border="0" align="left" /> Notice Board</a></p>
<p><a href="calendar.php"><img src="images/calendar.png" width="16" height="16" border="0" align="left" /> Calendar</a> </p>
<?php
if (($_SESSION["UserType"]=="M") || ($_SESSION["UserType"]=="E")) {
?>
<p><a href="ReportMilestones.php"><img src="images/book_open.png" width="16" height="16" border="0" align="left" /> Milestones Report</a></p>
<?php
}
?>
-->
<p><a href="messages.php"><img src="images/comment.png" width="16" height="16" border="0" align="left" /> Messages</a></p>
<p><a href="profile.php"><img src="images/group.png" width="16" height="16" border="0" align="left" /> Your Details</a></p>
<!-- <p><a href="gallery.php"><img src="images/image.png" width="16" height="16" border="0" align="left" /> Photo Gallery</a></p> -->
<!-- <p><a href="#" onclick="javascript:document.getElementById('forum').submit(); return false"><img src="images/group.png" width="16" height="16" border="0" align="left" /> Discussion Forum</a></p> -->
<p><a href="password.php"><img src="images/lock.png" width="16" height="16" border="0" align="left" /> Change Username / Password</a></p>
<p><a href="logout.php"><img src="images/arrow_undo.png" width="16" height="16" border="0" align="left"> Logout</a></p>
<p class="boldblue">New Messages</p>
<?php
if ($_SESSION["UserType"]=="C") $_SESSION["MessageType"]="Student";
if ($_SESSION["UserType"]=="M") $_SESSION["MessageType"]="Mentor";
if ($_SESSION["UserType"]=="E") $_SESSION["MessageType"]="Coordinator";
$sql = "SELECT CCMMessages.* FROM CCMMessages, CCMMessagesSentTo
WHERE CCMMessages.CCMMessageID=CCMMessagesSentTo.CCMMessageID
AND CCMMessagesSentTo.SentType='".$_SESSION["MessageType"]."'
AND CCMMessagesSentTo.SentID=".$_SESSION["StudentID"]."
AND CCMMessages.CCMMessageID NOT IN (SELECT CCMMessageID FROM CCMMessageLog WHERE ReadByType='".$_SESSION["MessageType"]."' AND ReadByID=".$_SESSION["StudentID"].")
ORDER BY SentDateTime DESC";
$rec=mysql_query($sql);
if (mysql_num_rows($rec)==0) {
echo "<p>You have no new messages.</p>";
} else {
while ($row=mysql_fetch_assoc($rec)) {
?>
<tr><td>· <?php echo date("Y-m-d", strtotime($row["SentDateTime"])); ?>: <?php echo $row["MessageSubject"]; ?><br />
<a href="readmessage.php?id=<?php echo $row["CCMMessageID"]; ?>"><strong>Read Now</strong></a><br />
<br />
<?php
}
}
mysql_free_result($rec);
?>
<form action="http://www.cesa.co.za/mentanet/forum/index.php?" method="post" id="forum" name="forum" target="_blank">
<input type="hidden" name="user_usr" value="<?php echo $_SESSION["ForumUsername"]; ?>">
<input type="hidden" name="user_pwd" value="<?php echo $_SESSION["ForumPassword"]; ?>">
<input type="hidden" name="mode" value="login">
<input type="hidden" name="queryStr" value="">
<input type="hidden" name="pagetype" value="index">
</form>
<!-- end #sidebar1 -->
</div>