<?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 echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $lang['txt_page_title'];?></title>
<style type="text/css">
<!--
@import url(<?php echo $templatePath;?>aroundme.css);

-->
</style>
<!--[if IE]>
<style type="text/css">
@import url(<?php echo $templatePath;?>aroundme-IE.css);
</style>
<![endif]-->


<script language="JavaScript" src="js/functions.js" type="text/javascript"></script>

<link rel="SHORTCUT ICON" href="<?php echo $templatePath;?>img/favicon.ico" />

</head>

<body>

<table width="770" border="0" cellspacing="0" cellpadding="4" class="table_stnd">
	<tr>
		<td class="txt_footer" valign="top">
			<?php
			if ($this->user_acs->checkPermission($resource_ids['shoutbox'], $privilege_ids['add_item'])) { //resourece_id, Priv_id
			?>
			<a href="my_shoutbox.php" class="txt_breadcrumb"><?php echo $lang['href_shoutbox'];?></a>
			&nbsp;&nbsp;&#47;&nbsp;&nbsp;
			<?php
			}
			if ($this->user_acs->checkPermission($resource_ids['shoutbox'], $privilege_ids['allow_access'])) {
			if (isset($shoutbox)) {
			?>
			<a href="sn_profile.php?user_id=<?php echo $shoutbox['user_id'];?>" class="txt_breadcrumb"><?php echo $shoutbox['profile_nic'];?></a>
			&nbsp;&nbsp;&#47;&nbsp;&nbsp;<?php echo $shoutbox['shoutbox_create_datetime'];?>
			&nbsp;&nbsp;&#47;&nbsp;&nbsp;
			<?php echo $shoutbox['shoutbox_body'];?><br />
			<?php
			}}
			?>
		</td>
		<td valign="top" align="right" class="txt_footer" nowrap="nowrap">
			<?php
			if ($this->user_acs->checkPermission($resource_ids['administration'], $privilege_ids['allow_access'])) { //resourece_id, Priv_id
			?>
				<a href="node_admin.php" class="txt_breadcrumb"><?php echo $lang['href_node_admin'];?></a>&nbsp;&nbsp;&#47;&nbsp;&nbsp;
			<?php
   			}
			?>
			<a href="my_overview.php" class="txt_breadcrumb"><?php echo $me['firstname'];?></a>&nbsp;&nbsp;&#47;&nbsp;&nbsp;
			<a href="index.php" class="txt_breadcrumb"><?php echo $lang['href_logoff'];?></a>&nbsp;&nbsp;&#47;&nbsp;&nbsp;
			<?php
			if (empty($_POST) && $page_name_short != "report_abuse") { //we do not want them to report abuse after they post as it will create a page error as we cannot re-pass the POST data to the page
				$url = $_SERVER['REQUEST_URI'];
				if (substr($url, -4) == ".php") {
				    $url .= "?";
				}
				else {
				    $url .= "&amp;";
				}
				$url .= "abuse_report=1";
			?>
			<a href="<?php echo $url;?>" class="txt_breadcrumb"><?php echo $lang['href_report_abuse'];?></a>&nbsp;&nbsp;&#47;&nbsp;&nbsp;
			<?php
			}
			?>
			<a href="welcome.php" class="txt_breadcrumb"><?php echo $lang['href_help'];?></a><br />
		</td>
	</tr>
</table>

<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="20" alt="" /><br />

<table width="770" border="0" cellspacing="0" cellpadding="4" class="table_stnd">
	<tr>
		<td>
			<table border="0" cellspacing="0" cellpadding="0" class="table_nested">
				<tr>
					<td>
						<?php
						if (isset($section) && $section == "magazine") {
						    echo "<span  class=\"txt_main_menu_on\">" . $lang['href_selection'] . "</span><br />";
						}
						else {
						    echo "<a href='mag_overview.php' class=\"txt_main_menu\">" . $lang['href_selection'] . "</a><br />";
						}
						?>
					</td>
					<td valign="middle">
						&nbsp;&nbsp;&#47;&nbsp;&nbsp;<br/>
					</td>
					<td>
						<?php
						if (isset($section) && $section == "message") {
						    echo "<span  class=\"txt_main_menu_on\">" . $lang['href_messages'] . "</span><br />";
						}
						else {
						    echo "<a href='msg_list.php' class=\"txt_main_menu\">" . $lang['href_messages'] . "</a><br />";
						}
						?>
					</td>
					<td valign="top" class="txt_footer">
						&nbsp;<b>(<?php echo $me['mail'];?>)</b><br/>
					</td>
					<td valign="middle">
						&nbsp;&nbsp;&#47;&nbsp;&nbsp;<br/>
					</td>
					<td>
						<?php
						if (isset($section) && $section == "my") {
							echo "<span class=\"txt_main_menu_on\">" . $lang['href_me'] . "</span><br />";
						}
						else {
						    echo "<a href='my_overview.php' class=\"txt_main_menu\">" . $lang['href_me'] . "</a><br />";
						}
						?>
					</td>
					<td valign="middle">
						&nbsp;&nbsp;&#47;&nbsp;&nbsp;<br/>
					</td>

					<?php
					if ($this->user_acs->checkPermission($resource_ids['social_network'], $privilege_ids['allow_access'])) { //resourece_id, Priv_id
					?>
					<td>
						<?php
						if (isset($section) && $section == "network") {
						    echo "<span class=\"txt_main_menu_on\">" . $lang['href_network'] . "</span><br />";
						}
						else {
						    echo "<a href='sn_network.php' class=\"txt_main_menu\">" . $lang['href_network'] . "</a><br />";
						}
						?>
					</td>
					<td valign="middle">
						&nbsp;&nbsp;&#47;&nbsp;&nbsp;<br/>
					</td>
					<?php
					}
					?>

					<td>
						<?php
						if (isset($section) && $section == "group") {
						    echo "<span class=\"txt_main_menu_on\">" . $lang['href_groups'] . "</span><br />";
						}
						else {
						    echo "<a href='g_groups.php' class=\"txt_main_menu\">" . $lang['href_groups'] . "</a><br />";
						}
						?>
					</td>
					<td valign="middle">
						&nbsp;&nbsp;&#47;&nbsp;&nbsp;<br/>
					</td>
					<td>
						<?php
						if (isset($section) && $section == "activity") {
						    echo "<span class=\"txt_main_menu_on\">" . $lang['href_activities'] . "</span><br />";
						}
						else {
						    echo "<a href='a_calendar.php' class=\"txt_main_menu\">" . $lang['href_activities'] . "</a><br />";
						}
						?>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>


<table width="770" border="0" cellspacing="0" cellpadding="4">
	<tr>
		<td>
			<?php
			if (isset ($breadcrumb)) {
				foreach($breadcrumb as $key => $i):
					if(isset($i['breadcrumb_title'])) {

						if (count($breadcrumb) == $key+1) {
						    echo "<span class='txt_breadcrumb'>" . $i['breadcrumb_title'] . "</span>";
						}
						else {
							echo "<a href='" . $i['breadcrumb_url'] . "' title='" . $i['breadcrumb_note'] . "' class='txt_breadcrumb'>" . $i['breadcrumb_title'] . "</a>&nbsp;..&nbsp;";
						}
					}
				endforeach;
			}
			?>
		</td>
	</tr>
</table>

<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="20" alt="" /><br />

<?php
if (isset($log)) {
?>
<table width="770" border="0" cellspacing="0" cellpadding="4" class="table_stnd">
	<?php
	foreach($log as $key => $i):
		if (!empty($i)) {
			unset($error);
			if (isset($error_handling) && $error_handling>0 && isset($i[1])) {
				$error = $lang['arr_error'][$i[0]] . ": " . $i[2] . "<br />";
			}
			elseif (empty($i[1])) {
				$error = $lang['arr_error'][$i[0]] . "<br />";
			}
		}

		if (isset($error)) {
	?>
	<tr>
		<td class="txt_error">
			<?php echo $error;?>
		</td>
	</tr>
	<?
	}
	endforeach;
	?>
</table>
<?php
}
?>


<table width="770" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>
			<?php echo $content;?>
		</td>
	</tr>
</table>

<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="20" alt="" /><br />

<table width="770" border="0" cellspacing="0" cellpadding="0" class="table_stnd">
	<tr>
		<td align="center">
				<a href="node_structure.php" title="node structure"><?php echo $lang['href_node_structure'];?></a><br />
		</td>
	</tr>
</table>

<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="20" alt="" /><br />
<table width="770" border="0" cellspacing="0" cellpadding="0" class="table_stnd">

	<tr>
		<td>
			<hr />
		</td>
	</tr>
	<tr>
		<td align="center">
			<table border="0" cellspacing="12" cellpadding="0">

				<tr>
					<td class="txt_breadcrumb" valign="middle">
						<a href="http://www.barnraiser.org/aroundme/" title="aroundme homepage"><img src="<?php echo $templatePath;?>img/am_base.png" width="102" height="80" alt="" border="0" /></a><br />
					</td>

					<td class="txt_footer" valign="middle" align="left">
						aroundme version 0.2.2<br />
						W3C XHTML validated<br />
						W3C CSS validated<br />
					</td>
					<td class="txt_footer" valign="middle">
						<a href="http://www.barnraiser.org/" title="barnraiser homepage"><img src="<?php echo $templatePath;?>img/br_base.png" width="77" height="80" alt="" border="0" /></a><br />
					</td>
					<td class="txt_footer" valign="middle" align="left">
						Please consider<br />
						<a href="http://www.barnraiser.org/club/" title="join barnraiser" class="txt_footer_link">joining</a> or
						<a href="http://www.barnraiser.org/donate/" title="donate to barnraiser" class="txt_footer_link">donating</a><br />
						to barnraiser.<br />
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

</body>
</html>
