<div id="left">
	<div align="center">
		<?php
		if(!isset($_SESSION["user"])) {  
			echo '<span style="font-size:200%;">You must Register or log in to view member profiles.</span>';
		} else {
		$id = yasDB_clean($_GET['id']);

		$query = yasDB_select("SELECT * FROM `user` WHERE id = '$id'");
		$row = $query->fetch_array(MYSQLI_ASSOC);
		$joined = date('m/d/y',$row['date']) ;
		$points = $row['plays']*50;
		$website = '';
		if ( $row['website'] != '') {$website = '<a href="'.$row['website'].'" target="_blank">Website</a><br/>'; } ;
		if ( $row['location'] != '') {$location = 'Location: '. $row['location'].'<br/>'; } ;
		if ( $row['job'] != '') {$occupation = 'Occupation: '. $row['job'].'<br/>'; } ;
		if ( $row['useavatar'] == '1' ) {
			$avatarimage = $setting['siteurl'] . 'avatars/' . $row['avatarfile'];
		}
		else { 
			$avatarimage = $setting['siteurl'] . 'avatars/useruploads/noavatar.JPG';
		}
		?>
		<table class="dataTable" cellspacing="0" cellpadding="0" border="1" width="95%" >
		<tr><th colspan="2" align="center">About Me </th></tr>
		<tr><td width="40" valign="top" align="center">Username: <?php echo $row['username'];?><br/>
		<img src="<?php echo $avatarimage;?>" height="100" width="100"><br/>
		<?php
		if ($setting['seo'] == 'yes') {
			echo '<a href="'.$setting['siteurl'].'profile.html">Edit Profile</a>';
		} else {
			echo '<a href="'.$setting['siteurl'].'index.php?act=profile">Edit Profile</a>';
		}
		?>
		<?php echo $website;?><hr> Age: <?php echo $row['age']?$row['age']:'N/A';?>
		</td><td valign="top" align="left"> <?php echo $row['aboutme'];?>&nbsp;<br/></td></tr>
		<tr><th colspan="2"  align="center">My Info: </th></tr>
		<tr><td valign="top" align="left">Location:</td><td valign="top" align="left"> <?php echo $row['location']?$row['location']:'N/A';?>&nbsp; </td></tr>
		<tr><td valign="top" align="left">Joined:</td><td valign="top" align="left"><?php echo $joined;?> &nbsp;   </td></tr>
		<tr><td valign="top" align="left">Plays:</td><td valign="top" align="left"><?php echo $row['plays'];?> &nbsp;   </td></tr>
		<tr><td valign="top" align="left">Points:</td><td valign="top" align="left"><?php echo $points;?> &nbsp;   </td></tr>
		<tr><td valign="top" align="left">Occupation:</td><td valign="top" align="left"><?php echo $row['job']?$row['job']:'N/A';?> &nbsp;   </td></tr>
		<tr><th colspan="2"  align="center">Contact Info: </th></tr>
		<tr><td valign="top" align="left">AIM:</td><td valign="top" align="left"><?php echo $row['aim']?$row['aim']:'N/A';?> &nbsp;  </td></tr>
		<tr><td valign="top" align="left">MSN:</td><td valign="top" align="left"><?php echo $row['msn']?$row['msn']:'N/A';?> &nbsp;   </td></tr>
		<tr><td valign="top" align="left">Skype:</td><td valign="top" align="left"><?php echo $row['skype']?$row['skype']:'N/A';?> &nbsp;   </td></tr>
		<tr><td valign="top" align="left">Yahoo:</td><td valign="top" align="left"><?php echo $row['yahoo']?$row['yahoo']:'N/A';?> &nbsp;   </td></tr>
		<tr><th colspan="2"></th></tr></table>	
		<?php
	}
	?>
	<br/>
</div>