Location: PHPKode > projects > SiteX > admin/profile_view.php
<?PHP
ob_start();
session_start();
include("../includes/globals.php.inc");
include("../includes/functions.php");
include("../lang/English.php");
if(strtolower($sxSetup['Language']) != 'english') include("../lang/".$sxSetup['Language'].".php");
include("../themes/$THEME_FOLDER/config.php.inc");

if(!loggedIn())
	loginError($sxLang['LoginRequired']);

$sxTitleAddendum = $sxLang['AdminHeading'];
include("../themes/$THEME_FOLDER/header.php");

$query = "SELECT * FROM $DB_Users WHERE username='$user'";
$result = mysql_query($query, $Link) or queryError("403", mysql_error());
$ROW = mysql_fetch_object($result);
?>   
<div class="bodyWrapper">
  <h1 class="sxAdminHeading"><?PHP echo $sxLang['UserMemberInfo']; ?></h1>
  <?PHP echoMessage($message); ?>
  <table width="500" border="0" cellspacing="0" cellpadding="5">
	<?PHP if(($ROW->avatar)AND($sxSetup['UserAvatar'])){ ?><tr> 
	  <td>&nbsp;</td>
	  <td><img alt="Avatar" src="<?PHP echo "../".$sxContentDir['Avatar'].$ROW->avatar; ?>" /></td>
	</tr><?PHP } ?>
	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['UserItemUsername']; ?></td>
	  <td><?PHP echo htmlspecialchars($ROW->username); ?></td>
	</tr>
	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['UserItemFullName']; ?></td>
	  <td><?PHP echo htmlspecialchars($ROW->firstname) . ' ' . htmlspecialchars($ROW->lastname); ?></td>
	</tr><?PHP if($ROW->showemail == 1){ ?>
	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['UserItemEmail']; ?></td>
	  <td><a href="mailto:<?PHP echo $ROW->email; ?>" rel="nofollow" target="_blank"><?PHP echo htmlspecialchars($ROW->email); ?></a></td>
	</tr>
	<?PHP } if($ROW->website){ ?>
	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['UserItemWebsite']; ?></td>
	  <td><a href="http://<?PHP echo str_replace("http://", "", $ROW->website); ?>" rel="nofollow" target="_blank">http://<?PHP echo str_replace('http://', '', htmlspecialchars($ROW->website)); ?></a></td>
	</tr>
	<?PHP } if($ROW->skypeid AND($sxSetup['UserSkype'])){ ?>
	<!--
Skype 'Skype Me™!' button
http://www.skype.com/go/skypebuttons
-->

	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['UserItemSkypeID']; ?></td>
	  <td><?PHP echo htmlspecialchars($ROW->skypeid); ?></td>
	</tr>
	<?PHP } if($ROW->msnid AND($sxSetup['UserSkype'])){ ?>
	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['UserItemMSNID']; ?></td>
	  <td><?PHP echo htmlspecialchars($ROW->msnid); ?></td>
	</tr>
	<?PHP } if($ROW->bio AND($sxSetup['UserSkype'])){ ?>
	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['UserItemBio']; ?></td>
	  <td><?PHP echo htmlspecialchars($ROW->bio); ?></td>
	</tr>
	<?PHP } if($ROW->location){ ?>
	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['UserItemLocation']; ?></td>
	  <td><?PHP echo htmlspecialchars($ROW->location); ?></td>
	</tr>
	<?PHP } ?>
	<tr> 
	 <td class="sxTdItem"><?PHP echo $sxLang['UserItemUserType']; ?></td>
	  <td><?PHP
		$query2 = "SELECT * FROM $DB_Users, $DB_Users_Assoc, $DB_Users_Types
				  WHERE $DB_Users.username='$user' AND
						$DB_Users.id=$DB_Users_Assoc.userid AND
						$DB_Users_Assoc.typeid=$DB_Users_Types.id";
		$result2 = mysql_query($query2, $Link) or queryError("402", mysql_error());
		while($ROW2 = mysql_fetch_object($result2)){
			echo $ROW2->name . '<br />'."\n";
		}
	  ?></td>
	</tr>
	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['ForumItemPosts']; ?></td>
	  <td><?PHP
		$query2 = "SELECT * FROM $DB_Forums_Posts WHERE userid='$ROW->id'";
		$result2 = mysql_query($query2, $Link) or queryError("401", mysql_error());
		echo number_format(mysql_num_rows($result2));
	  ?></td>
	</tr>
	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['UserItemMemberSince']; ?></td>
	  <td><?PHP
		$query2 = "SELECT * FROM $DB_Users WHERE id='$ROW->id'";
		$result2 = mysql_query($query2, $Link) or queryError("400", mysql_error());
		$ROW2 = mysql_fetch_object($result2);
		echo fetchDate($ROW2->membersince, 1, 1);
	  ?></td>
	</tr>
	<tr> 
	  <td class="sxTdItem"><?PHP echo $sxLang['UserItemLastLogin']; ?></td>
	  <td><?PHP
		$query2 = "SELECT * FROM $DB_Users WHERE id='$ROW->id'";
		$result2 = mysql_query($query2, $Link) or queryError("400", mysql_error());
		$ROW2 = mysql_fetch_object($result2);
		if($ROW2->lastlogin > 0) echo fetchDate($ROW2->lastlogin, 1, 1);
		else echo "&nbsp;";
	  ?></td>
	</tr>
  </table>
  <?PHP if(userAdmin())
  			echo '<p><a href="user_edit.php?edit_userid=' . $ROW->id . '">' . $sxLang['UserButtonEdit'] . '</a></p>'; ?>
</div>
<?PHP
include("../themes/$THEME_FOLDER/footer.php");
ob_end_flush();
?>
Return current item: SiteX