Subversion Repositories ALCASAR

Rev

Rev 947 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 947 Rev 1088
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 17... Line 20...
17
	$show_ops = 0;
20
	$show_ops = 0;
18
	$colspan=1;
21
	$colspan=1;
19
}
22
}
20
?>
23
?>
21
<html><head><title>Voucher creation</title>
24
<html><head><title>Voucher creation</title>
22
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
25
<meta http-equiv="Content-Type" content="text/html; charset=<?php  echo $config[general_charset]?>">
23
<link rel="stylesheet" href="/css/style.css">
26
<link rel="stylesheet" href="/css/style.css">
24
<link rel="stylesheet" type="text/css" href="/css/epoch_styles.css" />
27
<link rel="stylesheet" type="text/css" href="/css/epoch_styles.css" />
25
<script type="text/javascript" src="/js/epoch_classes.js"></script>
28
<script type="text/javascript" src="/js/epoch_classes.js"></script>
26
<script type="text/javascript" src="/js/fonctions.js"></script>
29
<script type="text/javascript" src="/js/fonctions.js"></script>
27
<script language="javascript" type="text/javascript">
30
<script language="javascript" type="text/javascript">
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*/
-
 
38
function createTickets(arg){
-
 
39
	var nbtickets = prompt("Saisissez le nombre d'utilisateurs à créer", "");
-
 
40
	// On test la pression sur le boutton "annuler"
-
 
41
	if (nbtickets===null){
-
 
42
		alert('nbtickets===null');
-
 
43
		return false;
-
 
44
	}
-
 
45
	// On test la valeur saisie n'est pas un nombre
-
 
46
	if (isNaN(nbtickets)===true){
-
 
47
		return false;
-
 
48
	}	
-
 
49
	// Conversion en entier de nbtickets 
-
 
50
	nbtickets = parseInt(nbtickets)
-
 
51
	// Configuration et envoie du formulaire
-
 
52
	arg.nbtickets.value = nbtickets
-
 
53
	arg.action = "vouchers_new.php";
-
 
54
	arg.submit();
-
 
55
	
-
 
56
	return true;
35
 
57
}
36
</script>
58
</script>
37
</head>
59
</head>
38
<body>
60
<body>
39
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
61
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
40
	<tr><th><?php echo"$l_users_managment"; ?></th></tr>
62
	<tr><th><?php  echo"$l_users_managment"; ?></th></tr>
41
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
63
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
42
</TABLE>
64
</TABLE>
43
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
65
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
44
	<tr bgcolor="#666666"><td>
66
	<tr bgcolor="#666666"><td>
45
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
67
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
Line 49... Line 71...
49
<tr valign=top>
71
<tr valign=top>
50
<td width=400></td>
72
<td width=400></td>
51
<td bgcolor="black">
73
<td bgcolor="black">
52
	<table border=0 width=100% cellpadding=2 cellspacing=0>
74
	<table border=0 width=100% cellpadding=2 cellspacing=0>
53
	<tr bgcolor="#907030" align=right valign=top><th>
75
	<tr bgcolor="#907030" align=right valign=top><th>
54
	<font color="white"><?php echo "$l_user_create"; ?></font>
76
	<font color="white"><?php  echo "$l_user_create"; ?></font>
55
	</th></tr>
77
	</th></tr>
56
	</table>
78
	</table>
57
</td></tr>
79
</td></tr>
58
<tr bgcolor="black" valign=top><td colspan=2>
80
<tr bgcolor="black" valign=top><td colspan=2>
59
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
81
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
60
	<tr><td>   
82
	<tr><td>   
61
<?php
83
<?php 
62
function sec_imp($time)
84
function sec_imp($time)
63
	/* Formatage des secondes avant l'impression */
85
	/* Formatage des secondes avant l'impression */
64
    {
86
    {
65
	$heure=0;$minute=0;$seconde=0;
87
	$heure=0;$minute=0;$seconde=0;
66
	$heure = floor($time/3600);
88
	$heure = floor($time/3600);
Line 127... Line 149...
127
   <form name="newuser" method=post>
149
   <form name="newuser" method=post>
128
      <input type=hidden name=create value="0">
150
      <input type=hidden name=create value="0">
129
      <input type=hidden name=show value="0">
151
      <input type=hidden name=show value="0">
130
	  <input type=hidden name=langue_imp value='fr'>
152
	  <input type=hidden name=langue_imp value='fr'>
131
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
153
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
132
<?php
154
<?php 
133
	echo <<<EOM
155
	echo <<<EOM
134
	<tr>
156
	<tr>
135
		<td class="etiquette" colspan=$colspan>
157
		<td class="etiquette" colspan=$colspan>
136
		$l_login
158
		$l_login
137
		</td><td>
159
		</td><td>
Line 348... Line 370...
348
	}
370
	}
349
echo "</table><BR>";
371
echo "</table><BR>";
350
if ($create == 1){
372
if ($create == 1){
351
	echo "<a href=\"ticket.pdf\">Ticket</a><br>";
373
	echo "<a href=\"ticket.pdf\">Ticket</a><br>";
352
	echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">";}
374
	echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">";}
353
	else{
375
else{
354
	echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newuser');\">";
376
	echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newuser');\">";
-
 
377
	echo "<input type='hidden' name='nbtickets' value=''>";
-
 
378
	echo "<br>Ou :<br>";
-
 
379
	
-
 
380
	$l_create_multiple = "Créer plusieurs tickets";
-
 
381
	echo "<input type=button class=button value=\"$l_create_multiple\" OnClick=\"return createTickets(this.form);\">";
-
 
382
	$l_create_multiple_comment = "<br>Remarques : lors de la création plusieurs tickets sysmultanément :<br>
-
 
383
		- l'identifiant et le mot de passe sont générés aléatoirement,<br>
-
 
384
		- les champs \"Nom, prénom\" et \"Adresse de couriel\" ne sont pas pris en compte.<br> ";
-
 
385
	echo $l_create_multiple_comment;
355
	}
386
	}
356
?>
387
?>
357
</form>
388
</form>
358
</td></tr>
389
</td></tr>
359
</table>
390
</table>