<?php

// -----------------------------------------------------------------------
// This file is part of AROUNDMe
//
// Copyright (C) 2003 - 2007 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., 51 Franklin St, Fifth Floor, Boston, MA
// 02110-1301, USA.
// -----------------------------------------------------------------------

?>

<style type="text/css">
<!--
@import url(<?php echo $template_path;?>css/aroundme_form.css);
-->
</style>


<div class="box">
	<div class="box_top">
		<div class="content">
			<h1><?php echo $lang['hdr_user_list'];?></h1>
		</div>
	</div>
	
	<div class="box_mid">
		<div class="content">
			<?php
			if (isset($users)) {
			$display_items = trimArray($users);
			?>
			<table border="0" cellspacing="0" cellpadding="4" width="100%">
				<tr>
					<td>
						<a href="index.php?amn=core_maint_user_list&amp;sort=user_id"><?php echo $lang['txt_col_user_id'];?></a><br />
					</td>
					<td>
						<a href="index.php?amn=core_maint_user_list&amp;sort=user_firstname"><?php echo $lang['txt_col_firstname'];?></a>/
						<a href="index.php?amn=core_maint_user_list&amp;sort=user_surname"><?php echo $lang['txt_col_surname'];?></a><br />
					</td>
					<td>
						<a href="index.php?amn=core_maint_user_list&amp;sort=location_id"><?php echo $lang['txt_col_location'];?></a><br />
					</td>
					<td>
						<a href="index.php?amn=core_maint_user_list&amp;sort=user_create_datetime"><?php echo $lang['txt_col_create_datetime'];?></a><br />
					</td>
					<td>
						<a href="index.php?amn=core_maint_user_list&amp;sort=language_id"><?php echo $lang['txt_col_language'];?></a><br />
					</td>
					<td>
						<a href="index.php?amn=core_maint_user_list&amp;sort=status_id"><?php echo $lang['txt_col_status'];?></a><br />
					</td>
					<td>
						<a href="index.php?amn=core_maint_user_list&amp;sort=role_id"><?php echo $lang['txt_col_role'];?></a><br />
					</td>
					
				
				</tr>
				<?php
				foreach($display_items as $key => $i):
				?>
				<tr>
					<td valign="top">
						<a href="index.php?amn=core_maint_user_view&amp;user_id=<?php echo $i['user_id'];?>"><?php echo $i['user_id'];?></a><br />
					</td>
					<td valign="top">
						<b><?php echo $i['user_firstname'] . " " . $i['user_surname'];?></b><br />
					</td>
					<td>
						<?php echo $i['location_name'];?><br />
					</td>
					<td valign="top">
						<?php echo $this->date->formatDate($i['user_create_datetime']);?><br />
					</td>
					<td valign="top">
						<?php
						if (isset($lang['arr_lang_name'][$i['language_id']])) {
							echo ucfirst($lang['arr_lang_name'][$i['language_id']]);
						}
						?>
					</td>
					<td valign="top">
						<?php
						if (isset($lang['user_online_status'][$i['login_status']])) {
							echo $lang['user_online_status'][$i['login_status']];
						}
						?>
					</td>
					<td valign="top">
						<?php
						if (isset($lang['role'][$i['role_id']])) {
							echo $lang['role'][$i['role_id']];
						}
						?>
					</td>
				</tr>
				<?php
				endforeach;
				?>
			</table>
			<?php
			echo createArrayList($users);
			}
			else {
			?>
			<p>
				<?php echo $lang['template_error']['err_no_items'];?><br />
			</p>
			<?php }?>
		</div>
	</div>
</div>
</form>