<?php

// -----------------------------------------------------------------------
// This file is part of aroundme
// 
// Copyright (C) 2003, 2005 Barnraiser
// http://www.barnraiser.org/
// info@barnraiser.org
// 
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option) any
// later version.
// 
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with program; see the file COPYING. If not, write to the Free
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
// -----------------------------------------------------------------------

?>


<?php
if (isset($profile['profile_id'])) {
?>

<div id="box_side2">
	<?php echo $profile['profile_nic'];?><br />
</div>
						
<div id="box_side1">
	<?php
	if ($page_name_short == "sn_profile") {
	?>
	<span class="txt_highlight3"><?php echo $lang['menu_profile'];?></span><br />
	<?php
	} else {
	?>
	<a href="sn_profile.php?user_id=<?php echo $profile['user_id'];?>"><?php echo $lang['menu_profile'];?></a><br />
	<?php }?>


	<?php
	if ($page_name_short == "blg_item") {
	?>
	<span class="txt_highlight3"><?php echo $lang['menu_blog'];?></span><br />
	<?php
	} else {
	?>
	<a href="blg_item.php?user_id=<?php echo $profile['user_id'];?>"><?php echo $lang['menu_blog'];?></a><br />
	<?php }?>


	<?php
	if ($page_name_short == "lib_item") {
	?>
	<span class="txt_highlight3"><?php echo $lang['menu_library'];?></span><br />
	&nbsp;&nbsp;<a href="lib_item.php?user_id=<?php echo $profile['user_id'];?>"><?php echo $lang['href_default'];?></a><br />
	&nbsp;&nbsp;<a href="lib_list.php?user_id=<?php echo $profile['user_id'];?>&amp;contents=1"><?php echo $lang['href_contents'];?></a><br />
	<?php
	} else {
	?>
	<a href="lib_item.php?user_id=<?php echo $profile['user_id'];?>"><?php echo $lang['menu_library'];?></a><br />
	<?php }?>


	<?php
	if ($this->user_acs->checkPermission($resource_ids['social_network'], $privilege_ids['allow_access'])) { //resourece_id, Priv_id
	if ($page_name_short == "sn_friends") {
	?>
	<span class="txt_highlight3"><?php echo $lang['menu_friends'];?></span><br />
	<?php
	} else {
	?>
	<a href="sn_friends.php?user_id=<?php echo $profile['user_id'];?>"><?php echo $lang['menu_friends'];?></a><br />
	<?php }}?>
	
	<?php
	if ($page_name_short == "sn_publishing") {
	?>
	<span class="txt_highlight3"><?php echo $lang['menu_publishing'];?></span><br />
	<?php
	} else {
	?>
	<a href="sn_publishing.php?user_id=<?php echo $profile['user_id'];?>"><?php echo $lang['menu_publishing'];?></a><br />
	<?php }?>


	<?php
	if ($page_name_short == "sn_recommended") {
	?>
	<span class="txt_highlight3"><?php echo $lang['menu_recommended'];?></span><br />
	<?php
	} else {
	?>
	<a href="sn_recommended.php?user_id=<?php echo $profile['user_id'];?>"><?php echo $lang['menu_recommended'];?></a><br />
	<?php }?>
	
	<?php
	if (isset($profile['profile_allow_msg']) && $profile['profile_allow_msg'] == 1) {
	?>
	<a href="msg_compose.php?to_user_id=<?php echo $profile['user_id'];?>"><?php echo $lang['menu_send_message'];?></a><br />
	<?php }?>
	
	<?php
	if (isset($display) && $display == "blocked") {
	?>
	<a href="sn_profile.php?user_id=<?php echo $profile['user_id'];?>&amp;unblock=1"><?php echo $lang['href_unblock'];?></a><br />
	<?php
	}
	elseif (isset($profile['user_id']) && $profile['user_id'] != $me['user_id']) {
	?>
	<a href="sn_profile.php?user_id=<?php echo $profile['user_id'];?>&amp;block=1"><?php echo $lang['href_block'];?></a><br />
	<?php }?>	
	
	
	
	<br />
	<hr />
	<table border="0" cellspacing="0" cellpadding="2" width="100%">
		<tr>
			<td colspan="2">
				<img src="get_file.php?file=<?php echo $profile['image']['file'];?>" border="0" alt="<?php echo $profile['image']['file_title'];?>" /><br />
			</td>
		</tr>
		<tr>
			<td>
				<?php echo $lang['txt_profile_session_status'];?><br />
			</td>
			<td>
				<?php
				if ($profile['online_status'] == 1) {
				    echo "<b>" . $lang['arr_user_online_status'][1] . "</b><br />";
				}
				else {
					    echo $lang['arr_user_online_status'][$profile['online_status']] . "<br />";
				}
				?>
			</td>
		</tr>
		<tr>
			<td>
				<?php echo $lang['txt_profile_hometown'];?><br />
			</td>
			<td>
				<?php echo $profile['profile_hometown'];?><br />
			</td>
		</tr>
		<tr>
			<td valign="top">
				<?php echo $lang['txt_profile_create_datetime'];?><br />
			</td>
			<td>
				<?php echo $profile['display_profile_create_datetime'];?><br />
			</td>
		</tr>
	</table>
	<br />
	
	<?php
	if (isset($profile_statistic)) {
	?>
	<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="9" alt="" border="0" /><br />
			
	<table border="0" width="100%" cellspacing="2" cellpadding="2" class="picture_light">
		<tr>
			<td class="bg2" colspan="2">
				<b><?php echo $lang['menu_statistics'];?></b><br />
			</td>
		</tr>
		<?php
		foreach($profile_statistic as $key => $i):
		if (isset($lang['arr_user_statistic_type_id'][$i['statistic_type_id']])) {
		?>
		<tr>
			<td class="bg3">
				<?php echo $lang['arr_user_statistic_type_id'][$i['statistic_type_id']];?><br />
			</td>
			<td align="right" class="bg4">
				<?php echo $i['total'];?><br />
			</td>
		</tr>
		<?php
		}
		endforeach;
		?>
	</table>
	<?php }?>	
</div>

<div id="box_bottom">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tr>
			<td align="left">
				<img src="<?php echo $templatePath;?>img/box_bottom_left.png" width="5" height="18" alt="" border="0" /><br />
			</td>
			<td align="left">
				<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="9" alt="" border="0" /><br />
			</td>
			<td align="right">
				<img src="<?php echo $templatePath;?>img/box_bottom_right.png" width="5" height="18" alt="" border="0" /><br />
			</td>
		</tr>
	</table>
</div>
<?php }?>