extranet/www/localauth/index.php

54 lines
1.8 KiB
PHP

<?php
if (isset($_REQUEST['login']) && isset($_REQUEST['pass'])){
header('Location: http://'.$_SERVER['SERVER_NAME'].'/?page=main&lang=fr&secure=8f66c76ce72b8f45dadfe49fd5db90e0&action=logon&login='.$_REQUEST['login'].'&pass='.$_REQUEST['pass'].'&hach='.$_REQUEST['hach']);
exit;
}
?>
<html>
<script type="text/javascript" src="./md5.js"></script>
<script language="javascript">
<!--
function doChallengeResponse() {
if (document.forms[0].login.value!='' && document.forms[0].pass.value!=''){
str = document.forms[0].login.value+'|'+document.forms[0].pass.value;
document.forms[0].hach.value = MD5(str);
document.forms[0].pass.value = '';
return true;
}else{
alert('Veuillez remplir les champs "login" et "pass".');
return false;
}
}
// -->
</script>
<body>
<form name="form_logon" action="./index.php" enctype="multipart/form-data" method="post" onsubmit="return doChallengeResponse();">
<h2>CONNEXION EXTRANET</h2>
<table>
<tbody><tr>
<td class="data">Login</td>
<td colspan="2" class="inserttext"><input id="login" name="login" size="20" value="" type="text"></td>
</tr>
<tr>
<td class="data">Pass</td>
<td colspan="2" class="inserttext"><input id="pass" name="pass" size="20" value="" type="password"></td>
</tr>
<tr>
<td class="data"></td>
<td colspan="2" class="inserttext"><input value="OK" class="bouton" type="submit"></td>
</tr>
</tbody></table>
<input name="hach" value="" type="hidden">
<input name="action" value="logon" type="hidden">
<input name="lang" value="fr" type="hidden">
<input name="resolution" value="1280*800" type="hidden">
<input name="nbcolors" value="16" type="hidden">
<input name="secure" value="8f66c76ce72b8f45dadfe49fd5db90e0" type="hidden">
</form>
</body>
</html>