<?php
if(strstr(getcwd(), "inc")){
	$popup = 1;
	chdir("../");
	include_once ("inc/utils2.inc.php");
	$dir = "../";
	header('Content-Type: text/html; charset=iso-8859-1');
}

/*
$popup = $_REQUEST['popup'];
if ($popup){
	chdir("../");
	include_once ("inc/utils2.inc.php");
	header('Content-Type: text/html; charset=iso-8859-1');
}
*/



?>
<script type="text/javascript">
$(document).ready(function() {

	$("#inputlogin").click(function(){ $(this).val(""); });
	$("#passwordlogin").click(function(){ $(this).val(""); });

	$("#formlogin").validate({
		errorLabelContainer: "#erroLogin",	
		rules: {
			login: {required: true},
			password: {required: true}	
		},
		messages: {
			login: {required: "<br>indica o teu login"},
			password: {required: "<br>indica a tua password"}	
		}
	});
	
});
</script>
<style> 
#registologin h6{color:white;font-size:24px;}
#erroLogin {color: red; margin: 5px 0} 
#login h3{margin-left:0; margin-bottom:12px; color: #3DB2BF}
#login .esq, #login .dir {width: 279px}
#btnsubmitlogin{border: none;height: 42px; width:238px;font-size:24px}
#btnregistarlogin{border: none;height: 32px; width:238px;font-size:18px}
</style>

<div id="caixalogin" class="redondo" style="text-align: left;">
	<div id="login" class="clearfix">
		<form action="programa/" method="post" id="formlogin">
			<div class="esq">
				<h3>Login+</h3>
				<h2>Introduz o teu login e password para teres acesso ao teu programa M+</h2>
			</div>
			<div class="dir">
				
					<input id="inputlogin" class="border" type="text" value="login" name="login">
					<br><br>
					<input id="passwordlogin" class="border" type="password" value="password" name="password">
									
				
				<div id="erroLogin"><?if(ha_erro()){echo get_erro();} ?></div>
				<div id="lembrarlogin">
					<!-- <input type="checkbox">&nbsp;Lembrar o login neste computador<br><br> -->
					<a href="recuperar_password/">Recuperar login/password</a><br><br>

					<input type="submit" id="btnsubmitlogin" class="botao redondobotaoGrande laranja" value="entrar">
				</div>
			</div>
		</form>	
	</div>

</div>