-
Notifications
You must be signed in to change notification settings - Fork 0
/
utilisateur.php
345 lines (298 loc) · 13.5 KB
/
utilisateur.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<?php require_once 'includes/header.php';
if($_GET['o'] == 'addUser') {
// add order
echo "<div class='div-request div-hide'>addUser</div>";
} else if($_GET['o'] == 'manOnline') {
echo "<div class='div-request div-hide'>manOnline</div>";
} else if($_GET['o'] == 'societe') {
echo "<div class='div-request div-hide'>societe</div>";
} // /else manage order
?>
<style type="text/css">
.user-circle-online {
width: 15px!important;
height: 25px!important;
border-radius: 100%;
}
</style>
<div class="row">
<div class="col-md-12">
<ol class="breadcrumb">
<li><a href="dashboard.php">Tableau de Bord</a></li>
<li >Utilisateur</li>
<li class="active">
<?php if($_GET['o'] == 'addUser') { ?>
Gestion des utilisateurs
<?php } else if($_GET['o'] == 'manOnline') { ?>
Gestion des Connections
<?php } // /else manage order ?>
</li>
</ol>
<?php if($_GET['o'] == 'addUser') {
// add order
?>
<div class="div-action pull pull-right" style="padding-bottom:20px;">
<button class="btn btn-primary button1" data-toggle="modal" id="addutilisateurModalBtn" data-target="#addUtlisateurModal"> <i class="glyphicon glyphicon-plus-sign"></i>Ajoute Un Utilisateur </button>
</div> <!-- /div-action -->
<div class="panel panel-primary">
<div class="panel-heading">
<div class="page-heading"> <i class="glyphicon glyphicon-edit"></i>Gestion des utilisateurs</div>
</div> <!-- /panel-heading -->
<div class="panel-body">
<div class="remove-messages"></div>
<div class="col-md-12 table-responsive">
<table class="table table-hover table-bordered table-striped table-outline mb-0 nowrap text-center" id="manageUtlisateurTable">
<thead>
<tr>
<th class="text-center">Agence</th>
<th class="text-center">Nom</th>
<th class="text-center">E-mail</th>
<th class="text-center">Téléphone</th>
<th class="text-center">Rôle</th>
<th class="text-center">Status</th>
<th class="text-center">En Ligne</th>
<th style="width:15%;" class="text-center">Options</th>
</tr>
</thead>
</table>
<!-- /table -->
</div>
</div> <!-- /panel-body -->
</div> <!-- /panel -->
</div> <!-- /col-md-12 -->
</div> <!-- /row -->
<!-- add categories -->
<div class="modal fade" id="addUtlisateurModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<form class="form-horizontal" id="submitUtilisateurForm" action="php_action/createUtilisateur.php" method="POST">
<div class="modal-header btn-primary">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><i class="fa fa-plus"></i> Ajoute Un utilisateur</h4>
</div>
<div class="modal-body">
<div id="add-utlisateur-messages"></div>
<div class="form-group">
<label for="username" class="col-sm-4 control-label">Agence </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<select class="form-control" id="id_agence" name="id_agence">
<option value="">~~SELECT~~</option>
<?php
$sql = "SELECT id_agence, agence FROM agence ORDER BY agence ASC";
$result = $connect->query($sql);
while($row = $result->fetch_array()) {
echo "<option value='".$row[0]."'>".$row[1]."</option>";
} // while
?>
</select>
</div>
</div> <!-- /form-group-->
<div class="form-group">
<label for="username" class="col-sm-4 control-label">Nom </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<input type="text" class="form-control" id="username" placeholder="Nom" name="username" autocomplete="off">
</div>
</div> <!-- /form-group-->
<div class="form-group">
<label for="username" class="col-sm-4 control-label">E-mail </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<input type="email" class="form-control" id="email" placeholder="E-mail" name="email" autocomplete="off">
</div>
</div> <!-- /form-group-->
<div class="form-group">
<label for="username" class="col-sm-4 control-label">Téléphne </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<input type="telephone" class="form-control" id="telephone" placeholder="Téléphne" name="telephone" autocomplete="off">
</div>
</div> <!-- /form-group-->
<div class="form-group">
<label for="categoriesName" class="col-sm-4 control-label">Rôle </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<select class="form-control" id="role" name="role">
<option value="">~~SELECT~~</option>
<option value="1">Directeur(trice)</option>
<option value="2">Stock</option>
<option value="3">Facturation</option>
<option value="4">Comptable</option>
<option value="5">Administreteur</option>
</select>
</div>
</div> <!-- /form-group-->
<div class="form-group">
<label for="categoriesStatus" class="col-sm-4 control-label">Status </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<select class="form-control" id="status" name="status">
<option value="">~~SELECT~~</option>
<option value="1">Actif</option>
<option value="2">Desactif</option>
</select>
</div>
</div> <!-- /form-group-->
</div> <!-- /modal-body -->
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal"> <i class="glyphicon glyphicon-remove-sign"></i> Close</button>
<button type="submit" class="btn btn-primary" id="createUtlisateurBtn" data-loading-text="Loading..." autocomplete="off"> <i class="glyphicon glyphicon-ok-sign"></i> Enregistre</button>
</div> <!-- /modal-footer -->
</form> <!-- /.form -->
</div> <!-- /modal-content -->
</div> <!-- /modal-dailog -->
</div>
<!-- /add utlisateur -->
<!-- edit categories brand -->
<div class="modal fade" id="editCategoriesModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<form class="form-horizontal" id="editUtilisateurForm" action="php_action/editUtilisateur.php" method="POST">
<div class="modal-header btn-warning">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><i class="fa fa-edit"></i> Modifier l'Utilisateur</h4>
</div>
<div class="modal-body">
<div id="edit-utilisateur-messages"></div>
<div class="modal-loading div-hide" style="width:50px; margin:auto;padding-top:50px; padding-bottom:50px;">
<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>
<span class="sr-only">Loading...</span>
</div>
<div class="edit-utilisateur-result">
<div class="form-group">
<label for="username" class="col-sm-4 control-label">Agence </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<select class="form-control" id="editId_agence" name="editId_agence">
<option value="">~~SELECT~~</option>
<?php
$sql = "SELECT id_agence, agence FROM agence ORDER BY agence ASC";
$result = $connect->query($sql);
while($row = $result->fetch_array()) {
echo "<option value='".$row[0]."'>".$row[1]."</option>";
} // while
?>
</select>
</div>
</div> <!-- /form-group-->
<div class="form-group">
<label for="username" class="col-sm-4 control-label">Nom </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<input type="text" class="form-control" id="editUsername" placeholder="Nom" name="editUsername" autocomplete="off">
</div>
</div> <!-- /form-group-->
<div class="form-group">
<label for="username" class="col-sm-4 control-label">E-mail </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<input type="email" class="form-control" id="editEmail" placeholder="E-mail" name="editEmail" autocomplete="off">
</div>
</div> <!-- /form-group-->
<div class="form-group">
<label for="username" class="col-sm-4 control-label">Téléphne </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<input type="text" class="form-control" id="editTelephone" placeholder="Téléphne" name="editTelephone" autocomplete="off">
</div>
</div> <!-- /form-group-->
<div class="form-group">
<label for="categoriesName" class="col-sm-4 control-label">Rôle </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<select class="form-control" id="editRole" name="editRole">
<option value="">~~SELECT~~</option>
<option value="1">Directeur(trice)</option>
<option value="2">Stock</option>
<option value="3">Facturation</option>
<option value="4">Comptable</option>
<option value="5">Administreteur</option>
</select>
</div>
</div> <!-- /form-group-->
<div class="form-group">
<label for="categoriesStatus" class="col-sm-4 control-label">Status </label>
<label class="col-sm-1 control-label">: </label>
<div class="col-sm-7">
<select class="form-control" id="editStatus" name="editStatus">
<option value="">~~SELECT~~</option>
<option value="1">Actif</option>
<option value="2">Desactif</option>
</select>
</div>
</div> <!-- /form-group-->
</div>
<!-- /edit brand result -->
</div> <!-- /modal-body -->
<div class="modal-footer editUtilisateurFooter">
<button type="button" class="btn btn-danger" data-dismiss="modal"> <i class="glyphicon glyphicon-remove-sign"></i> Close</button>
<button type="submit" class="btn btn-warning" id="editCategoriesBtn" data-loading-text="Loading..." autocomplete="off"> <i class="glyphicon glyphicon-ok-sign"></i> Enregistre</button>
</div>
<!-- /modal-footer -->
</form>
<!-- /.form -->
</div>
<!-- /modal-content -->
</div>
<!-- /modal-dailog -->
</div>
<!-- /categories brand -->
<!-- categories brand -->
<div class="modal fade" tabindex="-1" role="dialog" id="removeUtlisateurModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header btn-danger">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><i class="glyphicon glyphicon-trash"></i> Supprime un utilisateur</h4>
</div>
<div class="modal-body">
<p>Ets vous sûre de voiloir supprime cet utilisateur ?</p>
<div id="utlisateurInfo" class="text-danger text-center"></div>
</div>
<div class="modal-footer removeCategoriesFooter">
<button type="button" class="btn btn-default" data-dismiss="modal"> <i class="glyphicon glyphicon-remove-sign"></i> Close</button>
<button type="button" class="btn btn-primary" id="removeCategoriesBtn" data-loading-text="Loading..."> <i class="glyphicon glyphicon-ok-sign"></i> OK</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- /categories brand -->
<?php } else if($_GET['o'] == 'manOnline'){
// add order
?>
<div class="row">
<div class="col-md-12">
<div class="div-action pull pull-right" style="padding-bottom:20px;">
<button class="btn btn-primary button1" data-toggle="modal" id="addutilisateurModalBtn" data-target="#addUtlisateurModal"> <i class="glyphicon glyphicon-plus-sign"></i>Ajoute Un Utilisateur </button>
</div> <!-- /div-action -->
<div class="panel panel-primary">
<div class="panel-heading">
<div class="page-heading"> <i class="glyphicon glyphicon-edit"></i>Gestion des utilisateurs</div>
</div> <!-- /panel-heading -->
<div class="panel-body">
<div class="remove-messages"></div>
<div class="col-md-12 table-responsive">
<table class="table table-hover table-bordered table-striped table-outline mb-0 nowrap text-center" id="manageUtlisateurTableConnection">
<thead>
<tr>
<th class="text-center">Nom</th>
<th class="text-center">Date Entre</th>
<th class="text-center">Date Sortir</th>
<th style="width:15%;" class="text-center">Options</th>
</tr>
</thead>
</table>
<!-- /table -->
</div>
</div> <!-- /panel-body -->
</div> <!-- /panel -->
</div> <!-- /col-md-12 -->
</div> <!-- /row -->
<?php }
// add order
?>
<?php
?>
<script src="custom/js/utilisateur.js"></script>
<?php require_once 'includes/footer.php'; ?>