<?php

// -----------------------------------------------------------------------
// This file is part of AROUNDMe
// 
// Copyright (C) 2003 - 2006 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.
// -----------------------------------------------------------------------
?>

<div class="col_main">
	<form action="node_register_user.php" method="post" name="register">
	
	<?php
	if (count($lang['arr_lang_name']) == 1) {
	?>
	<input type="hidden" name="language_id" value="<?php echo $language_default;?>" />
	<input type="hidden" name="language_ids[]" value="<?php echo $language_default;?>" />
	<?php
	}
	?>
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_registration'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<table cellpadding="4" cellspacing="0" border="0" width="100%">
					<tr>
						<td valign="top">
							<label for="id_to"><?php echo $lang['txt_emails'];?></label><br />
						</td>
						<td>
						<textarea id="id_to" name="to" rows="6" cols="32"><?php if(isset($frmdata['to'])) { echo $frmdata['to'];}?></textarea><br />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<?php echo $lang['txt_invite_to_help'];?><br />
						</td>
					</tr>
					<?php
					if (count($lang['arr_lang_name']) > 1) {
					?>
					<tr>
						<td valign="top">
							<label for="id_lang_sel"><?php echo $lang['txt_lang_selection'];?></label><br />
						</td>
						<td>
								<?php
								foreach($lang['arr_lang_name'] as $key => $i):
								?>
								<input id="id_lang_sel" type="checkbox" name="language_ids[]" value="<?php echo $key;?>" checked="checked" />&nbsp;<?php echo $i;?><br />
								<?php
								endforeach;
								?>
							<br />
						</td>
					</tr>
					<tr>
						<td>
							<label for="id_language"><?php echo $lang['txt_lang'];?></label><br />
						</td>
						<td>
							<select id="id_language" name="language_id" size="1">
								<?php
								foreach($lang['arr_lang_name'] as $key => $i):
								?>
								<option value="<?php echo $key;?>" <? if($data['language_id'] == $key) echo "selected";?>><?php echo $i;?></option>
								<?php
								endforeach;
								?>
							</select>&nbsp;*<br />
						</td>
					</tr>
					<?php
					}
					?>
				</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">
							<b><?php echo $lang['hdr_invite_notes'];?></b><br />
						</td>
					</tr>
					<tr>
						<td>
							<label for="id_subject"><?php echo $lang['txt_subject'];?></label><br />
						</td>
						<td>
							<input id="id_subject" type="text" size="40" name="subject" value="<?php if(isset($frmdata['subject'])) { echo $frmdata['subject'];}?>" /><br />
						</td>
					</tr>
					<tr>
						<td valign="top">
							<label for="id_message"><?php echo $lang['txt_message'];?></label><br />
						</td>
						<td>
							<textarea id="id_message" name="message" rows="6" cols="38"><?php if(isset($frmdata['message'])) { echo $frmdata['message'];}?></textarea>
						</td>
					</tr>
					<tr>
						<td align="right" colspan="2">
							<input type="submit" name="register" value="<?php echo $lang['sub_register'];?>" class="button_urgent" /><br />
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
	
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
	</form>
</div>

<div class="col_side">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_instructions'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php
				if (isset($total_registerted_users)) {
				?>
				<p>
					<b><?php echo $lang['txt_emails_registered'];?>: <?php echo $total_registerted_users;?></b><br />
				</p>
				<?php }?>
				
				<?php echo $lang['txt_instructions'];?><br />
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>
