<?php // @version $Id: default.php 10864 2008-08-30 07:08:04Z willebil $
defined('_JEXEC') or die('Restricted access');
?>

<?php
$return = base64_encode(base64_decode($return).'#content');

if ($type == 'logout') : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form">
	<?php if ($params->get('greeting')) : ?>
	<p>
	<?php if ($params->get('name')) : {
		echo JText::sprintf( 'MOD_LOGIN_HINAME', $user->get('name') );
	} else : {
		echo JText::sprintf( 'MOD_LOGIN_HINAME', $user->get('username') );
	} endif; ?>
	</p>
	<?php endif; ?>
	<div class="readon-wrap1"><div class="readon1-l"></div><a class="readon-main"><span class="readon1-m"><span class="readon1-r"><input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGOUT'); ?>" /></span></span></a></div><div class="clr"></div>
<input type="hidden" name="option" value="com_users" />
	<input type="hidden" name="task" value="user.logout" />
	<input type="hidden" name="return" value="<?php echo $return; ?>" />
	<?php echo JHtml::_('form.token'); ?>
</form>
<?php else : ?>
<div class="main-login-form">
	<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" class="form-login" id="login-form" >
		<?php if ($params->get('pretext')) : ?>
		<p>
			<?php echo $params->get('pretext'); ?>
		</p>
		<?php endif; ?>
		<div class="username-block">
			<input name="username" type="text" class="inputbox png" value="<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME'); ?>" alt="<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME'); ?>" onblur="if(this.value=='') this.value='<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME'); ?>';" onfocus="if(this.value=='<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME'); ?>') this.value='';" />
		</div>
		<div class="password-block">
			<input type="password" id="modlgn-passwd" name="password" class="inputbox png" alt="<?php echo JText::_('JGLOBAL_PASSWORD'); ?>" />
		</div>
		<div class="login-extras">
			<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
			<div class="remember-me">
			<input type="checkbox" name="remember" class="checkbox" value="yes" alt="<?php echo JText::_('MOD_LOGIN_REMEMBER_ME'); ?>" />
			<label class="remember">
				<?php echo JText::_('MOD_LOGIN_REMEMBER_ME'); ?>
			</label>	
			</div>
			<?php endif; ?>
			<div class="readon-wrap1"><div class="readon1-l"></div><a class="readon-main"><span class="readon1-m"><span class="readon1-r"><input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGIN') ?>" /></span></span></a></div><div class="clr"></div>
			<input type="hidden" name="option" value="com_users" />
			<input type="hidden" name="task" value="user.login" />
			<input type="hidden" name="return" value="<?php echo $return; ?>" />
			<?php echo JHtml::_('form.token'); ?>
			<div class="login-links">
			<p>
				<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
					<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?></a>
			</p>
			<p>
				<a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>">
					<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?></a>
			</p>
			</div>
			<?php $usersConfig = JComponentHelper::getParams('com_users');
				if ($usersConfig->get('allowUserRegistration')) : ?>
					<p>
						<?php echo JText::_('No account yet? '); ?>
						<a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>">
							<?php echo JText::_('MOD_LOGIN_REGISTER'); ?></a>
					</p>
				<?php endif; ?>
				<?php if ($params->get('posttext')): ?>
					<?php echo $params->get('posttext'); ?>
				<?php endif; ?>
		</div>
	</form>
</div>
<?php endif;
