Subversion Repositories ALCASAR

Rev

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