Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
2 |
// ticket d'impression (thank's to Geoffroy MUSITELLI)
|
2 |
// ticket d'impression (thank's to Geoffroy MUSITELLI)
|
3 |
//gestion de la langue
|
3 |
//gestion de la langue
|
4 |
if (is_file("../lib/langues.php"))
|
4 |
if (is_file("../lib/langues.php"))
|
5 |
include("../lib/langues.php");
|
5 |
include("../lib/langues.php");
|
- |
|
6 |
// for developpement purpose
|
- |
|
7 |
// CONST ROOT = "C:/Serveurs/Alcasar-mageia/";
|
- |
|
8 |
CONST ROOT = "/";
|
6 |
require('/etc/freeradius-web/config.php');
|
9 |
require(ROOT.'etc/freeradius-web/config.php');
|
7 |
if ($show == 1){
|
10 |
if ($show == 1){
|
8 |
header("Location: user_admin.php?login=$login");
|
11 |
header("Location: user_admin.php?login=$login");
|
9 |
exit;
|
12 |
exit;
|
10 |
}
|
13 |
}
|
11 |
require('../lib/attrshow.php');
|
14 |
require('../lib/attrshow.php');
|
Line 30... |
Line 33... |
30 |
var dp_cal;
|
33 |
var dp_cal;
|
31 |
window.onload = function () {
|
34 |
window.onload = function () {
|
32 |
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
|
35 |
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
|
33 |
};
|
36 |
};
|
34 |
/*Fin calendrier*/
|
37 |
/*Fin calendrier*/
|
35 |
function createTickets(arg){
|
- |
|
36 |
var nbtickets = prompt("Saisissez le nombre d'utilisateurs à créer", "");
|
- |
|
37 |
// On test la pression sur le boutton "annuler"
|
- |
|
38 |
if (nbtickets===null){
|
- |
|
39 |
alert('nbtickets===null');
|
- |
|
40 |
return false;
|
- |
|
41 |
}
|
- |
|
42 |
// On test la valeur saisie n'est pas un nombre
|
- |
|
43 |
if (isNaN(nbtickets)===true){
|
- |
|
44 |
return false;
|
- |
|
45 |
}
|
- |
|
46 |
// Conversion en entier de nbtickets
|
- |
|
47 |
nbtickets = parseInt(nbtickets)
|
- |
|
48 |
// Configuration et envoie du formulaire
|
- |
|
49 |
arg.nbtickets.value = nbtickets
|
- |
|
50 |
arg.action = "vouchers_new.php";
|
- |
|
51 |
arg.submit();
|
- |
|
52 |
|
- |
|
53 |
return true;
|
- |
|
54 |
}
|
38 |
|
55 |
</script>
|
39 |
</script>
|
56 |
</head>
|
40 |
</head>
|
57 |
<body>
|
41 |
<body>
|
58 |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
|
42 |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
|
59 |
<tr><th><?php echo"$l_users_managment"; ?></th></tr>
|
43 |
<tr><th><?php echo"$l_users_managment"; ?></th></tr>
|
Line 111... |
Line 95... |
111 |
if (is_file("../lib/sql/group_info.php"))
|
95 |
if (is_file("../lib/sql/group_info.php"))
|
112 |
include("../lib/sql/group_info.php");
|
96 |
include("../lib/sql/group_info.php");
|
113 |
$login = $saved_login;}
|
97 |
$login = $saved_login;}
|
114 |
/* Si les valeurs de durée sont vide remplissage avec la valeur 'Illimitée'*/
|
98 |
/* Si les valeurs de durée sont vide remplissage avec la valeur 'Illimitée'*/
|
115 |
/* et formatage des secondes sous le format Heure min ses*/
|
99 |
/* et formatage des secondes sous le format Heure min ses*/
|
116 |
if ($sto_imp==''){ $sto_imp='-';}
|
100 |
if ($sto_imp==''){ $sto_imp=$v_illimit;}
|
117 |
else { $sto_imp=sec_imp($sto_imp);}
|
101 |
else { $sto_imp=sec_imp($sto_imp);}
|
118 |
if ($mas_imp==''){ $mas_imp='-';}
|
102 |
if ($mas_imp==''){ $mas_imp=$v_illimit;}
|
119 |
else { $mas_imp=sec_imp($mas_imp);}
|
103 |
else { $mas_imp=sec_imp($mas_imp);}
|
120 |
if ($mds_imp==''){ $mds_imp='-';}
|
104 |
if ($mds_imp==''){ $mds_imp=$v_illimit;}
|
121 |
else { $mds_imp=sec_imp($mds_imp);}
|
105 |
else { $mds_imp=sec_imp($mds_imp);}
|
122 |
if ($mms_imp==''){ $mms_imp='-';}
|
106 |
if ($mms_imp==''){ $mms_imp=$v_illimit;}
|
123 |
else { $mms_imp=sec_imp($mms_imp);}
|
107 |
else { $mms_imp=sec_imp($mms_imp);}
|
124 |
/*Formatage de la date afin d'être lisible dans toute les langues 'jj mm yyyy'*/
|
108 |
/*Formatage de la date afin d'être lisible dans toute les langues 'jj mm yyyy'*/
|
125 |
if ($Expiration!=''){ $Expiration=date("d - m - Y",strtotime($Expiration));}
|
109 |
if ($Expiration!=''){ $Expiration=date("d - m - Y",strtotime($Expiration));}
|
126 |
else { $Expiration=$v_without;}
|
110 |
else { $Expiration=$v_without;}
|
127 |
//Appel du ticket d'impression , passage en paramètres des valeurs à afficher
|
111 |
//Appel du ticket d'impression , passage en paramètres des valeurs à afficher
|
Line 370... |
Line 354... |
370 |
echo "<a href=\"ticket.pdf\">Ticket</a><br>";
|
354 |
echo "<a href=\"ticket.pdf\">Ticket</a><br>";
|
371 |
echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">";}
|
355 |
echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">";}
|
372 |
else{
|
356 |
else{
|
373 |
echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newuser');\">";
|
357 |
echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newuser');\">";
|
374 |
echo "<input type='hidden' name='nbtickets' value=''>";
|
358 |
echo "<input type='hidden' name='nbtickets' value=''>";
|
375 |
echo "<br>Ou :<br>";
|
359 |
echo "<br>$l_or :<br>";
|
376 |
|
- |
|
377 |
$l_create_multiple = "Créer plusieurs tickets";
|
- |
|
378 |
echo "<input type=button class=button value=\"$l_create_multiple\" OnClick=\"return createTickets(this.form);\">";
|
360 |
echo "<input type=button class=button value=\"$l_create_multiple\" OnClick=\"return createTickets(this.form, '$l_createTicketsMSG');\">";
|
379 |
$l_create_multiple_comment = "<br>Remarques : lors de la création plusieurs tickets sysmultanément :<br>
|
- |
|
380 |
- l'identifiant et le mot de passe sont générés aléatoirement,<br>
|
- |
|
381 |
- les champs \"Nom, prénom\" et \"Adresse de couriel\" ne sont pas pris en compte.<br> ";
|
- |
|
382 |
echo $l_create_multiple_comment;
|
361 |
echo $l_create_multiple_comment;
|
383 |
}
|
362 |
}
|
384 |
?>
|
363 |
?>
|
385 |
</form>
|
364 |
</form>
|
386 |
</td></tr>
|
365 |
</td></tr>
|