extranet/www/localauth/index.php

48 lines
1.6 KiB
PHP

<?php
if (isset($_REQUEST['login']) && isset($_REQUEST['pass'])){
header('Location: http://'.$_SERVER['REMOTE_HOST'].'/?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() {
str = document.forms[0].login.value+'|'+document.forms[0].pass.value;
document.forms[0].hach.value = MD5(str);
document.forms[0].pass.value = '';
}
// -->
</script>
<body>
<form name="form_logon" action="./index.php" enctype="multipart/form-data" method="post" onsubmit="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="mricois" type="text"></td>
</tr>
<tr>
<td class="data">Pass</td>
<td colspan="2" class="inserttext"><input id="pass" name="pass" size="20" value="bj10sx" 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>