Subversion Repositories ALCASAR

Rev

Rev 2501 | Rev 2510 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
1805 clement.si 1
<?php
2312 tom.houday 2
# $Id: user_new.php 2505 2018-03-11 13:41:00Z tom.houdayer $
1578 richard 3
 
2312 tom.houday 4
//gestion de la langue
5
if (is_file("../lib/langues.php"))
6
	include("../lib/langues.php");
7
 
2505 tom.houday 8
// Update Alcasar-Status-Page-Must-Stay-Open
9
if ((isset($_POST['Alcasar-Status-Page-Must-Stay-Open'])) && ($_POST['Alcasar-Status-Page-Must-Stay-Open'] === '2')) {
2501 tom.houday 10
	$_POST['Idle-Timeout'] = '600'; // 10 minutes
11
} else {
12
	$_POST['Idle-Timeout'] = '';
2394 tom.houday 13
}
2501 tom.houday 14
$_POST['Idle-Timeout_op'] = '=';
2394 tom.houday 15
 
16
require('/etc/freeradius-web/config.php');
17
 
2312 tom.houday 18
if(!isset($create)) $create=0;
19
if(!isset($show)) $show=0;
20
if(!isset($login)) $login = '';
21
if(!isset($cn)) $cn = '';
22
if(!isset($mail)) $mail = '';
23
if(!isset($langue_imp)) $langue_imp = '';
24
if(!isset($selected)) $selected = array();
25
if(!isset($selected['='])) $selected['='] = '';
26
 
1326 richard 27
require('../lib/attrshow.php');
28
require('../lib/defaults.php');
2312 tom.houday 29
 
30
if (false && /* Hide operator column */ $config['general_lib_type'] == 'sql' && $config['sql_use_operators'] == 'true') {
31
	$colspan = 2;
32
	$show_ops = 1;
2319 tom.houday 33
	require('../lib/operators.php');
2312 tom.houday 34
} else {
1326 richard 35
	$show_ops = 0;
2312 tom.houday 36
	$colspan = 1;
1326 richard 37
}
38
?>
2312 tom.houday 39
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
40
<html>
2226 richard 41
<head>
2312 tom.houday 42
<title>User creation</title>
43
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
1326 richard 44
<link rel="stylesheet" href="/css/style.css">
2226 richard 45
<link rel="stylesheet" type="text/css" href="/css/epoch_styles.css">
1326 richard 46
<script type="text/javascript" src="/js/epoch_classes.js"></script>
47
<script type="text/javascript" src="/js/fonctions.js"></script>
48
<script language="javascript" type="text/javascript">
49
 
2312 tom.houday 50
/*Insertion du calendrier */
1805 clement.si 51
	var dp_cal;
1326 richard 52
window.onload = function () {
53
	dp_cal  = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
54
};
2312 tom.houday 55
/*Fin calendrier*/
56
 
1326 richard 57
</script>
2312 tom.houday 58
<script type="text/javascript">
59
	function showAdvancedFields(show) {
60
		var form = document.forms['newuser'];
61
		var btn_show = document.getElementById('show-advanced-fields');
62
		var btn_hide = document.getElementById('hide-advanced-fields');
63
 
64
		if (show) {
65
			btn_hide.style.display = null;
66
			btn_show.style.display = 'none';
67
			form.className += ' hide-advanced-fields';
68
		} else {
69
			btn_show.style.display = null;
70
			btn_hide.style.display = 'none';
71
			form.className = form.className.replace(' hide-advanced-fields', '');
72
 
73
		}
74
	}
75
</script>
76
<style type="text/css">
77
	.hide-advanced-fields .advanced-field {
78
		display: none;
79
	}
80
</style>
1326 richard 81
</head>
82
<body>
83
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
2312 tom.houday 84
	<tr><th><?php echo "$l_users_managment"; ?></th></tr>
1326 richard 85
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
86
</TABLE>
87
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
88
	<tr bgcolor="#666666"><td>
89
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
90
		<tr><td valign="middle" align="left">
91
<center>
92
<table border=0 width=620 cellpadding=1 cellspacing=1>
93
<tr valign=top>
94
<td width=400></td>
95
<td bgcolor="black">
2312 tom.houday 96
	<table border="0" width="100%" cellpadding="2" cellspacing="0">
97
	<tr bgcolor="#907030" align="right" valign="top"><th>
98
	<font color="white"><? echo "$l_user_create"; ?></font>
1326 richard 99
	</th></tr>
100
	</table>
101
</td></tr>
2312 tom.houday 102
<tr bgcolor="black" valign="top"><td colspan="2">
103
	<table border="0" width="100%" cellpadding="12" cellspacing="0" bgcolor="#ffffd0" valign="top">
1805 clement.si 104
	<tr><td>
105
<?php
1326 richard 106
function sec_imp($time)
2312 tom.houday 107
/*Formatage des secondes avant l'impression */
1805 clement.si 108
{
109
	$result = '';
1326 richard 110
	$jour = 0;$heure = 0;$minute = 0;$seconde = 0;
111
	$jour = floor($time/86400);
112
	$reste = $time%86400;
113
    	if ($jour!=0) $result = $jour.' J ';
114
	$heure = floor($reste/3600);
115
    	$reste = $reste%3600;
116
    	if ($heure!=0) $result = $result.$heure.' H ';
117
	$minute = floor($reste/60);
118
    	if ($minute!=0) $result = $result.$minute.' min ';
119
	$seconde = $reste%60;
120
    	if ($seconde!=0) $result = $result.$seconde.' s ';
121
   	return $result;
1805 clement.si 122
}
1326 richard 123
 
124
if ($create == 1){
125
	if (is_file("../lib/$config[general_lib_type]/user_info.php"))
126
		include("../lib/$config[general_lib_type]/user_info.php");
127
	if ($user_exists != "no"){
128
		echo <<<EOM
1377 richard 129
<b><i>$login</i> $l_user_exists</b>
1326 richard 130
EOM;
131
	}
132
	else{
1881 raphael.pi 133
		/*création de l'utilisateur*/
134
		if (is_file("../lib/$config[general_lib_type]/create_user.php"))
135
			include("../lib/$config[general_lib_type]/create_user.php");
1326 richard 136
		/*  Petit traitement pré-impression pour la lisibilité */
137
		/*  Récupération des attributs du groupe le cas échéant */
2312 tom.houday 138
		if (isset($group) && $group!=''){
1326 richard 139
			$saved_login = $login;
140
			$login = $group;
141
			if (is_file("../lib/sql/group_info.php"))
142
				include("../lib/sql/group_info.php");
143
			$login = $saved_login;}
144
		/*  Si les valeurs de durée sont vide remplissage avec la valeur 'Illimitée'*/
145
		/*  et formatage des secondes sous le format Heure min ses*/
146
		if ($sto_imp==''){ $sto_imp='-';}
147
			else { $sto_imp=sec_imp($sto_imp);}
148
		if ($mas_imp==''){ $mas_imp='-';}
1805 clement.si 149
			else { $mas_imp=sec_imp($mas_imp);}
1326 richard 150
		if ($mds_imp==''){ $mds_imp='-';}
151
			else { $mds_imp=sec_imp($mds_imp);}
152
		if ($mms_imp==''){ $mms_imp='-';}
153
			else { $mms_imp=sec_imp($mms_imp);}
154
		/*Formatage de la date afin d'être lisible dans toute les langues 'jj mm yyyy'*/
155
		if ($Expiration!=''){ $Expiration=date("d - m - Y",strtotime($Expiration));}
1805 clement.si 156
			else { $Expiration='-';}
1326 richard 157
		if ($show != 3) //utilisateur normal
1805 clement.si 158
		{
1326 richard 159
			//Appel du ticket d'impression , passage en paramètres des valeurs à afficher
2197 tom.houday 160
			echo'	<form name="impression" method="post" action="ticket_user.php" target="_blank">
1326 richard 161
					<input type="hidden" name="langue_imp" value="'.$langue_imp.'">
2197 tom.houday 162
					<input type="hidden" name="log_imp"    value="'.$login.'">
1326 richard 163
					<input type="hidden" name="passwd_imp" value="'.$passwd_imp.'">
2197 tom.houday 164
					<input type="hidden" name="sto_imp"    value="'.$sto_imp.'">
165
					<input type="hidden" name="mas_imp"    value="'.$mas_imp.'">
166
					<input type="hidden" name="mds_imp"    value="'.$mds_imp.'">
167
					<input type="hidden" name="mms_imp"    value="'.$mms_imp.'">
168
					<input type="hidden" name="exp_imp"    value="'.$Expiration.'">
1326 richard 169
				</form>';
2312 tom.houday 170
			echo'	<a href="#" onclick="document.forms[\'impression\'].submit();">'.$l_create_ticket.'</a>';
1326 richard 171
			//fin ticket impression
172
		}
173
		else //utilisateur = adresse mac
174
		{
1707 richard 175
			exec("sudo /usr/bin/systemctl reload chilli.service");
1326 richard 176
		}
177
		require("../lib/defaults.php");
178
		if (is_file("../lib/$config[general_lib_type]/user_info.php"))
179
			include("../lib/$config[general_lib_type]/user_info.php");
180
	}
181
}
182
?>
2312 tom.houday 183
   <form name="newuser" method="post" class=" hide-advanced-fields">
1326 richard 184
      <input type=hidden name=create value="0">
185
      <input type=hidden name=show value="0">
186
	  <input type=hidden name=langue_imp value='fr'>
2312 tom.houday 187
	<table border="1" bordercolordark="#ffffe0" bordercolorlight="#000000" width="100%" cellpadding="2" cellspacing="0" bgcolor="#ffffe0" valign="top">
1805 clement.si 188
<?php
1377 richard 189
if($create==0){
1326 richard 190
	echo <<<EOM
191
	<tr>
2312 tom.houday 192
		<td class="etiquette" colspan="$colspan">
1326 richard 193
		$l_login
194
		</td><td>
195
		<input type=text name="login" value="$login" size=20>
196
		</td>
197
	</tr>
198
	<tr>
2312 tom.houday 199
		<td class="etiquette" colspan="$colspan">
1326 richard 200
		$l_password
201
		</td><td>
202
		<input type=password name="passwd" size=20>
203
		<br><input type="button" value="$l_passwd_gen" onclick="password(8,'newuser')">
204
		<input type="text" value="" name="pwdgene" size=10 readonly>
205
		</td>
206
	</tr>
207
EOM;
1805 clement.si 208
	if ($config['general_lib_type'] == 'sql'){
1326 richard 209
		if (isset($member_groups))
210
			$selected[$member_groups[0]] = 'selected';
211
		echo <<<EOM
212
	<tr>
2312 tom.houday 213
		<td class="etiquette" colspan="$colspan">
1326 richard 214
		$l_group
215
		</td><td>
216
EOM;
217
		include_once("../lib/$config[general_lib_type]/group_info.php");
218
		if (isset($existing_groups)){
219
			echo "<select name=\"Fgroup\">";
2312 tom.houday 220
			echo "<option value=\"\" selected></option>";
1326 richard 221
			foreach ($member_groups as $group)
2312 tom.houday 222
				echo "<option value=\"$group\">$group</option>\n";
1326 richard 223
			echo " </select>";
224
			}
225
		else echo "$l_group_empty";
226
	echo "</td></tr>";
227
	}
1805 clement.si 228
	if ($config['general_lib_type'] == 'ldap' ||
229
	($config['general_lib_type'] == 'sql' && $config['sql_use_user_info_table'] == 'true')){
1326 richard 230
		echo <<<EOM
231
	<tr>
2312 tom.houday 232
		<td class="etiquette" colspan="$colspan">
1326 richard 233
		$l_name
234
		</td><td>
235
		<input type=text name="Fcn" value="$cn" size=20>
236
		</td>
237
	</tr>
238
	<tr>
2312 tom.houday 239
		<td class="etiquette" colspan="$colspan">
1326 richard 240
		$l_email
241
		</td><td>
242
		<input type=text name="Fmail" value="$mail" size=20>
243
		</td>
244
	</tr>
245
EOM;
246
	}
2312 tom.houday 247
	foreach ($show_attrs as $key => $desc) {
2394 tom.houday 248
		if ($key === 'Idle-Timeout') continue;
1326 richard 249
		$name = $attrmap["$key"];
250
		if ($name == 'none')
251
			continue;
252
		$oper_name = $name . '_op';
2312 tom.houday 253
		if(isset($item_vals["$key"][0]) && $item_vals["$key"][0] != '') {
1805 clement.si 254
			$val = $item_vals["$key"][0];
2312 tom.houday 255
		} else if(isset($default_vals["$key"][0])){
1805 clement.si 256
			$val = $default_vals["$key"][0];
2312 tom.houday 257
		} else{
1805 clement.si 258
			$val = '';
259
		}
1326 richard 260
		switch ($key)
261
		{
2312 tom.houday 262
		// $advanced = 1 : champs de saisie amélioré (calendrier, convertisseur, etc.)
1805 clement.si 263
			case 'Simultaneous-Use' :
2319 tom.houday 264
				$advanced = false;
265
				$help_link = "help/simultaneous_use_help.html";
266
				$desc = $l_simultaneous_use;
1326 richard 267
				break;
268
			case 'Max-All-Session' :
2319 tom.houday 269
				$advanced = false;
270
				$help_link = "help/max_all_session_help.html";
271
				$desc = $l_max_all_session;
1326 richard 272
				break;
2312 tom.houday 273
			case 'Session-Timeout' :
2319 tom.houday 274
				$advanced = true;
275
				$help_link = "help/session_timeout_help.html";
276
				$desc = $l_session_timeout;
2312 tom.houday 277
				break;
278
			case 'Max-Daily-Session' :
2319 tom.houday 279
				$advanced = true;
280
				$help_link = "help/session_timeout_help.html";
281
				$desc = $l_daily_timeout;
2312 tom.houday 282
				break;
283
			case 'Max-Monthly-Session' :
2319 tom.houday 284
				$advanced = true;
285
				$help_link = "help/session_timeout_help.html";
286
				$desc = $l_monthly_timeout;
2312 tom.houday 287
				break;
288
			case 'Login-Time' :
2319 tom.houday 289
				$advanced = true;
290
				$help_link = "help/login_time_help.html";
291
				$desc = $l_login_time;
2312 tom.houday 292
				break;
1326 richard 293
			case 'Expiration' :
2319 tom.houday 294
				$advanced = false;
295
				$help_link = "help/expiration_help.html";
296
				$desc = $l_expiration;
1326 richard 297
				break;
2312 tom.houday 298
			case 'ChilliSpot-Max-Input-Octets' :
2319 tom.houday 299
				$advanced = true;
300
				$help_link = "help/chillispot_max_input_octets_help.html";
301
				$desc = $l_max_input_octets;
2312 tom.houday 302
				break;
303
			case 'ChilliSpot-Max-Output-Octets' :
2319 tom.houday 304
				$advanced = true;
305
				$help_link = "help/chillispot_max_output_octets_help.html";
306
				$desc = $l_max_output_octets;
2312 tom.houday 307
				break;
308
			case 'ChilliSpot-Max-Total-Octets' :
2319 tom.houday 309
				$advanced = true;
310
				$help_link = "help/chillispot_max_total_octets_help.html";
311
				$desc = $l_max_total_octets;
2312 tom.houday 312
				break;
313
			case 'ChilliSpot-Bandwidth-Max-Up' :
2319 tom.houday 314
				$advanced = true;
315
				$help_link = "help/chillispot_bandwidth_max_up_help.html";
316
				$desc = $l_max_bandwidth_up;
2312 tom.houday 317
				break;
318
			case 'ChilliSpot-Bandwidth-Max-Down' :
2319 tom.houday 319
				$advanced = true;
320
				$help_link = "help/chillispot_bandwidth_max_down_help.html";
321
				$desc = $l_max_bandwidth_down;
2312 tom.houday 322
				break;
323
			case 'WISPr-Redirection-URL' :
2319 tom.houday 324
				$advanced = true;
325
				$help_link = "help/wispr_redirection_url_help.html";
326
				$desc = $l_wispr_redirection;
2312 tom.houday 327
				break;
2501 tom.houday 328
			case 'Alcasar-Filter' :
2319 tom.houday 329
				$advanced = false;
330
				$help_link = "help/filtering_help.html";
331
				$desc = $l_filtering;
1377 richard 332
				break;
2505 tom.houday 333
			case 'Alcasar-Protocols-Filter' :
2501 tom.houday 334
				$advanced = false;
335
				$help_link = "help/protocols_help.html";
336
				$desc = $l_proto;
337
				break;
2505 tom.houday 338
			case 'Alcasar-Status-Page-Must-Stay-Open' :
2501 tom.houday 339
				$advanced = false;
340
				$help_link = "help/statusOpenRequired_help.html";
341
				$desc = $l_statusOpenRequired;
342
				break;
1326 richard 343
			default:
2319 tom.houday 344
				$advanced = true;
1326 richard 345
				break;
346
		}
2312 tom.houday 347
 
348
		$advancedField = ($advanced) ? ' class="advanced-field"' : '';
349
 
350
		if ($show_ops) {
351
			print <<<EOM
352
				<tr$advancedField>
353
				<td class="etiquette">
354
				<a href="$help_link" target="help" onclick="window.open('$help_link','help','width=600,height=350,toolbar=no,scrollbars=no,resizable=yes')" title="$l_click_for_help"><font color="blue">$desc</font></a>
355
				</td>
1326 richard 356
EOM;
357
			switch ($key){
1805 clement.si 358
				case 'Simultaneous-Use' :
1326 richard 359
				case 'Max-All-Session' :
360
				case 'Max-Daily-Session' :
361
				case 'Max-Weekly-Session' :
362
				case 'Max-Monthly-Session' :
1805 clement.si 363
				case 'Login-Time' :
1326 richard 364
				case 'Expiration' :
2312 tom.houday 365
					echo "<td><select name=\"$oper_name\"><option $selected[$op_eq] value=\":=\">:=</option></select></td>";
1326 richard 366
					break;
367
				case 'Session-Timeout' :
368
				case 'ChilliSpot-Max-Input-Octets' :
369
				case 'ChilliSpot-Max-Output-Octets' :
370
				case 'ChilliSpot-Max-Total-Octets' :
371
				case 'ChilliSpot-Bandwidth-Max-Up' :
372
				case 'ChilliSpot-Bandwidth-Max-Down' :
373
				case 'WISPr-Redirection-URL' :
2501 tom.houday 374
				case 'Alcasar-Filter' :
2505 tom.houday 375
				case 'Alcasar-Protocols-Filter' :
376
				case 'Alcasar-Status-Page-Must-Stay-Open' :
2312 tom.houday 377
					echo "<td><select name=\"$oper_name\"><option $selected[$op_eq] value=\"=\">=</option></select></td>";
1326 richard 378
					break;
379
				default :
380
					print <<<EOM
2312 tom.houday 381
						<td>
382
							<select name=\"$oper_name\">
383
								<option $selected[$op_eq] value="=">=</option>
384
								<option $selected[$op_set] value=":=">:=</option>
385
								<option $selected[$op_add] value="+=">+=</option>
386
								<option $selected[$op_eq2] value="==">==</option>
387
								<option $selected[$op_ne] value="!=">!=</option>
388
								<option $selected[$op_gt] value=">">&gt;</option>
389
								<option $selected[$op_ge] value=">=">&gt;=</option>
390
								<option $selected[$op_lt] value="<">&lt;</option>
391
								<option $selected[$op_le] value="<=">&lt;=</option>
392
								<option $selected[$op_regeq] value="=~">=~</option>
393
								<option $selected[$op_regne] value="!~">!~</option>
394
								<option $selected[$op_exst] value="=*">=*</option>
395
								<option $selected[$op_nexst] value="!*">!*</option>
396
							</select>
397
						</td>
398
EOM;
399
					break;
400
			}
401
		} else {
402
			print <<<EOM
403
				<tr$advancedField>
404
				<td class="etiquette" colspan="$colspan">
405
				<a href="$help_link" target="help" onclick="window.open('$help_link','help','width=600,height=350,toolbar=no,scrollbars=no,resizable=yes')" title="$l_click_for_help"><font color="blue">$desc</font></a>
406
EOM;
407
			switch ($key) {
408
				case 'Simultaneous-Use' :
409
				case 'Max-All-Session' :
410
				case 'Max-Daily-Session' :
411
				case 'Max-Weekly-Session' :
412
				case 'Max-Monthly-Session' :
413
				case 'Login-Time' :
414
				case 'Expiration' :
415
					echo "<input type=\"hidden\" name=\"$oper_name\" value=\":=\">";
416
					break;
417
				case 'Session-Timeout' :
418
				case 'ChilliSpot-Max-Input-Octets' :
419
				case 'ChilliSpot-Max-Output-Octets' :
420
				case 'ChilliSpot-Max-Total-Octets' :
421
				case 'ChilliSpot-Bandwidth-Max-Up' :
422
				case 'ChilliSpot-Bandwidth-Max-Down' :
423
				case 'WISPr-Redirection-URL' :
2501 tom.houday 424
				case 'Alcasar-Filter' :
2505 tom.houday 425
				case 'Alcasar-Protocols-Filter' :
426
				case 'Alcasar-Status-Page-Must-Stay-Open' :
2312 tom.houday 427
					echo "<input type=\"hidden\" name=\"$oper_name\" value=\"=\">";
428
					break;
429
				default :
430
					print <<<EOM
431
						<select name=\"$oper_name\">
432
							<option $selected[$op_eq] value="=">=</option>
433
							<option $selected[$op_set] value=":=">:=</option>
434
							<option $selected[$op_add] value="+=">+=</option>
435
							<option $selected[$op_eq2] value="==">==</option>
436
							<option $selected[$op_ne] value="!=">!=</option>
437
							<option $selected[$op_gt] value=">">&gt;</option>
438
							<option $selected[$op_ge] value=">=">&gt;=</option>
439
							<option $selected[$op_lt] value="<">&lt;</option>
440
							<option $selected[$op_le] value="<=">&lt;=</option>
441
							<option $selected[$op_regeq] value="=~">=~</option>
442
							<option $selected[$op_regne] value="!~">!~</option>
443
							<option $selected[$op_exst] value="=*">=*</option>
444
							<option $selected[$op_nexst] value="!*">!*</option>
1326 richard 445
						</select>
446
EOM;
447
					break;
448
			}
2312 tom.houday 449
			echo '</td>';
1326 richard 450
		}
1805 clement.si 451
/*
2312 tom.houday 452
Ajout du choix d'unité (pour les durées limites de session,journée et de mois)
1326 richard 453
et d'un calendrier pour la date d'expiration
454
Sauf dans le cas de la visualisation
455
*/
2312 tom.houday 456
		echo '<td>';
457
		if ($create === 0){
1326 richard 458
			switch ($name){
459
				/*
2312 tom.houday 460
				Choix de l'unité jour, heures, minutes ou secondes
461
				pour les durées limites max, de session,de journée et de mois
1805 clement.si 462
				*/
1326 richard 463
				case 'Session-Timeout' :
464
				case 'Max-Daily-Session' :
465
					/*valeur d'origine de durée limite */
2312 tom.houday 466
					echo"<input type=\"text\" name=\"$name\" onfocus=\"this.value=''\" value=\"$val\" size=10>";
1326 richard 467
					/* Choix d'unité*/
468
					echo" <select name=\"$name"."_opt"."\" onchange=\"temps(this,'$name','newuser')\">
469
							<option value=\"s\" selected>s</option>
470
							<option value=\"m\" >m</option>
471
							<option value=\"H\" >H</option>
472
						</select>";
473
					break;
2312 tom.houday 474
				case 'Max-Monthly-Session' :
1326 richard 475
				case 'Max-All-Session' :
476
					/*valeur d'origine de durée limite */
2312 tom.houday 477
					echo"<input type=\"text\" name=\"$name\" onfocus=\"this.value=''\" value=\"$val\" size=10>";
1326 richard 478
					/* Choix d'unité*/
479
					echo" <select name=\"$name"."_opt"."\" onchange=\"temps(this,'$name','newuser')\">
480
							<option value=\"s\" selected>s</option>
481
							<option value=\"m\" >m</option>
482
							<option value=\"H\" >H</option>
483
							<option value=\"J\" >J</option>
484
						</select>";
485
					break;
1566 richard 486
				case 'Expiration' :
1326 richard 487
					/*Ajout du calendrier pour choisir la date*/
2312 tom.houday 488
					echo"<input id=\"popup_container\" type=\"text\" name=\"$name\" value=\"$val\" size=\"20\">";
1326 richard 489
					break;
2501 tom.houday 490
				case 'Alcasar-Filter' :
491
					echo "<select name=\"$name\">";
492
					echo "<option value=\"\"></option>";
493
					echo "<option value=\"1\">$l_filtering_none</option>";
494
					echo "<option value=\"2\">$l_filtering_havp</option>";
495
					echo "<option value=\"3\">$l_filtering_havp_bl</option>";
496
					echo "<option value=\"4\">$l_filtering_havp_wl</option>";
1377 richard 497
					echo "</select>";
498
					break;
2505 tom.houday 499
				case 'Alcasar-Protocols-Filter' :
2501 tom.houday 500
					echo "<select name=\"$name\">";
501
					echo "<option value=\"\"></option>";
502
					echo "<option value=\"1\">$l_proto_0</option>";
503
					echo "<option value=\"2\">$l_proto_1</option>";
504
					echo "<option value=\"3\">$l_proto_2</option>";
505
					echo "<option value=\"4\">$l_proto_3</option>";
506
					echo "</select>";
507
					break;
2505 tom.houday 508
				case 'Alcasar-Status-Page-Must-Stay-Open' :
2501 tom.houday 509
					echo "<label><input type=\"radio\" name=\"$name\" value=\"\" checked>$l_yes</label>
510
						<label><input type=\"radio\" name=\"$name\" value=\"2\">$l_no</label>";
511
					break;
1326 richard 512
				default :
2312 tom.houday 513
					echo "<input type=\"text\" name=\"$name\" value=\"$val\" size=\"20\">";
1326 richard 514
					break;
515
			}
516
		}
2312 tom.houday 517
		echo '</td>';
1326 richard 518
	}
2312 tom.houday 519
 
2394 tom.houday 520
 
2006 raphael.pi 521
	print <<<EOM
2424 tom.houday 522
	<tr>
2312 tom.houday 523
		<td class="etiquette" colspan="$colspan">
1326 richard 524
			$l_lang_ticket
525
		</td>
526
		<td width=20>
527
EOM;
2312 tom.houday 528
/*Choix de la langue du ticket d'impression*/
1326 richard 529
	echo" <select name=\"$langue_imp\" onchange=\"lang_imp(this,'newuser')\">
530
			<option value=\"fr\" selected>Fran&ccedil;ais</option>
531
			<option value=\"en\" >English</option>
532
			<option value=\"nl\" >Nederlandse</option>
533
			<option value=\"de\" >Deutsch</option>
534
			<option value=\"es\" >Espa&ntilde;ol</option>
535
			<option value=\"it\" >Italiano</option>
536
			<option value=\"pt\" >Portugês</option>
1805 clement.si 537
		</select></td></tr>";
2312 tom.houday 538
	}
539
echo "</table><br>";
1326 richard 540
if($create == 1)
541
{
2312 tom.houday 542
	echo "<center><a href=\"user_admin.php?login=$login\">$l_show_profile</a></center>";
1326 richard 543
}
544
else
545
{
2312 tom.houday 546
	echo "<input type=\"submit\" class=button value=\"$l_create\" OnClick=\"return formControl('newuser');\">";
547
	echo "<input type=\"hidden\" name=\"nbtickets\" value=\"\">";
548
	echo "<button type=\"button\" id =\"show-advanced-fields\" onclick=\"showAdvancedFields(true)\" style=\"float: right; display: none;\">$l_simple_menu</button>";
549
	echo "<button type=\"button\" id =\"hide-advanced-fields\" onclick=\"showAdvancedFields(false)\" style=\"float: right;\">$l_advanced_menu</button>";
1326 richard 550
	echo "<br>$l_or :<br>";
2312 tom.houday 551
	echo "<input type=\"button\" class=button value=\"$l_create_multiple\" OnClick=\"return createTickets(this.form, '$l_createTicketsMSG');\">";
1326 richard 552
	echo $l_create_multiple_comment;
553
}
554
?>
555
</form>
2312 tom.houday 556
 
557
	</td></tr>
1326 richard 558
</table>
2312 tom.houday 559
</tr>
560
</table>
561
</center>
562
</TD></TR>
1326 richard 563
</TABLE>
564
</td></tr>
565
</TABLE>
566
</body>
567
</html>