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 56 57 58 59 60 61 62
|
<?
session_start();
"<b>".$date2 = date("d-m-y");
require("m_fonctions_utiles.php");
require("codes_oracle.php");
m_Sql_connect_Oracle(SERVEUR_ORACLE, UTILISATEUR_ORACLE, MOTDEPASSE_ORACLE, NOMBASE_ORACLE);
$id_stagiaire=$_POST['id_stagiaire'];
$sql_postulant="select id_stagiaire from stagiaire where id_stagiaire='".$id_stagiaire."'";
$req_postulant=m_Sql_Query_Oracle($sql_postulant);
$res= m_Sql_LigneRs_Oracle($req_postulant);
if($res)
{
//$_SESSION['session']=0;
$_SESSION['id_stagiaire'] = $id_stagiaire;
m_Sql_Close_rs_Oracle($req_postulant);
m_Sql_Close_cnx_Oracle();
header("Location:presencearrivee.php");
}
else
{
m_Sql_Close_rs_Oracle($req_postulant);
m_Sql_Close_cnx_Oracle();
header("Location:presenceErreur.php");
}
$sql_postulant2="select heure_arrivee from presence where id_stagiaire='".$id_stagiaire."' and jour = '".$date2."' ";
$req_postulant2=m_Sql_Query_Oracle($sql_postulant2);
$res2= m_Sql_LigneRs_Oracle($req_postulant2);
if($res2)
$_SESSION['id_stagiaire'] = $id_stagiaire;
m_Sql_Close_rs_Oracle($req_postulant2);
m_Sql_Close_cnx_Oracle();
header("Location:presencedepart.php");
}
else
{
m_Sql_Close_rs_Oracle($req_postulant2);
m_Sql_Close_cnx_Oracle();
header("Location:presenceErreur.php");
}
?> |
Partager