Newer
Older
<?php
function dispAdminUsers () {
if ($_SESSION["user_right"] < $GLOBALS["EPTV"] )
{
return("T'es ouf");
}
get_time();
$result = getAllUsers();
$str = '
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td>
<b>
<font color="#ffffff">
  a l l   u s e r s
</font>
</td>
</tr>
';
if ($_SESSION["user_right"] == $GLOBALS["ROOT"]) {
$str .= '
<tr>
<td>
<FORM name="new_user" method="post" action="index.php?html=AdminHome§ion_admin=AdminAddUser">
<INPUT class="button" TYPE="submit" NAME="action" VALUE=" NOUVEAU USER "><BR> </TD>
</FORM>
</td>
</tr>
';
}
$str .= '
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<TR>
<td><b>Login</b></td>
<td><b>Pseudo</b></td>
<td><b>Right</b></td>
</TR>
<TR>
';
$cpt = 1;
while ($user = mysql_fetch_array($result)) {
'<TD>
<small><b>'.$cpt.'</b></small>
'.$user["user_login"].'
'.$user["user_pseudo"].'
</TD>
<TD>
<small>
'.$name=get_right_name($user["user_right"]).'
</small>
</TD>
';
if ($_SESSION["user_right"] == $GLOBALS["ROOT"]) {
<FORM name="update_user" method="post" action="index.php?html=AdminHome§ion_admin=AdminModifUser&element_id='.$element_id.'">
<INPUT class="button" TYPE="submit" NAME="action" VALUE=" MODIFIER ">
<FORM name="supp_user" method="post" action="index.php?html=AdminHome§ion_admin=AdminDelUser&element_id='.$element_id.'">
<INPUT class="button" TYPE="submit" NAME="action" VALUE=" SUPPRIMER ">
</FORM>
</TD>
';
}
$str .= '
</TR>';
$cpt++;
}
$str .= '
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
';
return $str;
}
function dispAdminAddUser() {
$date = get_date();
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td>
<b>
<font color="#ffffff">
  a d d   u s e r   t o   d a t a b a s e
</font>
<tr>
<form name="saisie" method="post" action="index.php?html=AdminHome§ion_admin=AddUser&element_id='.$element_id.'">
<TR><TD> Login: </TD>
<TD> <INPUT TYPE="text" NAME="user_get_login" VALUE="" SIZE="20" MAXLENGTH="20"> </TD>
</TR>
<TR><TD> Pseudo: </TD>
<TD> <INPUT TYPE="text" NAME="user_get_pseudo" VALUE="" SIZE="20" MAXLENGTH="20"> </TD>
</TR>
<TR><TD> Pass: </TD>
<TD> <INPUT TYPE="password" NAME="user_get_pass" VALUE="" SIZE="20" MAXLENGTH="20"> </TD>
</TR>
<TR><TD> Re Pass: </TD>
<TD> <INPUT TYPE="password" NAME="user_get_verif_pass" VALUE="" SIZE="20" MAXLENGTH="20"> </TD>
</TR>
<TR><TD> Mail: </TD>
<TD> <INPUT TYPE="text" NAME="user_get_mail" VALUE="" SIZE="30" MAXLENGTH="30"> </TD>
</TR>
<TR><TD> Numro de tlphone: </TD>
<TD> <INPUT TYPE="text" NAME="user_get_tel" VALUE="" SIZE="10" MAXLENGTH="10"> </TD>
</TR>
<TR><TD> Date d entree: </TD>
<TD> <INPUT TYPE="text" NAME="user_get_date" VALUE="'.$date.'" SIZE="8" MAXLENGTH="10"> </TD>
</TR>
<TR><TD>Right:</TD>
<TD>
<TABLE CELLSPACING"0" CELLPADDING="1" BORDER="0">
<TR> <TD>
<select name="user_get_right">
<option value="1">Basic</option>
<option value="2">Guest</option>
<option value="4">Epi Register</option>
<option value="5">Reporter</option>
<option value="6">Private Guest</option>
</TD></TR>
</TABLE>
</TD>
</TR>
<TR><TD>Signature: </TD>
<TD>
<TEXTAREA rows="3" cols="38" name="user_get_signature" ONFOCUS=""></textarea>
</TD>
</TR>
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
<TR><TD>Happy Comment: </TD>
<TD>
<TEXTAREA rows="3" cols="38" name="user_get_comment" ONFOCUS=""></textarea>
</TD>
</TR>
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="submit" NAME="action" VALUE=" INSCRIPTION "> </TD>
</TR>
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="reset" NAME="action" VALUE=" RESET "> </TD>
</TR>
</TABLE>
</FORM>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
';
return $str;
}
function dispAdminModifUser() {
$element_id =$_GET['element_id'];
$result = getOneUserById($element_id);
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td>
<b>
<font color="#ffffff">
  m o d i f y   u s e r
</font>
<form name="saisie" method="post" action="index.php?html=AdminHome§ion_admin=ModifUser&element_id='.$element_id.'">
<TR><TD> Login: </TD>
<TD> <INPUT TYPE="text" NAME="user_get_login" VALUE="'.$user["user_login"].'" SIZE="20" MAXLENGTH="20"> </TD>
</TR>
<TR><TD> Pseudo: </TD>
<TD> <INPUT TYPE="text" NAME="user_get_pseudo" VALUE="'.$user["user_pseudo"].'" SIZE="20" MAXLENGTH="20"> </TD>
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
</TR>
<TR><TD> Pass: </TD>
<TD> <INPUT TYPE="password" NAME="user_get_pass" VALUE="" SIZE="20" MAXLENGTH="20"> </TD>
</TR>
<TR><TD> Re Pass: </TD>
<TD> <INPUT TYPE="password" NAME="user_get_verif_pass" VALUE="" SIZE="20" MAXLENGTH="20"> </TD>
</TR>
<TR><TD> Mail: </TD>
<TD> <INPUT TYPE="text" NAME="user_get_mail" VALUE="'.$user["user_mail"].'" SIZE="50" MAXLENGTH="50"> </TD>
</TR>
<TR><TD> Tel: </TD>
<TD> <INPUT TYPE="text" NAME="user_get_tel" VALUE="'.$user["user_tel"].'" SIZE="10" MAXLENGTH="10"> </TD>
</TR>
<TR><TD> Date: </TD>
<TD> <INPUT TYPE="text" NAME="user_get_date" VALUE="'.$user["user_date"].'" SIZE="8" MAXLENGTH="10"> </TD>
</TR>
<TR><TD>Right:</TD>
<TD>
<TABLE CELLSPACING"0" CELLPADDING="1" BORDER="0">
<TR> <TD>
<SELECT name="user_get_right">
<option value="1" '.$opt=get_selected_option(1,$user["user_right"]).'>Basic
<option value="2" '.$opt=get_selected_option(2,$user["user_right"]).'>Guest
<option value="4" '.$opt=get_selected_option(4,$user["user_right"]).'>Epi Register
<option value="5" '.$opt=get_selected_option(5,$user["user_right"]).'>Reporter
<option value="6" '.$opt=get_selected_option(6,$user["user_right"]).'>Private Guest
<option value="7" '.$opt=get_selected_option(7,$user["user_right"]).'>EPTv Member
</SELECT>
</TD></TR>
</TABLE>
</TD>
</TR>
<TR><TD>Signature: </TD>
<TD> <TEXTAREA rows="3" cols="38" name="user_get_signature" ONFOCUS="">'.$user["user_signature"].'</textarea> </TD>
</TR>
<TR><TD>Happy Comment: </TD>
<TD>
<TEXTAREA rows="3" cols="38" name="user_get_comment" ONFOCUS="">'.$user["user_comment"].'</textarea>
</TD>
</TR>
</TD>
</TR>
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="submit" NAME="action" VALUE=" UPDATE "> </TD>
</TR>
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="reset" NAME="action" VALUE=" RESET "> </TD>
</TR>
</TABLE>
</FORM>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
';
return $str;
}
function dispAdminDelUser() {
$element_id =$_GET['element_id'];
$result = getOneUserById($element_id);
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td>
<b>
<font color="#ffffff">
  d e l e t e   u s e r
</font>
<form name="saisie" method="post" action="index.php?html=AdminHome§ion_admin=DelUser&element_id='.$element_id.'">
<TR><TD> Login: </TD>
<TD>'.$user["user_login"].'</TD>
</TR>
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<TR><TD> Pseudo: </TD>
<TD>
' .$user["user_pseudo"].'
</TD>
</TR>
<TR><TD> Pass: </TD>
<TD>
' .$user["user_pass"].'
</TD>
</TR>
<TR><TD> Mail: </TD>
<TD>
' .$user["user_mail"].'
</TD>
</TR>
<TR><TD> Tel: </TD>
<TD>
' .$user["user_tel"].'
</TD>
</TR>
<TR><TD> Date: </TD>
<TD>
' .$user["user_date"].'
</TD>
</TR>
<TR><TD> Statut: </TD>
<TD>
' .$user["user_statut"].'
</TD>
</TR>
<TR><TD> Right: </TD>
<TD>
' .$user["user_right"].'
</TD>
</TR>
<TR><TD> Signature: </TD>
<TD>
' .$user["user_signature"].'
</TD>
</TR>
<TR><TD> Comment: </TD>
<TD>
' .$user["user_comment"].'
</TD>
</TR>
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="submit" NAME="action" VALUE=" SUPPRIMER "> </TD>