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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
<h2>S identifier</h2>
<form action="<?php echo $PHP_SELF; ?>" method="post">
<?php
/*if (isset($_SESSION['user_id'])){
echo "<p align=center>Authentification réussie</p><br><br>";
}
else{*/
?>
<p class="search">Identifiant:
<input name="user" type="text" size="18" />
<br />
Mot de passe:
<input name="password" type="password" class="inputbox" size="18" />
<input class="side" type="submit" value="Se connecter" />
<br /> <br />
<a href="#">mot de passe oublié ?</a>
</p></form>
<?php
/*}*/
$ident = $_POST['user'];
$password = md5($_POST['password']);
if (isset($ident) and isset($password)){
//connexion a Oracle
Putenv("ORACLE_HOME=/oracle/product/920");
$db = "XE";
$login='xxxxx';$mdp='xxxx';
$conn=OCILogon($login,$mdp,$db);
if (!$conn) {
echo "Connexion à la base impossible";
} else {
$query0 = "select user_id from compt_util where cod_id=:ident and mdp=:password";
$state0=ociparse($conn,$query0);
OCIBindByName($state0,":ident",&$ident,-1);
OCIBindByName($state0,":password",&$password,-1);
OCIexecute($state0);
while (ocifetchinto($state0,$result0)){
$_SESSION['user_id']= $result0[0];
}
}
OCILogoff($conn);
}
?>
<h2>Gestion du profil</h2>
<ul>
<li <?php if (isset($_SESSION['user_id'])){echo "><a href=\"?page=1\">Mise à jour infos personnelles</a>";}else{echo "disabled>Mise à jour infos personnelles";}?></li>
<li <?php if (isset($_SESSION['user_id'])){echo "><a href=\"?page=7\">Renseigner ma situation </a>";}else{echo "disabled>Renseigner ma situation ";}?></li>
</ul> |
Partager