<?php echo getNewMessageCount($user->ID); ?> </font></a> unread messages of <font size="3" color="RED"><?php echo getMessagesCount($user->ID); ?> </font> Messages <p> <? if ($cgi['type'] == 'delete') { deleteOutMessage($cgi['id']); } if ($cgi['type'] == 'view') { $mes = getOutMessage($cgi['id']); if ($mes->userID != $_SESSION['isLogined']) { echo "<b><font color=red>You are not allowed to view other peoples messages!</font></b><br /><br />"; } else { echo "<b>Subject: " . $mes->subject . "</b><br><br>"; echo "<b>Message text:</b><br><br>"; echo $mes->text; } } else { ?> <table width="100%" bgcolor="#000000" border="0" cellspacing="6" cellpadding="6"> <tr> <th>To</th> <th>Subject</th> <th>Sent</th> <th>Delete</th>
function deleteOutMessage($mesID) { $mess = getOutMessage($mesID); If ($mess->userID == $_SESSION['isLogined']) { $str = "DELETE FROM `outbox` WHERE ID='$mesID'"; //echo $str; $q = @mysql_query($str); } }