<?php if (!defined('FLUX_ROOT')) exit; ?>
<div class="loginPanel">
	<?php if (!$session->isLoggedIn()): ?>      
	<form action="<?php echo $this->url('account', 'login', array('return_url' => $params->get('return_url'))) ?>" method="post" autocomplete="off">
		<input type="hidden" name="server" value="<?php echo htmlspecialchars($session->loginAthenaGroup->serverName) ?>">
		<table cellpadding="0" cellspacing="0">
			<tr>
				<td>
					<input type="text" name="username" class="textClass username" placeholder="Username" />
				</td>
				<td>
					<input type="password" name="password" class="textClass password" placeholder="Password" />
				</td>
				<td>
					<div class="loginBtn">
						<input type="submit" value=" "/>
						<div class="dropDown">
							<button type="button">&nbsp;
								<ul class="no-list">
									<li><a href="<?php echo $this->url('account','create'); ?>">Register</a></li>
									<li><a href="<?php echo $this->url('account','resetpass'); ?>">Forgot Password?</a></li>
								</ul>
							</button>
						</div>
					</div>
				</td>
			</tr>
		</table>
	</form>
	<?php else:?>
		<div class="logged">
			<p>
				Welcome <strong><a href="<?php echo $this->url('account', 'view') ?>" title="View account"><?php echo htmlspecialchars($session->account->userid) ?></a></strong> 
				on <?php echo htmlspecialchars($session->serverName) ?>.
			</p>
			<a href="<?php echo $this->url('account','logout')?>" onclick="return confirm('Are you sure you want to logout?')"><img src="<?php echo $this->themePath('img/logout.png'); ?>" alt=""></a>
		</div>
	<?php endif?>
</div>