<?php

	require_once($_SERVER['DOCUMENT_ROOT'].'/espace_personnel/inc/head-lib.php');

	$sql_pleiad = dbquery("SELECT * FROM auditeurs WHERE id = '".$_SESSION['user']['id']."' ");
	if(dbnumrows($sql_pleiad)>0){
		$password = dbresult($sql_pleiad,0,'password');
		$login = dbresult($sql_pleiad,0,'login');
		echo'
		<form id="connexion_pleiad" method="post" action="http://ne.pleiad.net/controle.php">
			<input type="hidden" name="Login" value="'.$login.'"/>
			<input type="hidden" name="Password" value="'.$password.'"/>
			<input name="login_submit" value="Connexion" type="submit" />
		</form>
		';
	}

?>

<script>
	$("#connexion_pleiad").submit();
	function connexion_pleiad(){$("#connexion_pleiad").submit();}

	$(document).ready(connexion_pleiad());
</script>