<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php print $this->translate('Signup Page') ?></title>
	

	<link rel="stylesheet" type="text/css" href="<?php echo $this->siteBaseUrl; ?>css/jquery.ui.dialog.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo $this->siteBaseUrl ?>css/lang.css?<?php echo Zend_registry::get('config')->global['version'] ?>" media="screen"/>
	<link rel="stylesheet" type="text/css" href="<?php echo $this->siteBaseUrl ?>css/login/original.css" />

	<script type="text/javascript" src="<?php echo $this->siteBaseUrl ?>js/jQuery/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="<?php echo $this->siteBaseUrl ?>js/jQuery/ui/jquery-ui-1.7.2.custom.min.js"></script>
	<script type="text/javascript" src="<?php echo $this->siteBaseUrl; ?>js/browsercheck.js"></script>

</head>

<body id="bg" class="signup">
	
	<div id="container">
		<div id="header">
			<div id="logo"></div>
		</div>
		
		<div id="content">
			<?php if( !$this->signupAccepted) : ?>
			<h1 class="signup"><?php echo $this->translate('Signup not accepted') ?></h1>
			<h2 class="signup-text"><?php echo $this->translate('The signup has not been accepted. Please contact your administrator.'); ?></h2>
			<h1 class="signup"><?php echo '(' . $this->result['response']['message'] . ')' ?></h1>
			<?php else: ?>
			<h1 class="signup"><?php echo $this->translate('Signup complete') ?></h1>
			<h1 class="signup-complete"><?php echo $this->result['response']['message'] ?></h1>
			<h2 class="signup-text"><?php echo $this->translate('You can now login and begin using your Atmail Account.') ?> <a id="login" href="#"><?php echo $this->translate('Login') ?></a></h2>
			<form id="accountLoginForm" action="<?php echo $this->appBaseUrl ?>/mail/auth/processlogin" method="POST">
				<input type="hidden" name="emailName" value="<?php echo $this->requestParams['username'] ?>" />
				<input type="hidden" name="password" value="<?php echo $this->requestParams['Password'] ?>" />
				<input type="hidden" name="emailDomain" value="<?php echo $this->requestParams['hostname'] ?>" />
				<input type="hidden" name="requestedServer" value="" />
			</form>
			<script>
				// bind to the form's submit event and cancel legacy submit 
				$('#login').bind('click', function() 
				{
			    
			    	$('#accountLoginForm').submit();
					return false;
					
			    });
			</script>
			<?php endif; ?>
		</div>
		<div id="foot-process">
			<a href="http://www.atmail.com/" title="Linux email server" target="_blank"><?php echo $this->translate('Powered by Atmail') ?></a>
			- <?php echo $this->translate('Next Generation Atmail Platform') ?>
		</div>
	</div>
	</div>
</body>
</html>
