<?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_register" method="post" name="frm" id="id_frm">
<input type="hidden" name="invitee_user_id" value="<?php if (isset($identity['user_id'])) { echo $identity['user_id'];}?>" />
<input type="hidden" name="invitee_identity_id" value="<?php if (isset($identity['identity_id'])) { echo $identity['identity_id'];}?>" />



<?php
if (isset($display) && $display == "registration_complete") {
?>
<div class="box">
	<div class="box_top">
		<div class="content">
			<h1><?php echo $lang['hdr_reg_complete'];?></h1>
		</div>
	</div>
	
	<div class="box_mid">
		<div class="content">
			<?php echo $lang['txt_reg_complete'];?><br />
		</div>
	</div>
</div>

<?php
}
else {
?>
<div class="col_left1">
	<?php
	if (isset($identity)) {
	?>
	<div class="box">
		<div class="box_top">
			<div class="content">
				<h1><?php echo $lang['hdr_endorsement'];?></h1>
			</div>
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php
				$id_card = $identity;
				include("inc/identity.inc.php");
				?>
			</div>
		</div>
	</div>
	<?php }?>
	
	<div class="box">
		<div class="box_top">
			<div class="content">
				<h1><?php echo $lang['hdr_intro'];?></h1>
			</div>
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php echo $lang['txt_intro'];?><br />
			</div>
		</div>
	</div>
</div>

<div class="col_right1">
	
	<div class="box">
		<div class="box_top">
			<div class="content">
				<h1><?php echo $lang['hdr_register'];?></h1>
			</div>
		</div>
		
		<div class="box_mid">
			<div class="content">
				<table cellpadding="2" cellspacing="0" border="0" width="100%">
					<tr>
						<td>
							<label for="id_email"><?php echo $lang['txt_email'];?></label><br />
						</td>
						<td>
							<input id="id_email" type="text" class="input" name="user_email" size="32" value="<?php if (isset($_POST['user_email'])) { echo $_POST['user_email'];}?>" /><br />
						</td>
					</tr>
					<tr>
						<td>
							<label for="id_fname"><?php echo $lang['txt_firstname'];?></label><br />
						</td>
						<td>
							<input id="id_fname" type="text" class="input" name="user_firstname" size="32" value="<?php if (isset($_POST['user_firstname'])) { echo $_POST['user_firstname'];}?>" /><br />
						</td>
					</tr>
					<?php
					if (count($lang['arr_lang_name']) > 1) {
					?>
					<tr>
						<td colspan="2">
							<img src="<?php echo $template_path;?>img/pixel.png" width="1" height="6" alt="" /><br />
						</td>
					</tr>
					<tr>
						<td valign="top" colspan="2">
							<label for="id_language" style="width:300px;"><?php echo $lang['txt_lang_selection'];?></label><br />
						</td>
					</tr>
					<tr>
						<td>
							<br />
						</td>
						<td>
								<?php
								foreach($lang['arr_lang_name'] as $key => $i):
								?>
								<input id="id_language" type="checkbox" name="language_ids[]" value="<?php echo $key;?>" checked="checked" class="checkbox" />&nbsp;<?php echo ucfirst($i);?><br />
								<?php
								endforeach;
								?>
							<br />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<img src="<?php echo $template_path;?>img/pixel.png" width="1" height="6" alt="" /><br />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<label for="id_language_id" style="width:300px;"><?php echo $lang['txt_lang'];?></label><br />
						</td>
					</tr>
					<tr>
						<td>
							<br />
						</td>
						<td>
							<select id="id_language_id" name="language_id" size="1">
								<?php
								foreach($lang['arr_lang_name'] as $key => $i):
								?>
								<option value="<?php echo $key;?>" <?php if(isset($_POST['language_id']) && $_POST['language_id'] == $key) echo "selected=\"selected\"";?>><?php echo ucfirst($i);?></option>
								<?php
								endforeach;
								?>
							</select><br />
						</td>
					</tr>
					<?php }?>
					
					<tr>
						<td colspan="2">
							<img src="<?php echo $template_path;?>img/pixel.png" width="1" height="6" alt="" /><br />
						</td>
					</tr>
					
					<tr>
						<td colspan="2">
							<?php echo $lang['txt_captcha_intro'];?><br />
						</td>
					</tr>
					<tr>
						<td valign="top">
							&nbsp;<br />
						</td>
						<td>
							<table cellpadding="2" cellspacing="0" border="0">
								<tr>
									<td>
										<img src="get_captcha.php" alt="CAPTCHA" class="picture"><br />
									</td>
								</tr>
								<tr>
									<td>
										<input id="id_captcha" type="text" class="input" name="captchastring" size="20"><br />
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				
				<p>
					<?php echo $lang['txt_reg_legal'];?><br />
				</p>
				
				<p align="right">
					<input type="submit" name="register" class="input_submit" value="<?php echo $lang['sub_register'];?>" /><br />
				</p>
				
			</div>
		</div>
	</div>
</div>
<?php }?>
</form>