Version 1.12
This commit is contained in:
parent
2a066a7498
commit
de31cd3e9a
1373 changed files with 156282 additions and 45238 deletions
60
htdocs/l4H1ev9IwDs40/connexion.php
Normal file
60
htdocs/l4H1ev9IwDs40/connexion.php
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
require_once('../../onyx2/load.php');
|
||||
|
||||
$session = new Session();
|
||||
|
||||
$message = 'Bienvenue';
|
||||
|
||||
$login = gpc('login','post');
|
||||
$password = gpc('password','post');
|
||||
|
||||
if($login && $password)
|
||||
{
|
||||
$file = file('login.list');
|
||||
foreach($file as $line)
|
||||
{
|
||||
$acces = explode(':',$line);
|
||||
if($login === $acces[0] && md5($password) == trim($acces[1]))
|
||||
{
|
||||
$connected = Cache::read('preview_connected');
|
||||
|
||||
if(!is_array($connected)) Cache::set('preview_connected',array($login => time()));
|
||||
|
||||
elseif(in_array($login,$connected)) exit(header("Location: preview.php"));
|
||||
|
||||
else
|
||||
{
|
||||
$connected[$login] = time();
|
||||
Cache::set('preview_connected',$connected);
|
||||
}
|
||||
|
||||
|
||||
$session->values = array('login' => $login);
|
||||
$session->level = 1;
|
||||
$session->put($login);
|
||||
|
||||
exit(header("Location: preview.php"));
|
||||
}
|
||||
}
|
||||
$message = 'login ou mot de passe incorrect';
|
||||
}
|
||||
|
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Connexion</title>
|
||||
<link rel="stylesheet" href="css/connexion.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form action="" method="post">
|
||||
<fieldset>
|
||||
<label for="login">Login : <input type="text" id="login" name="login" /></label><br />
|
||||
<label for="password">Mot de passe : <input type="password" id="password" name="password" /></label><br />
|
||||
<input type="submit" id="submit" value="Connexion" />
|
||||
<div><?php echo $message ?></div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue