<?php 
/**
* @version		$Id: alogin.php 1034 2012-04-14 20:40:01Z datahell $
* @package		Elxis
* @subpackage	Templates / System
* @copyright	Copyright (c) 2006-2012 Elxis CMS (http://www.elxis.org). All rights reserved.
* @license		Elxis Public License ( http://www.elxis.org/elxis-public-license.html )
* @author		Elxis Team ( http://www.elxis.org )
* @description 	Elxis CMS is free software. Read the license for copyright notices and details
*/

defined('_ELXIS_') or die ('Direct access to this location is not allowed');
defined('ELXIS_ADMIN') or die('You can not access this file from this location!');


$csslink = $elxis->secureBase().'/templates/system/css/';
$csslink .= ($eLang->getinfo('DIR') == 'rtl') ? 'exit-rtl.css' : 'exit.css';

echo $page->doctype."\n";
?>
<html<?php echo $page->htmlattributes; ?>>
<head>
	<base href="<?php echo $elxis->getConfig('URL').'/'.ELXIS_ADIR; ?>/" />
	<?php echo $page->extrahead; ?>
	<meta http-equiv="content-type" content="<?php echo $page->contenttype; ?>; charset=utf-8" />
	<meta http-equiv="content-language" content="<?php echo $eLang->getinfo('LANGUAGE'); ?>" />
	<meta name="generator" content="Elxis - Open Source CMS" />
	<meta name="distribution" content="global" />
	<meta name="robots" content="noindex, nofollow" />
	<title><?php echo $page->title.' - '.$elxis->getConfig('SITENAME'); ?></title>
	<meta name="description" content="<?php echo $page->msgtitle; ?>" />
	<link rel="shortcut icon" href="<?php echo $page->favicon; ?>" />
	<link rel="stylesheet" href="<?php echo $csslink; ?>" type="text/css" media="all" />
	<script type="text/javascript">
	<?php echo ($page->cdata) ? '/* <![CDATA[ */' : ''; ?>
	function autocoff() {
		if (!document.getElementById) { return false; }
<?php 
		if ($page->confirmform == 0) {
?>
		document.getElementById('uname').value = '';
		document.getElementById('uname').setAttribute("autocomplete", "off");
<?php 
		}
?>
		document.getElementById('pword').value = '';
		document.getElementById('pword').setAttribute("autocomplete", "off");
	}
	<?php echo ($page->cdata) ? '/* ]]> */' : ''; ?>
	</script>
</head>
<body onload="autocoff();">
	<div class="exit_wrapper">
		<div class="exit_header"></div>
		<div id="exit_content">
			<div id="lcol">
				<div class="inner cimg center">
					<h2><?php echo $page->title; ?></h2>
					<img src="<?php echo $elxis->secureBase(); ?>/templates/system/images/exit/login-members.png" style="float:none;" alt="login" />
				</div>
			</div>
			<div id="rcol">
				<div class="inner">
					<h3><?php echo $page->msgtitle; ?></h3>
					<div class="msg"><?php echo $page->message; ?></div>
					<div id="loginform">
						<form name="fmelxisalogin" method="post" action="<?php echo $page->loginaction; ?>">
<?php 
						if ($page->confirmform == 0) {
							echo '<label for="uname">'.$eLang->get('USERNAME')."</label>\n";
							echo '<input type="text" name="uname" id="uname" value="" dir="ltr" class="login" />'."\n";							
							echo '<label for="pword">'.$eLang->get('PASSWORD')."</label>\n";
							echo '<input type="password" name="pword" id="pword" value="" dir="ltr" class="login" />'."\n";
						} else {
							echo '<label for="pword">'.$eLang->get('PASSWORD')."</label>\n";
							echo '<input type="password" name="pword2" id="pword" value="" dir="ltr" class="login" />'."\n";
						}
?>
							<input type="hidden" name="remember" dir="ltr" value="0" />
							<input type="hidden" name="auth_method" dir="ltr" value="elxis" />
							<input type="hidden" name="return" dir="ltr" value="<?php echo $page->return; ?>" />
							<button type="submit" ><span class="loginimg"><?php echo $page->buttontext; ?></span></button>
						</form>
					</div>
<?php 
				if ($page->loginerror != '') {
					echo '<div class="loginerr">'.$page->loginerror."</div>\n";
				}
?>
					<div class="currlang">
<?php 
				$lng = $eLang->currentLang();
				$info = $page->infolangs[$lng];
				echo '<img src="'.$page->flagsdir.$lng.'.png" alt="'.$info['NAME_ENG'].'" border="0" align="top" /> ';
				echo $info['NAME'].' <span dir="ltr">('.$info['NAME_ENG'].' '.$info['LANGUAGE'].'-'.$info['REGION'].")</span>\n";
?>
					</div>
					<div class="selclang">
<?php 
				echo '<div class="picklang">'.$eLang->get('CHOOSE_LANG')."</div>\n";
				foreach ($page->infolangs as $lng => $info) {
					$title = $info['NAME'].' - '.$info['NAME_ENG'];
					echo '<a href="'.$elxis->makeAURL($lng).'" title="'.$title.'">';
					echo '<img src="'.$page->flagsdir.$lng.'.png" alt="'.$info['NAME_ENG'].'" border="0" align="top" /></a> '."\n";
				}
?>
					</div>
				</div>
			</div> 
		</div>
		<div class="clear"></div>
		<div id="footer">
			<div id="fcontainer">
				<div id="sitename">
					<a href="<?php echo $page->sitelink; ?>" title="<?php echo $elxis->getConfig('SITENAME'); ?>">
						<?php echo $elxis->getConfig('SITENAME'); ?>
					</a>
				</div>
				<div id="copy">
					<a href="http://www.elxis.org" title="Elxis Open Source CMS">Elxis</a> 
					&#169; 2006-<?php echo date('Y'); ?> All Rights Reserved.<span class="logo">&#160;</span>
				</div>
			</div>
		</div>
	</div>
</body>
</html>