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

?>

<?php
if (isset($display) && $display=="man") {
?>
<div class="col_main">
	<div class="box">
		<div class="box_top">
			<?php echo $manual_page['title'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php echo $manual_page['man'];?><br />
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>

<div class="col_side">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_man'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php
				if (isset($lang['man'])) {
				foreach($lang['man'] as $key => $i):
				?>
				<p>
					<?php
					if (isset($manual_page) && $manual_page['man_id'] == $key) {
						echo $i[1];
					}
					else {
					?>
					<a href="spl_view.php?man=1&amp;man_id=<?php echo $key;?>"><?php echo $i[1];?></a><br />
					<?php }?>
				</p>
				<?php
				endforeach;
				}
				?>
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>

<?
}
elseif (isset($_SESSION['user_firstname'])) { // logged in
?>

<div class="col_left1">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_welcome'] . " " . $_SESSION['user_firstname'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php echo $lang['txt_introduction'];?><br />
			</div>
		</div>
	</div>
	
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
	
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_credits'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php echo $lang['txt_credits'];?><br />
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>
	
	<div class="col_right1">
		<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_start'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<p>
					<?php echo $lang['txt_start'];?><br />
				</p>
				
				<hr />
				<p align="right">

					<form name="default_page_set" action="spl_view.php" method="post">
						<input type="hidden" name="update_user_homepage" value="1">
						
						<?php echo $lang['form_user_homepage'];?>&nbsp;
						
						<?php
						$checked = "";
						
						if ($_SESSION['user_homepage'] != "spl_view.php") {
							$checked = "checked='checked'";
						}
						?>
						
						<input type="checkbox" name="user_homepage" value="1" <?php echo $checked;?> onClick="this.form.submit()">
					</form>
				</p>
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>
<?php
}
elseif (isset($display) && $display=="dormant") {
?>
<form action="spl_view.php" method="post">
	
<div class="col_left1">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_dormant'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php echo $lang['txt_intro_dormant'];?><br />
			</div>
		</div>
	</div>
			
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>

<div class="col_right1">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_activate'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<table cellpadding="4" cellspacing="0" border="0" width="100%">
					<tr>
						<td>
							<label for="id_email"><?php echo $lang['txt_email'];?></label><br />
						</td>
					</tr>
					<tr>
						<td>
							<input id="id_email" type="text" name="email" size="22" /><br />
						</td>
					</tr>
					<tr>
						<td>
							<label for="id_dob"><?php echo $lang['txt_dob'];?></label><br />
						</td>
					</tr>
					<tr>
						<td>
							<?php echo $datedropdown;?><br />
						</td>
					</tr>
					
					<tr>
						<td valign="top">
							<label for="id_captcha"><?php echo $lang['txt_captcha'];?></label><br />
						</td>
					</tr>
					
					<tr>
						<td>
							<?php echo $lang['txt_captcha_intro'];?><br />
						</td>
					</tr>
					<tr>
						<td>
							<img src="get_captcha.php" alt="CAPTCHA" class="picture"><br />
						</td>
					</tr>
				
					<tr>
						<td>
							<input id="id_captcha" type="text" name="captchastring" size="20"><br />
						</td>
					</tr>
					
					<tr>
						<td align="right">
							<input type="submit" name="activate" value="<?php echo $lang['sub_send'];?>" 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>
</div>
</form>

<?
}
else { // not logged in
?>

<div class="col_left1">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_welcome'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php echo $lang['txt_public_introduction'];?><br />
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
	
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_credits'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php echo $lang['txt_credits'];?><br />
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>

<div class="col_right1">
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_login'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<form action="spl_view.php" method="post">
				
				<p>
					<input type="hidden" name="http_referer" value="<?php if (isset($http_referer)) { echo $http_referer;}?>" />
					<label for="id_email"><?php echo $lang['txt_email'];?></label><br />
				</p>
				
				<p>
					<input id="id_email" class="input" type="text" name="email" size="20" value="" style="width: 140px" /><br />
				</p>
				
				<p>
					<label for="id_password"><?php echo $lang['txt_password'];?></label><br />
				</p>
				
				<p>
					<input id="id_password" class="input" type="password" name="password" size="12" value="" style="width: 100px" /><br />
				</p>
				
				<p>
					<?php echo $lang['txt_login_note'];?><br />
				</p>
				
				<p align="right">
					<input type="submit" class="input_submit" name="login" value="<?php echo $lang['sub_enter'];?>" class="input_submit" /><br />
				</p>
				
				</form>
			</div>
		</div>
	</div>
	
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
	
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_password'];?><br />
		</div>
		
		<div class="box_mid">
			<div class="content">
				<?php echo $lang['txt_new_password'];?><br />
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
	
	<div class="box">
		<div class="box_top">
			<?php echo $lang['hdr_about_aroundme'];?><br />
		</div>
		
		<div class="box_mid">
				<div class="content">
				<?php echo $lang['txt_about_aroundme'];?><br />
				
				<p align="right">
					<a href="http://www.barnraiser.org/aroundme/"><img src="<?php echo $templatePath;?>img/aroundme.png" width="142" height="43" alt="" border="0" /></a><br />
				</p>
			</div>
		</div>
	</div>
		
	<div class="box_bottom">
		<span class="box_bottom_right"></span>
		<span class="box_bottom_left"></span>
	</div>
</div>
<?php }?>
