<?
header('Content-Type: text/html; charset=iso-8859-1');

function ha_erro(){	return $_SESSION['erro'] ? true:false; }
function get_erro(){
	$erro = $_SESSION['erro'];
	$_SESSION['erro'] = '';
	return $erro;
}
?>
<style>
#popup #topo{ width: 100%; }
#popup #topo{ border-bottom: 1px solid white; }
#popup #topol{ width: 275px; font-size:28px; vertical-align: middle;padding-left:20px;}
#popup #topor{ width: 28px;background:#CCC; text-align:center;}
#popup #topor A{ color: black; font-size:28px; text-decoration: none;}
#popup img{ display: block;}
#fancybox-outer {background: #CCC}

.clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.clearfix{display: inline-block;}
* html .clearfix{height: 1%;}
.clearfix{display: block;}

.esq{float: left; position: relative; display: inline;}
.dir{float: right; position: relative;}

#contentor{
	padding: 20px;
}

label.error{
	color:red;
}
</style>
<script>
$(document).ready(function() {
	
	$("#formlogin").validate({	
		rules: {
			login: {required: true},
			password: {required: true}	
		},
		messages: {
			login: {required: " Indique o seu login"},
			password: {required: " Indique a sua password"}	
		},
		submitHandler: function(form) {
			$(form).ajaxSubmit({target: "#erroLogin", clearForm:true });
		}
	});
	
});

</script>
<div id="popup">
	<div id="topo" class="clearfix">
		<div id="topol" class="esq">LOGIN</div>
		<div id="topor" class="dir"><a href="javascript:;" onclick="$.fancybox.close();">X</a></div>
	</div>
	<div id="contentor" class="clearfix">
			<h6>Faça login para aceder à sua revista</h6>
			<br>
			<form name="formlogin" id="formlogin" action="dologin.php" method="post">
			<p>
			<label for="login">Login (seu endereço de email)</label><br> 
			<input id="inputlogin" class="border" type="text" name="login">
			</p>
			<br>
			<p>
			<label for="login">Password (nº assinante) </label><br> 
			<input id="passwordlogin" class="border" type="password" name="password">
			</p>
			<p>
			<br>
			<label for="login">Fazer Login automáticamente</label>
			<input id="checklogin" class="border" type="checkbox" name="auto" value="1">
			</p>
			<div id="erroLogin"></div>
			<br>
			<input type="submit" id="btnsubmitlogin" class="botao" value="entrar">
		</form>

	</div>

</div>

