-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
135 lines (119 loc) · 5.38 KB
/
index.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
require('ressources/login/logincheck.php');
if(isset($_POST['connect'])) {
if(empty($_POST['login'])) {
$loginmissing = 1;
}
if(empty($_POST['password'])) {
$passwordmissing = 1;
}
$_SESSION['login'] = $_POST['login'];
$_SESSION['password'] = $_POST['password'];
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Gestionnaire de cabinet médical">
<meta name="author" content="Jules Lassara">
<title>MedManager</title>
<!-- Bootstrap CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts -->
<link rel="stylesheet" href="https://opensource.keycdn.com/fontawesome/4.7.0/font-awesome.min.css" integrity="sha384-dNpIIXE8U05kAbPhy3G1cz+yZmTzA6CY8Vg/u2L9xRnHjJiAK76m2BIEaSEV+/aU" crossorigin="anonymous">
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<!-- CSS -->
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container">
<a class="navbar-brand" href=".">MedManager</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<i class="fa fa-bars"></i>
</button>
<?php if(isConnected()): ?>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="usagers">Usagers</a>
</li>
<li class="nav-item">
<a class="nav-link" href="medecins">Médecins</a>
</li>
<li class="nav-item">
<a class="nav-link" href="consultations">Consultations</a>
</li>
<li class="nav-item">
<a class="nav-link" href="stats">Statistiques</a>
</li>
<li class="nav-item">
<a class="nav-link" href="ressources/login/disconnect.php"><i class="fa fa-power-off"></i> Se déconnecter</a>
</li>
</ul>
</div>
</div>
<?php endif; ?>
</nav>
<!-- Page Header -->
<header class="masthead" style="background-image: url('img/home-bg.jpg')">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<div class="site-heading">
<h1>MedManager</h1>
<span class="subheading">Gestionnaire de Cabinet Médical</span>
</div>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<?php if(isConnected()): ?>
<p>Bienvenue. Cet outil de travail vous permet de gérer les médecins, les usagers ainsi que les consultations prévues au sein du centre. Pour tout problème technique ou d'utilisation, veuillez contacter Jules Lassara.</p>
<?php elseif(loginFailed()): ?>
<p class="help-block text-danger"><i class="fa fa-remove"></i> Erreur : Identifiant et/ou mot de passe incorrect.</p>
<?php endif;
if(!isConnected()): ?>
<p>Cet outil de travail est reservé au personnel du centre médical. Veuillez vous identifier pour continuer votre navigation.</p>
<form method="POST">
<div class="control-group">
<div class="form-group floating-label-form-group controls">
<label>Identifiant</label>
<?php if(isset($loginmissing)): ?><p class="help-block text-danger"><i class="fa fa-remove"></i> Erreur : Veuillez renseigner ce champs.</p> <?php endif; ?>
<input type="text" class="form-control" placeholder="Identifiant" name="login" value="<?php if(isset($_POST['login'])) echo $_POST['login'] ?>">
</div>
</div>
<div class="control-group">
<div class="form-group floating-label-form-group controls">
<label>Mot de passe</label>
<?php if(isset($passwordmissing)): ?><p class="help-block text-danger"><i class="fa fa-remove"></i> Erreur : Veuillez renseigner ce champs.</p> <?php endif; ?>
<input type="password" class="form-control" placeholder="Mot de passe" name="password">
</div>
</div>
<br>
<div class="form-group">
<button type="submit" class="btn btn-primary" name="connect">Se connecter</button>
</div>
</form>
<?php endif; ?>
</div>
</div>
</div>
<hr>
<?php include('ressources/inc/footer.html'); ?>
<!-- Bootstrap JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- JavaScript -->
<script src="js/script.js"></script>
</body>
</html>