Subversion Repositories ALCASAR

Rev

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