<?php
include("_confirm.php");
error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);
global $q;
date_default_timezone_set('UTC');
?>
<br />
<table cellspacing="0" cellpadding="0" class="forums forums_new" align="center" >
 <tr>
  <td class="alt5"><?php echo $q['username']; ?></td>
 </tr>
 <tr>
  <td class="alt8">
   <table width="100%" cellpadding="0" cellspacing="0" class="profile_table" >
    <tr>
     <td colspan="2" align="left" valign="top" class="profile_table_head"><b><i>Member #<?php echo $q['id']; ?></i></b></td>
    </tr>
    <tr>
     <td width="30%" align="left" valign="top" class="profile_table_L"><b>Firstname</b></td>
     <td width="70%" align="left" valign="top"><?php echo $q['fname']; ?></td>
    </tr>
    <tr>
     <td align="left" valign="top" class="profile_table_L"><b>Lastname</b></td>
     <td align="left" valign="top"><?php echo $q['lname']; ?></td>
    </tr>
    
    <tr>
     <td colspan="2" align="left" valign="top" class="profile_table_head"><b><i>Messengers</i></b></td>
    </tr>
    <tr>
     <td align="left" valign="top" class="profile_table_L"><b>AIM</b></td>
     <td align="left" valign="top"><?php echo $q['aim']; ?></td>
    </tr>
    <tr>
     <td align="left" valign="top" class="profile_table_L"><b>MSN</b></td>
     <td align="left" valign="top"><?php echo $q['msn']; ?></td>
    </tr>
    <tr>
     <td align="left" valign="top" class="profile_table_L"><b>YIM</b></td>
     <td align="left" valign="top"><?php echo $q['yim']; ?></td>
    </tr>
    <tr>
     <td align="left" valign="top" class="profile_table_L"><b>ICQ</b></td>
     <td align="left" valign="top"><?php echo $q['icq']; ?></td>
    </tr> 
    <tr>
     <td align="left" valign="top" class="profile_table_L"><b>Avatar</b></td>
     <td align="left" valign="top"><img src="<?php
$avat = $q['avatar'];
$avat = htmlspecialchars($avat);
$file = $avat;
 if (!preg_match("/^.*\.gif/",$file)) {
  if (!preg_match("/^.*\.jpg/",$file)) {
   if (!preg_match("/^.*\.png/",$file)) {
    $avat = "templates/{$pageInfo['theme']}/images/noavatar.gif";
   }
  }
 }
echo $avat;
?>" width="64" height="64"></td>
    </tr> 
    <tr>
     <td align="left" valign="top" class="profile_table_L"><b>Signature</b></td>
     <td align="left" valign="top"><?php
$sig = stripslashes($q['sig']);
$sig = htmlspecialchars($sig);
echo $sig;
?></td>
    </tr> 
    <tr>
<?php 
$q2 = mysqli_query($connection,"SELECT * FROM `posts` WHERE posterId='{$q['id']}'");
$posts = mysqli_num_rows($q2);
  

?>
     <td align="left" valign="top" class="profile_table_L"><b>Posts</b></td>
     <td align="left" valign="top"><?php echo $posts; ?></td>
    </tr>
    <tr>
     <td align="left" valign="top" class="profile_table_L"><b>Registered On</b></td>
     <td align="left" valign="top"><?php echo date("F j, Y g:ia", $q['reggedOn']); ?></td>
    </tr>
    <tr>
     <td align="left" valign="top" class="profile_table_L"><b>Rank</b></td>
     <td align="left" valign="top"><?php echo $q['title']; ?></td>
    </tr>
    <tr>
     <td align="left" valign="top" class="profile_table_L"><b>Custom Title</b></td>
     <td align="left" valign="top"><?php
$subtitle = stripslashes($q['subtitle']);
$subtitle = htmlspecialchars($subtitle);
echo $subtitle;
?></td>
    </tr>
   </table>
  </td>
 </tr>
</table><br />