1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| <?php
session_start();
require_once("PEAR.php");
include('MDB2.php');
include('template.php');
include('BDD.php');
require_once "Auth.php";
require_once "Auth/Auth.php";
$options = array(
'dsn' => 'mysql://root:admin@localhost/Test',
'table' => 'personne',
'usernamecol' => 'username',
'passwordcol' => 'codepin',
'cryptType' => 'md5',
'db_fields' => '*'
);
static $a;
$a = new Auth("MDB2", $options);
$a->start();
if ($a->checkAuth()) {
header('Location: index_admin.php');
}
?> |
Partager