Subversion Repositories ALCASAR

Rev

Rev 593 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 593 Rev 610
Line 1... Line 1...
1
<?php
1
<?php
2
/*
2
/*
3
 
3
 
4
 
4
 
5
*/
5
*/
-
 
6
//Include files
6
require_once('includes/defines.inc.php');
7
require_once('includes/defines.inc.php');
7
require_once(ALCASAR_ADMIN_PATH_INC.'/session.inc.php');
8
require_once(ALCASAR_ADMIN_PATH_INC.'/session.inc.php');
-
 
9
require_once('mysql.class.php');
-
 
10
 
8
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
11
// récupération des variable $_POST (login, pwd)
-
 
12
 
-
 
13
// test des variables $_POST
-
 
14
 
-
 
15
$login ="";
9
<html>
16
$pwd="";
-
 
17
// authentification (mysql)
-
 
18
$database = new mysql($db_host,$db_user,$db_pwd,$db_name);
-
 
19
$sql_query=sprintf("SELECT UserName FROM userinfo WHERE id=%s AND UserName=%s",
-
 
20
    GetSQLValueString($login, "text"), GetSQLValueString($password, "text"));
-
 
21
$result = $database->query($sql);
-
 
22
 
-
 
23
// variables de session
-
 
24
 
-
 
25
// redirection (si authentifié)
-
 
26
 
-
 
27
// affichage du formulaire (si aucune authentification en cours)
-
 
28
 
-
 
29
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-
 
30
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
 
31
<html xmlns="http://www.w3.org/1999/xhtml">
10
<head>
32
<head>
11
<title>Login page</title>
33
<title>Login page</title>
12
<link rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/default.css" type="text/css">
34
<link rel="stylesheet" href="<?php echo ALCASAR_ADMIN_PATH_CSS; ?>/default/default.css" type="text/css">
13
</head>
35
</head>
-
 
36
<style>
-
 
37
/*
-
 
38
style provisoire, en attente ...
14
 
39
*/
-
 
40
form.css fieldset
-
 
41
  {
-
 
42
  padding: 1em;
-
 
43
  width: 250px;
-
 
44
  }
-
 
45
form.css label
-
 
46
  {
-
 
47
  display: inline;
-
 
48
  float: left;
-
 
49
  width: 100px;
-
 
50
  }
-
 
51
</style>
15
<h1>LOGIN PAGE</h1>
52
<h1>LOGIN PAGE</h1>
-
 
53
<form name="loginForm" action="" method="" class="css">
-
 
54
<fieldset>
-
 
55
<legend>Authentification :</legend>
-
 
56
<label for="login">Utilisateur :</label><input type="test" name="login" value="" size="20"><br>
-
 
57
<label for="pwd">Mot de passe :</label><input type="password" name="pwd" value="" size="20"><br>
-
 
58
<input type="submit" name="valider" value="Valider">
-
 
59
</fieldset>
-
 
60
</form>
-
 
61
<font color="red">
-
 
62
Style et graphique à faire. Test et affichage des erreurs de saisie à ajouter.
-
 
63
</font>
16
</body>
64
</body>
17
</html>
65
</html>
18
 
66