<?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 width="770" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="180" valign="top">
			<?php
			include $templatePath . "g_menu.inc.tpl.php";
			?>
			
			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="52" alt="" /><br />

			<?php
			include $templatePath . "logo.inc.tpl.php";
			?>
		</td>

		<td width="20">&nbsp;</td>

		<td width="370" valign="top">

			<table cellpadding="4" cellspacing="0" border="0" width="100%">
				<tr>
					<td class="txt_title" align="right">
						<?php echo $group['group_title'];?><br />
						<hr />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $group['display_group_synopsis'];?><br />
					</td>
				</tr>
			</table>

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

			<table cellpadding="4" cellspacing="0" border="0" width="100%">
				<tr>
					<td class="txt_title" align="right">
						<?php echo $lang['hdr_group_rules'];?><br />
						<hr />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $group['display_group_rules'];?><br />
					</td>
				</tr>
			</table>

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

			<table cellpadding="4" cellspacing="0" border="0" width="100%">
				<tr>
					<td class="txt_title" align="right">
						<?php echo $lang['hdr_node_rules'];?><br />
						<hr />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $lang['txt_node_rules'];?><br />
					</td>
				</tr>
			</table>

		</td>

		<td width="20">&nbsp;</td>

		<td width="180" valign="top">

			<table cellpadding="4" cellspacing="0" border="0" width="100%">
				<tr>
					<td colspan="2" class="txt_title" align="right">
						<?php echo $lang['hdr_group'];?><br />
						<hr />
					</td>
				</tr>
				<tr>
					<td class="txt_footer" valign="top">
						<?php echo $lang['txt_group_registration_type'];?><br />
					</td>
					<td class="txt_footer" valign="top" align="right">
						<?php echo $lang['arr_registration_type'][$group['group_registration_type']];?><br />
					</td>
				</tr>
				<tr>
					<td class="txt_footer" valign="top">
						<?php echo $lang['txt_language'];?><br />
					</td>
					<td class="txt_footer" valign="top" align="right">
						<?php echo $lang['arr_lang_name'][$group['language_id']];?>
					</td>
				</tr>
				<tr>
					<td class="txt_footer" valign="top">
						<?php echo $lang['txt_group_age'];?><br />
					</td>
					<td align="right" class="txt_footer">
						<?
						if ($group['group_from_age'] && $group['group_to_age']) {
						    echo $group['group_from_age'] . "/" . $group['group_to_age'];
						}
						else if ($group['group_from_age'] && !$group['group_to_age']) {
							echo $group['group_from_age'] . " and up";
						}
						else if (!$group['group_from_age'] && $group['group_to_age']) {
							echo "up to " . $group['group_to_age'];
						}
						else {
							echo "all";
						}
						?>
						<br />
					</td>
				</tr>
				<tr>
					<td class="txt_footer" valign="top">
						<?php echo $lang['txt_start_date'];?><br />
					</td>
					<td class="txt_footer" valign="top" align="right">
						<?php echo $group['group_create_datetime'];?><br />
					</td>
				</tr>
				<tr>
					<td class="txt_footer" valign="top">
						<?php echo $lang['txt_election_date'];?><br />
					</td>
					<td class="txt_footer" valign="top" align="right">
						<?php echo $group['group_election_date'];?><br />
					</td>
				</tr>
			</table>

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

			<table cellpadding="4" cellspacing="0" border="0" width="100%">
				<tr>
					<td colspan="2" class="txt_title" align="right">
						<?php echo $lang['hdr_roles'];?><br />
						<hr />
					</td>
				</tr>
				<?php
				if (isset($group_roles[0])) {
				foreach($group_roles as $i):?>
				<tr>
					<td valign="top" class="txt_footer">
						<?php echo $i['role_name'];?><br />
					</td>
					<td class="txt_footer" valign="top" align="right">
						<a href="g_membership.php?group_id=<?php echo $group['group_id'];?>&amp;role_id=<?php echo $i['role_id'];?>" class="txt_footer_link"><?php echo $i['total_members'];?></a><br />
					</td>
				</tr>
				<?php
				endforeach;
				?>
				<?php
				}
				else {
				?>
				<tr>
					<td colspan="2">
						<?php echo $lang['err_no_roles'];?><br />
					</td>
				</tr>
				<?php
				}
				?>
			</table>
		</td>
	</tr>
</table>
