-
Notifications
You must be signed in to change notification settings - Fork 2
/
profil.php
98 lines (93 loc) · 3.21 KB
/
profil.php
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php session_start() ?>
<!DOCTYPE html>
<html>
<head>
<link rel="icon" type="image/png" href="ma.radees.radees.png" />
<title>Profil</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><!--Pour que le rendu et le zoom-->
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="bootstrap-4.3.1-dist/css/bootstrap.min.css">
</head>
<body>
<div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom shadow-sm">
<h5 class="my-0 mr-md-auto font-weight-normal"><img src="ma.radees.radees.PNG" hight="40" width="40"class="rounded float-left"><img src="RADEES_title.PNG" hight="200" width="200"class="rounded float-left"></h5>
<nav class="my-2 my-md-0 mr-md-3">
<a class="p-2 text-dark" href="Profil.php">Profil</a>
<a class="p-2 text-dark" href="demander.php">Demander</a>
<a class="p-2 text-dark" href="mesdemandes.php">Mes demandes</a>
</nav>
<a class="btn btn-outline-success" href="Deconnexion.php">déconnexion</a>
</div>
<center>
<?php
$serveur="localhost";
$login="root";
$pass="";
$id=$_SESSION['mat'];
try{
$connexion = new PDO("mysql:host=$serveur;dbname=gestionconge",$login,$pass);
$connexion->setattribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$connexion->query('SET NAMES utf8');
$requete1=$connexion->prepare("
SELECT MATRICULE,NOM,PRENOM,POST,NOM_SERVICE,ID_SERVICE FROM AGENT natural join service where MATRICULE=$id");
$requete1->execute();
$requete1=$requete1->fetchall();
$MAT=$requete1[0][0];
$NOM=$requete1[0][1];
$PRENOM=$requete1[0][2];
$POST=$requete1[0][3];
$SERVICE=$requete1[0][4];
$ID_SERVICE=$requete1[0][5];
$requete2=$connexion->prepare("
SELECT NOM_DIVISION FROM division natural join service where ID_SERVICE=$ID_SERVICE");
$requete2->execute();
$requete2=$requete2->fetchall();
$DIVISION=$requete2[0][0];
}
catch(PDOEXEPTION $e){
echo'echec:'.$e->get_message();
}
?>
<div class="container">
<div class="row">
<div class="col-sm-12">
<table class="table table-bordered table table-striped">
<thead>
<tr>
<th scope="col" colspan="2"><center>Informations personnel</center></th>
</tr>
</thead>
<tbody>
<tr>
<td>Matricule</td>
<td><?php echo $MAT ?></td>
</tr>
<tr>
<td>nom</td>
<td><?php echo $NOM ?></td>
</tr>
<tr>
<td>Prénom</td>
<td><?php echo $PRENOM ?></td>
</tr>
<tr>
<td>Post</td>
<td><?php echo $POST ?></td>
</tr>
<tr>
<td>Servive</td>
<td><?php echo $SERVICE ?></td>
</tr>
<tr>
<td>Division</td>
<td><?php echo $DIVISION ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</center>
</body>
</html>