if ($unread) { // Show most recent unread, up to 3, if there are any $recent = $unread > 3 ? 3 : $unread; if ($recent > 1) { echo ' Your most recent '.$recent.' unread messages are:'; } echo '<div style="clear:both; margin-top:6px;">'; $recent_mail = $wps_mail->get_inbox($recent, 0, 18, "", true, 0, true); foreach($recent_mail as $mail) { echo '<div class="my-mail-row">'; echo '<div class="my-mail-row-avatar">'; echo $mail['avatar']; echo '</div>'; echo '<div class="my-mail-row-from-and-subject">'; echo $mail['display_name_link'].'<br />'; echo '<a href="'.$wps->get_mail_url().'?mail_id='.$mail['mail_id'].'">'.$mail['mail_subject'].'</a>'; echo '</div>'; echo '</div>'; } echo '</div>'; } echo '</div>'; } } echo '</div>'; echo '</div>'; // The member's page "header" echo '<div id="my-header-div">';
} } // Show boxes $override_hidden_state = ($action != 'inbox' && $action != 'sent') ? "display:none;" : ''; echo '<div id="my-boxes-choice" style="'.$override_hidden_state.'">'; if ($action != 'sent') { echo '<strong>In Box</strong> | '; echo '<a href="'.$wps->get_mail_url().'?action=sent&start=0">Sent</a>'; } else { echo '<a href="'.$wps->get_mail_url().'?action=inbox&start=0">In Box</a> | '; echo '<strong>Sent</strong>'; } echo '</div>'; // Compose new mail form if ($action != 'reply') {
echo '<div class="my-inbox-avatar">'; echo $mail['avatar']; echo '</div>'; echo $mail['display_name_link']; echo '</div>'; echo '<div class="my-inbox-message">'; echo '<div class="my-inbox-subject">'; echo '<a href="'.$wps->get_mail_url().'?mail_id='.$mail['mail_id'].'">'.$mail['mail_subject'].'</a>'; echo '</div>'; echo $mail['mail_message']; echo '</div>'; $dt=explode(' ',$mail['mail_sent']); $d=explode('-',$dt[0]); $t=explode(':',$dt[1]); echo '<div class="my-inbox-sent">';