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


<form action="maint_contact.php" method="post" name="frm" id="id_frm">


<div class="box">
	<div class="box_top">
		<?php echo $lang['hdr_contact_reports'];?><br />
	</div>

	<div class="box_mid">
		<div class="content">
			<?php
			if (isset($contact_reports)) {
			?>
			<table border="0" cellspacing="0" cellpadding="4" width="100%">
				<tr>
					<td>
						&nbsp;<br />
					</td>
					<td valign="top">
						<b><?php echo $lang['txt_datetime'];?></b><br />
					</td>
					<td valign="top">
						<b><?php echo $lang['txt_status'];?></b><br />
					</td>
					<td valign="top">
						<b><?php echo $lang['txt_reportee'];?></b><br />
					</td>
					<td valign="top">
						<b><?php echo $lang['txt_language'];?></b><br />
					</td>
					<td valign="top">
						<b><?php echo $lang['txt_type'];?></b><br />
					</td>
				</tr>
				<?php
				$display_items = trimArray($contact_reports);
				foreach($display_items as $key => $i):
				?>
				<tr>
					<td valign="top">
						<a href="index.php?amn=core_maint_contact_view&amp;contact_id=<?php echo $i['contact_id'];?>"><?php echo $i['contact_id'];?></a><br />
					</td>
					<td valign="top">
						<?php echo $this->date->formatDate($i['report_datetime'],1);?><br />
					</td>
					<td valign="top">
						<?php 
						if (empty($i['status_id'])) {
							$i['status_id'] = 0; // unallocated
						}
						echo $lang['contact_status'][$i['status_id']];
						?><br />
					</td>
					<td valign="top">
						<?php echo $i['reportee_name'];?><br />
					</td>
					<td valign="top">
						<?php
						if (isset($lang['arr_lang_name'][$i['reportee_language_id']])) {
							echo ucfirst($lang['arr_lang_name'][$i['reportee_language_id']]);
						}
						?><br />
					</td>
					<td valign="top">
							<?php
						if (isset($lang['contact_report_type'][$i['contact_report_type']])) {
							echo $lang['contact_report_type'][$i['contact_report_type']];
						}
						?><br />
					</td>
				</tr>
				<?php
				endforeach;
				?>
			</table>
			<?php
			echo createArrayList($contact_reports);
			?>
			<?php
			}
			else {
			?>
			<p>
				<?php echo $lang['template_error']['err_no_items'];?><br />
			</p>
			<?php }?>
		</div>
	</div>
</div>
	
<div class="box_bottom">
	<span class="box_bottom_right"></span>
	<span class="box_bottom_left"></span>
</div>

</form>