<?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="index.php?amn=core_blocked" method="post" name="frm" id="id_frm">
<input type="hidden" name="identity_id" value="<?php if (isset($_REQUEST['identity_id'])) echo $_REQUEST['identity_id']; ?>" />

<div class="col_left1">
	<div class="box">
		<div class="box_top">
			<div class="content">
				<h1><?php echo $lang['hdr_blocked'];?></h1>
			</div>
		</div>
		
		<div class="box_mid">
			<div class="content">
				<table border="0" cellspacing="0" cellpadding="4" width="100%">
					<?php
					if (isset($blocked)) {
					foreach($blocked as $key => $i):
					?>
					<tr>
						<td>
							<a href="index.php?amn=core_profile&amp;identity_id=<?php echo $i['identity_id'];?>"><?php echo $i['identity_nic'];?></a><br />
						</td>
						<td>
							<?php echo $this->date->formatDate($i['block_datetime'], 1);?><br />
						</td>
						<td>
							<?php echo $i['block_description'];?><br />
						</td>
						<td align="right">
							<a href="index.php?amn=core_blocked&amp;unblock_user_id=<?php echo $i['user_id_blocked'];?>"><?php echo $lang['href_unblock'];?></a><br />
						</td>
	
					</tr>
					<?php
					endforeach;
					}
					else {
					?>
					<tr>
						<td>
							<?php echo $lang['template_error']['err_no_items'];?><br />
						</td>
					</tr>
					<?php
					}
					?>
				</table>
			</div>
		</div>
	</div>
</div>

<div class="col_right1">
	<?php if (isset($_REQUEST['identity_id'])) { ?>
	<div class="box">
		<div class="box_top">
			<div class="content">
				<h1><?php echo $lang['hdr_add_block'];?></h1>
			</div>
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php echo $lang['txt_confirm_block']; ?><br />
				
				<p>
					<?php
					if (isset($identity)) {
						$id_card = $identity;
						include("inc/identity.inc.php");
					}
					?>
				</p>
				
				<p>
					<?php echo $lang['txt_block_description']; ?><br />
				</p>

				<p>
					<textarea style="width: 320px;" onKeyUp="checkLength('id_frm_block',255,'id_characters_left');" name="frm_block" id="id_frm_block" cols="51" rows="5"></textarea>
				</p>
				
				<p align="right">
					<span id="id_characters_left">(255)</span>
					<input type="submit" class="input_submit" name="frm_submit" id="id_frm_submit" value="<?php echo $lang['txt_button_block']; ?>"/>
				</p>
			</div>
		</div>
	</div>
	<?php } ?>
	
	<div class="box">
		<div class="box_top">
			<div class="content">
				<h1><?php echo $lang['hdr_info_blocking'];?></h1>
			</div>
		</div>
		
		<div class="box_mid">
			<div class="content">
				<p>
					<?php echo $lang['txt_by_blocking']; ?>
				</p>
				
				<ul>
					<li><?php echo $lang['txt_by_blocking_1']; ?></li>
					<li><?php echo $lang['txt_by_blocking_2']; ?></li>
					<li><?php echo $lang['txt_by_blocking_3']; ?></li>
				</ul>
			</div>
		</div>
	</div>
</div>
</form>
