<table class="boardtable" cellpadding="6" cellspacing="0" align="center" width="100%">
  <caption><a name="<?php echo $msg_id;?>" id="<?php echo $msg_id;?>" /></caption>
  <tr>
    <td style="padding:0px; border-bottom: 0.1em solid #FFFFFF" bgcolor="#E8E9E3">
      <table cellpadding="0" cellspacing="0" width="100%" >
        <tr>
          <td nowrap="nowrap" valign="top" width="71" style="padding:2px; border-right: 0.1em solid #FFFFFF"  bgcolor="#E8E9E3">
            <?php echo $msg_avatar;?>
          </td>
          <td>
             <table width="100%" cellpadding="0" cellspacing="0" >
               <tr>
                  <td nowrap="nowrap" valign="top" style="padding:2px; border-bottom: 0.1em solid #FFFFFF" colspan="4" >
                     <span style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; font-weight: bold; color: #ff6600;">
                        <?php echo $msg_subject;?>
                     </span>
                  </td>
               </tr>
               <tr>
                  <td nowrap="nowrap" valign="top" style="padding:2px; border-bottom: 0.1em solid #FFFFFF" width="120">
                     <span style="font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: bold; color: #8B8B8B;">
                        Date: <?php echo $msg_date;?>
                     </span>
                  </td>
                  <td nowrap="nowrap" valign="top" style="padding:2px; border-left: 0.1em solid #FFFFFF; border-bottom: 0.1em solid #FFFFFF" width="140">
                    <span style="font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: bold; color: #8B8B8B;">
                       By: <?php echo $msg_username;?>
                    </span>
                  </td>
                  <td nowrap="nowrap" valign="top" style="padding:2px; border-left: 0.1em solid #FFFFFF; border-bottom: 0.1em solid #FFFFFF">
                     <span style="font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: bold; color: #8B8B8B;">
                        Status: <?php echo $msg_usertype;?>
                     </span>
                  </td>
                  <td nowrap="nowrap" valign="middle" style="padding:2px; border-left: 0.1em solid #FFFFFF; border-bottom: 0.1em solid #FFFFFF" width="90">                    
                     <?php if($msg_ip) echo $msg_ip_link.'<span style="font-family: Arial, Helvetica, sans-serif; font-size: 7pt; font-weight: bold; color: #8B8B8B;"">'.$msg_ip.'</span></a>'; else echo '&nbsp;';?>
                  </td>
               </tr>
               <tr>
                  <td nowrap="nowrap" valign="top" style="padding:2px;" width="120">
                     <span style="font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: bold; color: #8B8B8B;">
                        <?php if($msg_karma) echo $msg_karma.'&nbsp&nbsp'.$msg_karmaplus.' '.$msg_karmaminus; else echo '&nbsp;';?>
                     </span>
                  </td>
               </tr>
             </table>
          </td>
          <td nowrap="nowrap" valign="top"  width="90" align="left" style="padding:3px; border-left: 0.1em solid #FFFFFF">
            <?php if($msg_userrank) echo $msg_userrank.'<br />';?>
            <?php if($msg_userrankimg) echo $msg_userrankimg.'<br />';?>
            <?php if($msg_posts) echo "Posts: $msg_posts<br />";?>
            <?php if($useGraph) $myGraph->BarGraphHoriz();?>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td style="padding:4px; border-bottom: 0.1em solid #FFFFFF" bgcolor="#E8E9E3">
      <?php echo $msg_text;?>
      <?php if($msg_signature) {
         echo '<hr color="#F6F6FF" width="40%" align="left"/>';
         echo $msg_signature;
         } ?>
      <!--<hr color="#FFFFFF" />-->
    </td>
   </tr>
   <tr>
    <td style="padding:2px; border-bottom: 0.1em solid #FFFFFF" bgcolor="#E8E9E3" valign="bottom">
      <table cellspacing="0" cellpadding="0" width="100%">
         <tr>
            <td align="left"> 
               <?php if($msg_aim) echo $msg_aim;?>
               <?php if($msg_icq) echo $msg_icq;?>
               <?php if($msg_msn) echo $msg_msn;?>
               <?php if($msg_yahoo) echo $msg_yahoo;?>
               <?php if($msg_pms) echo $msg_pms;?>
               <?php if($msg_profile) echo $msg_profile;?>
               <?php if($msg_regdate) echo "<br />Join Date: " . strip_tags($msg_date) . "<br />";?>
               <?php if($msg_loc) echo "Location: $msg_loc<br />";?>

            </td>
            <td align="right">
               <?php
               if($sbIcons['reply']) {
			   		if ($msg_closed == "") {
	                    echo $msg_reply;
    	                echo " ".$msg_quote;
	               		if ($msg_delete) echo " ".$msg_delete;
						if ($msg_move) echo " ".$msg_move;
	               		if ($msg_edit) echo " ".$msg_edit;
	               		if ($msg_sticky) echo " ".$msg_sticky;
	               		if ($msg_lock) echo " ".$msg_lock;
						}
					 else {
	               		echo $msg_closed;
					 }
                 }
                 else {
	                if ($msg_closed == "") {
						echo $msg_reply;?> | <?php echo $msg_quote;
	               		if ($msg_delete) echo " | ".$msg_delete;
						if ($msg_move) echo " | ".$msg_move;
		               	if ($msg_edit) echo " | ".$msg_edit;
		           		if ($msg_sticky) echo " | ".$msg_sticky;
		           		if ($msg_lock) echo "| ".$msg_lock;
					}
					else {
						echo $msg_closed;
					}
                 }
               ?>
            </td>
         </tr>
      </table>
    </td>
  </tr>
</table>
<br />

<?php
// --------------------------------------------------------------
//  Legend to the variables used
// --------------------------------------------------------------
// $msg_id          = Message ID#
// $msg_username    = Username (with email link if enabled)
// $msg_avatar      = User Avatar
// $msg_usertype    = User Type (Visitor/Member/moderator/Admin)
// $msg_userrank    = User Rank
// $msg_userrankimg = User Rank Image
// $msg_posts       = Post Count
// $msg_karma       = Karma Points
// $msg_karmaplus   = Linked Image for Karma+
// $msg_karmaminus  = Linked Image for Karma-
// $msg_ip          = IP of Poster
// $msg_ip_link     = Link to look up IP of Poster
// $msg_date        = Date of Post
// $msg_subject     = Post Subject
// $msg_text        = Post Text
// $msg_signature   = User's Signature
// $msg_reply       = Reply Option
// $msg_quote       = Quote Option
// $msg_edit        = Edit Option
// $msg_closed      = Locked/Diabled message
// $msg_delete      = Delete Option
// $msg_sticky      = Sticky/Unsticky Option
// $msg_lock        = Lock/Unlock Option
// $msg_aim         = User's AIM
// $msg_icq         = User's ICQ#
// $msg_msn         = User's MSN
// $msg_yahoo       = User's Yahoo
// $msg_profile     = Image link to user's Profile Page
// $msg_pms         = Linked image for PMS2
// $msg_buddy       = Add buddy image link
// $msg_loc         = User's Location
// $msg_regdate     = User's Registration Date 
// $tabclass[$k]    = CSS Class for TD (use to alternate colors)
// sb_messagebody   = CSS Class for post text
// sb_signature     = CSS Class for signature
?>