<?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.
// -----------------------------------------------------------------------

?>


<table border="0" cellspacing="0" cellpadding="4" width="100%">
	<tr class="table_stnd">
		<td class="txt_title">
			<?php echo $lang['section_menu'];?><br />
			<hr />
		</td>
	</tr>
	<tr>
		<td valign="top" class="txt_sub_menu_on">
			<?php
			if ($page_name_short == "g_groups" && !isset($display)) {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_latest_groups'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_groups.php" class="txt_sub_menu"><?php echo $lang['menu_latest_groups'];?></a><br />
			<?php }?>


			<?php
			if ($page_name_short == "g_groups" && isset($display) && $display == "mygroups") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_my_groups'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_groups.php?my_groups=1" class="txt_sub_menu"><?php echo $lang['menu_my_groups'];?></a><br />
			<?php }?>

			<?php
			if ($this->user_acs->checkPermission($resource_ids['group'], $privilege_ids['allow_create'])) { //resourece_id, Priv_id
			if ($page_name_short == "g_group_create") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_create_group'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_group_create.php" class="txt_sub_menu"><?php echo $lang['menu_create_group'];?></a><br />
			<?php }}?>

		</td>
	</tr>
</table>



<?php
if (isset($group['group_id']) && $page_name_short != "g_apply") {
?>
<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="10" alt="" /><br />

<table border="0" cellspacing="0" cellpadding="4" width="100%">
	<tr class="table_stnd">
		<td class="txt_title">
			<?php echo $group['group_title'];?><br />
			<hr />
		</td>
	</tr>
	<tr>
		<td valign="top">
			<?php
			if ($page_name_short == "g_group") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_group_home'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_group.php?group_id=<?php echo $group['group_id'];?>" class="txt_sub_menu"><?php echo $lang['menu_group_home'];?></a><br />
			<?php }?>


			<?php
			if ($this->group_acs->checkPermission($resource_ids['group_forum'], $privilege_ids['allow_access'])) { //resourece_id, Priv_id
			if ($page_name_short == "g_forum") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_discussions'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_forum.php?group_id=<?php echo $group['group_id'];?>" class="txt_sub_menu"><?php echo $lang['menu_discussions'];?></a><br />
			<?php 
			}}
			?>


			<?php
			if ($this->group_acs->checkPermission($resource_ids['group_library'], $privilege_ids['allow_access'])) { //resourece_id, Priv_id
			if ($page_name_short == "g_library") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_library'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_library.php?group_id=<?php echo $group['group_id'];?>" class="txt_sub_menu"><?php echo $lang['menu_library'];?></a><br />
			<?php 
			}}
			?>


			<?php
			if ($this->group_acs->checkPermission($resource_ids['group_membership'], $privilege_ids['allow_access'])) { //resourece_id, Priv_id
			if ($page_name_short == "g_membership") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_membership'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_membership.php?group_id=<?php echo $group['group_id'];?>" class="txt_sub_menu"><?php echo $lang['menu_membership'];?></a><br />
			<?php 
			}}
			?>
			

			<?php
			if ($this->group_acs->checkPermission($resource_ids['group_poll'], $privilege_ids['allow_access'])) { //resourece_id, Priv_id
			if ($page_name_short == "g_poll") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_polls'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_poll.php?group_id=<?php echo $group['group_id'];?>" class="txt_sub_menu"><?php echo $lang['menu_polls'];?></a><br />
			<?php }}?>
			
			
			<?php
			if ($this->group_acs->checkPermission($resource_ids['group_files'], $privilege_ids['allow_access'])) { //resourece_id, Priv_id
			if ($page_name_short == "g_files") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_files'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_files.php?group_id=<?php echo $group['group_id'];?>" class="txt_sub_menu"><?php echo $lang['menu_files'];?></a><br />
			<?php }}?>
			
			<?php
			if ($page_name_short == "g_member_profile") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_my_membership'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_member_profile.php?group_id=<?php echo $group['group_id'];?>" class="txt_sub_menu"><?php echo $lang['menu_my_membership'];?></a><br />
			<?php 
			}
			?>
			

			<?php
			if ($page_name_short == "g_structure") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_structure'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_structure.php?group_id=<?php echo $group['group_id'];?>" class="txt_sub_menu"><?php echo $lang['menu_structure'];?></a><br />
			<?php }?>
			

			<?php
			if ($this->group_acs->checkPermission($resource_ids['group_blog'], $privilege_ids['allow_access'])) { //resourece_id, Priv_id
			if ($page_name_short == "g_blog") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_blog'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_blog.php?group_id=<?php echo $group['group_id'];?>" class="txt_sub_menu"><?php echo $lang['menu_blog'];?></a><br />
			<?php }}?>
			
		
			<?php
			if ($this->group_acs->checkPermission($resource_ids['group_activity'], $privilege_ids['allow_access'])) { //resourece_id, Priv_id
			if ($page_name_short == "g_calendar") {
			?>
			<span class="txt_sub_menu_on"><?php echo $lang['menu_activity'];?></span><br />
			<?php
			} else {
			?>
			<a href="g_calendar.php?group_id=<?php echo $group['group_id'];?>" class="txt_sub_menu"><?php echo $lang['menu_activity'];?></a><br />
			<?php }}?>
		</td>
	</tr>
</table>
<?php }?>


