Subversion Repositories ALCASAR

Rev

Rev 2841 | Rev 2998 | 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 2896 2020-12-10 23:29:21Z rexy $
1578 richard 3
 
2312 tom.houday 4
//gestion de la langue
5
if (is_file("../lib/langues.php"))
6
	include("../lib/langues.php");
7
 
2896 rexy 8
// Update Alcasar-Status-Page-Must-Stay-Open --> TO TEST (Idle-Timeout)
9
//if ((isset($_POST['Alcasar-Status-Page-Must-Stay-Open'])) && ($_POST['Alcasar-Status-Page-Must-Stay-Open'] === '2')) {
10
//	$_POST['Idle-Timeout'] = '600'; // 10 minutes
11
//} else {
12
//	$_POST['Idle-Timeout'] = '';
13
//}
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
?>
2571 rexy 39
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2312 tom.houday 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']?>">
2565 lucas.echa 44
<link rel="stylesheet" href="/css/jquery-ui.min.css">
2817 rexy 45
<link rel="stylesheet" href="/css/acc.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>
1326 richard 77
</head>
78
<body>
79
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
2312 tom.houday 80
	<tr><th><?php echo "$l_users_managment"; ?></th></tr>
1326 richard 81
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
82
</TABLE>
83
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
84
	<tr bgcolor="#666666"><td>
85
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
86
		<tr><td valign="middle" align="left">
87
<center>
88
<table border=0 width=620 cellpadding=1 cellspacing=1>
89
<tr valign=top>
90
<td width=400></td>
91
<td bgcolor="black">
2312 tom.houday 92
	<table border="0" width="100%" cellpadding="2" cellspacing="0">
93
	<tr bgcolor="#907030" align="right" valign="top"><th>
94
	<font color="white"><? echo "$l_user_create"; ?></font>
1326 richard 95
	</th></tr>
96
	</table>
97
</td></tr>
2312 tom.houday 98
<tr bgcolor="black" valign="top"><td colspan="2">
99
	<table border="0" width="100%" cellpadding="12" cellspacing="0" bgcolor="#ffffd0" valign="top">
1805 clement.si 100
	<tr><td>
101
<?php
1326 richard 102
if ($create == 1){
103
	if (is_file("../lib/$config[general_lib_type]/user_info.php"))
104
		include("../lib/$config[general_lib_type]/user_info.php");
105
	if ($user_exists != "no"){
2698 tom.houday 106
		echo "<b><i>$login</i> $l_user_exists</b>";
1326 richard 107
	}
108
	else{
1881 raphael.pi 109
		/*création de l'utilisateur*/
110
		if (is_file("../lib/$config[general_lib_type]/create_user.php"))
111
			include("../lib/$config[general_lib_type]/create_user.php");
1326 richard 112
		if ($show != 3) //utilisateur normal
1805 clement.si 113
		{
1326 richard 114
			//Appel du ticket d'impression , passage en paramètres des valeurs à afficher
2197 tom.houday 115
			echo'	<form name="impression" method="post" action="ticket_user.php" target="_blank">
1326 richard 116
					<input type="hidden" name="langue_imp" value="'.$langue_imp.'">
2698 tom.houday 117
					<input type="hidden" name="username" value="'.$login.'">
118
					<input type="hidden" name="password" value="'.$_POST['passwd'].'">
1326 richard 119
				</form>';
2312 tom.houday 120
			echo'	<a href="#" onclick="document.forms[\'impression\'].submit();">'.$l_create_ticket.'</a>';
1326 richard 121
			//fin ticket impression
122
		}
123
		else //utilisateur = adresse mac
124
		{
1707 richard 125
			exec("sudo /usr/bin/systemctl reload chilli.service");
1326 richard 126
		}
127
		require("../lib/defaults.php");
128
		if (is_file("../lib/$config[general_lib_type]/user_info.php"))
129
			include("../lib/$config[general_lib_type]/user_info.php");
130
	}
131
}
132
?>
2312 tom.houday 133
   <form name="newuser" method="post" class=" hide-advanced-fields">
1326 richard 134
      <input type=hidden name=create value="0">
135
      <input type=hidden name=show value="0">
136
	  <input type=hidden name=langue_imp value='fr'>
2312 tom.houday 137
	<table border="1" bordercolordark="#ffffe0" bordercolorlight="#000000" width="100%" cellpadding="2" cellspacing="0" bgcolor="#ffffe0" valign="top">
1805 clement.si 138
<?php
1377 richard 139
if($create==0){
1326 richard 140
	echo <<<EOM
141
	<tr>
2312 tom.houday 142
		<td class="etiquette" colspan="$colspan">
1326 richard 143
		$l_login
144
		</td><td>
145
		<input type=text name="login" value="$login" size=20>
146
		</td>
147
	</tr>
148
	<tr>
2312 tom.houday 149
		<td class="etiquette" colspan="$colspan">
1326 richard 150
		$l_password
151
		</td><td>
152
		<input type=password name="passwd" size=20>
153
		<br><input type="button" value="$l_passwd_gen" onclick="password(8,'newuser')">
154
		<input type="text" value="" name="pwdgene" size=10 readonly>
155
		</td>
156
	</tr>
157
EOM;
1805 clement.si 158
	if ($config['general_lib_type'] == 'sql'){
1326 richard 159
		if (isset($member_groups))
160
			$selected[$member_groups[0]] = 'selected';
161
		echo <<<EOM
162
	<tr>
2312 tom.houday 163
		<td class="etiquette" colspan="$colspan">
1326 richard 164
		$l_group
165
		</td><td>
166
EOM;
167
		include_once("../lib/$config[general_lib_type]/group_info.php");
168
		if (isset($existing_groups)){
169
			echo "<select name=\"Fgroup\">";
2312 tom.houday 170
			echo "<option value=\"\" selected></option>";
1326 richard 171
			foreach ($member_groups as $group)
2312 tom.houday 172
				echo "<option value=\"$group\">$group</option>\n";
1326 richard 173
			echo " </select>";
174
			}
175
		else echo "$l_group_empty";
176
	echo "</td></tr>";
177
	}
1805 clement.si 178
	if ($config['general_lib_type'] == 'ldap' ||
179
	($config['general_lib_type'] == 'sql' && $config['sql_use_user_info_table'] == 'true')){
1326 richard 180
		echo <<<EOM
181
	<tr>
2312 tom.houday 182
		<td class="etiquette" colspan="$colspan">
1326 richard 183
		$l_name
184
		</td><td>
185
		<input type=text name="Fcn" value="$cn" size=20>
186
		</td>
187
	</tr>
188
	<tr>
2312 tom.houday 189
		<td class="etiquette" colspan="$colspan">
1326 richard 190
		$l_email
191
		</td><td>
192
		<input type=text name="Fmail" value="$mail" size=20>
193
		</td>
194
	</tr>
195
EOM;
196
	}
2312 tom.houday 197
	foreach ($show_attrs as $key => $desc) {
2394 tom.houday 198
		if ($key === 'Idle-Timeout') continue;
1326 richard 199
		$name = $attrmap["$key"];
200
		if ($name == 'none')
201
			continue;
202
		$oper_name = $name . '_op';
2312 tom.houday 203
		if(isset($item_vals["$key"][0]) && $item_vals["$key"][0] != '') {
1805 clement.si 204
			$val = $item_vals["$key"][0];
2312 tom.houday 205
		} else if(isset($default_vals["$key"][0])){
1805 clement.si 206
			$val = $default_vals["$key"][0];
2312 tom.houday 207
		} else{
1805 clement.si 208
			$val = '';
209
		}
1326 richard 210
		switch ($key)
211
		{
2312 tom.houday 212
		// $advanced = 1 : champs de saisie amélioré (calendrier, convertisseur, etc.)
1805 clement.si 213
			case 'Simultaneous-Use' :
2319 tom.houday 214
				$advanced = false;
215
				$help_link = "help/simultaneous_use_help.html";
216
				$desc = $l_simultaneous_use;
1326 richard 217
				break;
218
			case 'Max-All-Session' :
2618 tom.houday 219
				$advanced = true;
2319 tom.houday 220
				$help_link = "help/max_all_session_help.html";
221
				$desc = $l_max_all_session;
1326 richard 222
				break;
2312 tom.houday 223
			case 'Session-Timeout' :
2319 tom.houday 224
				$advanced = true;
225
				$help_link = "help/session_timeout_help.html";
226
				$desc = $l_session_timeout;
2312 tom.houday 227
				break;
228
			case 'Max-Daily-Session' :
2319 tom.houday 229
				$advanced = true;
230
				$help_link = "help/session_timeout_help.html";
231
				$desc = $l_daily_timeout;
2312 tom.houday 232
				break;
233
			case 'Max-Monthly-Session' :
2319 tom.houday 234
				$advanced = true;
235
				$help_link = "help/session_timeout_help.html";
236
				$desc = $l_monthly_timeout;
2312 tom.houday 237
				break;
238
			case 'Login-Time' :
2319 tom.houday 239
				$advanced = true;
240
				$help_link = "help/login_time_help.html";
241
				$desc = $l_login_time;
2312 tom.houday 242
				break;
1326 richard 243
			case 'Expiration' :
2319 tom.houday 244
				$advanced = false;
245
				$help_link = "help/expiration_help.html";
246
				$desc = $l_expiration;
1326 richard 247
				break;
2512 tom.houday 248
			case 'CoovaChilli-Max-Input-Octets' :
2319 tom.houday 249
				$advanced = true;
2512 tom.houday 250
				$help_link = "help/coovachilli_max_input_octets_help.html";
2319 tom.houday 251
				$desc = $l_max_input_octets;
2312 tom.houday 252
				break;
2512 tom.houday 253
			case 'CoovaChilli-Max-Output-Octets' :
2319 tom.houday 254
				$advanced = true;
2512 tom.houday 255
				$help_link = "help/coovachilli_max_output_octets_help.html";
2319 tom.houday 256
				$desc = $l_max_output_octets;
2312 tom.houday 257
				break;
2512 tom.houday 258
			case 'CoovaChilli-Max-Total-Octets' :
2319 tom.houday 259
				$advanced = true;
2512 tom.houday 260
				$help_link = "help/coovachilli_max_total_octets_help.html";
2319 tom.houday 261
				$desc = $l_max_total_octets;
2312 tom.houday 262
				break;
2513 tom.houday 263
			case 'CoovaChilli-Max-Total-Octets-Daily' :
264
				$advanced = true;
265
				$help_link = "help/coovachilli_max_total_octets_help.html";
266
				$desc = $l_max_total_octets_daily;
267
				break;
268
			case 'CoovaChilli-Max-Total-Octets-Monthly' :
269
				$advanced = true;
270
				$help_link = "help/coovachilli_max_total_octets_help.html";
271
				$desc = $l_max_total_octets_monthly;
272
				break;
2512 tom.houday 273
			case 'CoovaChilli-Bandwidth-Max-Up' :
2319 tom.houday 274
				$advanced = true;
2512 tom.houday 275
				$help_link = "help/coovachilli_bandwidth_max_up_help.html";
2319 tom.houday 276
				$desc = $l_max_bandwidth_up;
2312 tom.houday 277
				break;
2512 tom.houday 278
			case 'CoovaChilli-Bandwidth-Max-Down' :
2319 tom.houday 279
				$advanced = true;
2512 tom.houday 280
				$help_link = "help/coovachilli_bandwidth_max_down_help.html";
2319 tom.houday 281
				$desc = $l_max_bandwidth_down;
2312 tom.houday 282
				break;
283
			case 'WISPr-Redirection-URL' :
2319 tom.houday 284
				$advanced = true;
285
				$help_link = "help/wispr_redirection_url_help.html";
286
				$desc = $l_wispr_redirection;
2312 tom.houday 287
				break;
2501 tom.houday 288
			case 'Alcasar-Filter' :
2319 tom.houday 289
				$advanced = false;
290
				$help_link = "help/filtering_help.html";
291
				$desc = $l_filtering;
1377 richard 292
				break;
2505 tom.houday 293
			case 'Alcasar-Protocols-Filter' :
2501 tom.houday 294
				$advanced = false;
295
				$help_link = "help/protocols_help.html";
296
				$desc = $l_proto;
297
				break;
2505 tom.houday 298
			case 'Alcasar-Status-Page-Must-Stay-Open' :
2501 tom.houday 299
				$advanced = false;
300
				$help_link = "help/statusOpenRequired_help.html";
301
				$desc = $l_statusOpenRequired;
302
				break;
2510 tom.houday 303
			case 'Alcasar-Expire-After' :
2595 tom.houday 304
				$advanced = true;
305
				$help_link = "help/expire_after_help.html";
306
				$desc = $l_expire_after;
2510 tom.houday 307
				break;
1326 richard 308
			default:
2319 tom.houday 309
				$advanced = true;
1326 richard 310
				break;
311
		}
2312 tom.houday 312
 
313
		$advancedField = ($advanced) ? ' class="advanced-field"' : '';
314
 
315
		if ($show_ops) {
316
			print <<<EOM
317
				<tr$advancedField>
318
				<td class="etiquette">
319
				<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>
320
				</td>
1326 richard 321
EOM;
322
			switch ($key){
1805 clement.si 323
				case 'Simultaneous-Use' :
1326 richard 324
				case 'Max-All-Session' :
325
				case 'Max-Daily-Session' :
326
				case 'Max-Weekly-Session' :
327
				case 'Max-Monthly-Session' :
1805 clement.si 328
				case 'Login-Time' :
1326 richard 329
				case 'Expiration' :
2510 tom.houday 330
				case 'Alcasar-Expire-After' :
2513 tom.houday 331
				case 'CoovaChilli-Max-Total-Octets-Daily' :
332
				case 'CoovaChilli-Max-Total-Octets-Monthly' :
2618 tom.houday 333
				case 'CoovaChilli-Max-Total-Octets' :
2312 tom.houday 334
					echo "<td><select name=\"$oper_name\"><option $selected[$op_eq] value=\":=\">:=</option></select></td>";
1326 richard 335
					break;
336
				case 'Session-Timeout' :
2512 tom.houday 337
				case 'CoovaChilli-Max-Input-Octets' :
338
				case 'CoovaChilli-Max-Output-Octets' :
339
				case 'CoovaChilli-Bandwidth-Max-Up' :
340
				case 'CoovaChilli-Bandwidth-Max-Down' :
1326 richard 341
				case 'WISPr-Redirection-URL' :
2501 tom.houday 342
				case 'Alcasar-Filter' :
2505 tom.houday 343
				case 'Alcasar-Protocols-Filter' :
344
				case 'Alcasar-Status-Page-Must-Stay-Open' :
2312 tom.houday 345
					echo "<td><select name=\"$oper_name\"><option $selected[$op_eq] value=\"=\">=</option></select></td>";
1326 richard 346
					break;
347
				default :
348
					print <<<EOM
2312 tom.houday 349
						<td>
350
							<select name=\"$oper_name\">
351
								<option $selected[$op_eq] value="=">=</option>
352
								<option $selected[$op_set] value=":=">:=</option>
353
								<option $selected[$op_add] value="+=">+=</option>
354
								<option $selected[$op_eq2] value="==">==</option>
355
								<option $selected[$op_ne] value="!=">!=</option>
356
								<option $selected[$op_gt] value=">">&gt;</option>
357
								<option $selected[$op_ge] value=">=">&gt;=</option>
358
								<option $selected[$op_lt] value="<">&lt;</option>
359
								<option $selected[$op_le] value="<=">&lt;=</option>
360
								<option $selected[$op_regeq] value="=~">=~</option>
361
								<option $selected[$op_regne] value="!~">!~</option>
362
								<option $selected[$op_exst] value="=*">=*</option>
363
								<option $selected[$op_nexst] value="!*">!*</option>
364
							</select>
365
						</td>
366
EOM;
367
					break;
368
			}
369
		} else {
370
			print <<<EOM
371
				<tr$advancedField>
372
				<td class="etiquette" colspan="$colspan">
373
				<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>
374
EOM;
375
			switch ($key) {
376
				case 'Simultaneous-Use' :
377
				case 'Max-All-Session' :
378
				case 'Max-Daily-Session' :
379
				case 'Max-Weekly-Session' :
380
				case 'Max-Monthly-Session' :
381
				case 'Login-Time' :
382
				case 'Expiration' :
2510 tom.houday 383
				case 'Alcasar-Expire-After' :
2513 tom.houday 384
				case 'CoovaChilli-Max-Total-Octets-Daily' :
385
				case 'CoovaChilli-Max-Total-Octets-Monthly' :
2618 tom.houday 386
				case 'CoovaChilli-Max-Total-Octets' :
2312 tom.houday 387
					echo "<input type=\"hidden\" name=\"$oper_name\" value=\":=\">";
388
					break;
389
				case 'Session-Timeout' :
2512 tom.houday 390
				case 'CoovaChilli-Max-Input-Octets' :
391
				case 'CoovaChilli-Max-Output-Octets' :
392
				case 'CoovaChilli-Bandwidth-Max-Up' :
393
				case 'CoovaChilli-Bandwidth-Max-Down' :
2312 tom.houday 394
				case 'WISPr-Redirection-URL' :
2501 tom.houday 395
				case 'Alcasar-Filter' :
2505 tom.houday 396
				case 'Alcasar-Protocols-Filter' :
397
				case 'Alcasar-Status-Page-Must-Stay-Open' :
2312 tom.houday 398
					echo "<input type=\"hidden\" name=\"$oper_name\" value=\"=\">";
399
					break;
400
				default :
401
					print <<<EOM
402
						<select name=\"$oper_name\">
403
							<option $selected[$op_eq] value="=">=</option>
404
							<option $selected[$op_set] value=":=">:=</option>
405
							<option $selected[$op_add] value="+=">+=</option>
406
							<option $selected[$op_eq2] value="==">==</option>
407
							<option $selected[$op_ne] value="!=">!=</option>
408
							<option $selected[$op_gt] value=">">&gt;</option>
409
							<option $selected[$op_ge] value=">=">&gt;=</option>
410
							<option $selected[$op_lt] value="<">&lt;</option>
411
							<option $selected[$op_le] value="<=">&lt;=</option>
412
							<option $selected[$op_regeq] value="=~">=~</option>
413
							<option $selected[$op_regne] value="!~">!~</option>
414
							<option $selected[$op_exst] value="=*">=*</option>
415
							<option $selected[$op_nexst] value="!*">!*</option>
1326 richard 416
						</select>
417
EOM;
418
					break;
419
			}
2312 tom.houday 420
			echo '</td>';
1326 richard 421
		}
1805 clement.si 422
/*
2312 tom.houday 423
Ajout du choix d'unité (pour les durées limites de session,journée et de mois)
1326 richard 424
et d'un calendrier pour la date d'expiration
425
Sauf dans le cas de la visualisation
426
*/
2312 tom.houday 427
		echo '<td>';
428
		if ($create === 0){
1326 richard 429
			switch ($name){
430
				/*
2312 tom.houday 431
				Choix de l'unité jour, heures, minutes ou secondes
432
				pour les durées limites max, de session,de journée et de mois
1805 clement.si 433
				*/
1326 richard 434
				case 'Session-Timeout' :
435
				case 'Max-Daily-Session' :
436
					/*valeur d'origine de durée limite */
2312 tom.houday 437
					echo"<input type=\"text\" name=\"$name\" onfocus=\"this.value=''\" value=\"$val\" size=10>";
1326 richard 438
					/* Choix d'unité*/
439
					echo" <select name=\"$name"."_opt"."\" onchange=\"temps(this,'$name','newuser')\">
440
							<option value=\"s\" selected>s</option>
441
							<option value=\"m\" >m</option>
442
							<option value=\"H\" >H</option>
443
						</select>";
444
					break;
2312 tom.houday 445
				case 'Max-Monthly-Session' :
1326 richard 446
				case 'Max-All-Session' :
2510 tom.houday 447
				case 'Alcasar-Expire-After' :
1326 richard 448
					/*valeur d'origine de durée limite */
2312 tom.houday 449
					echo"<input type=\"text\" name=\"$name\" onfocus=\"this.value=''\" value=\"$val\" size=10>";
1326 richard 450
					/* Choix d'unité*/
451
					echo" <select name=\"$name"."_opt"."\" onchange=\"temps(this,'$name','newuser')\">
452
							<option value=\"s\" selected>s</option>
453
							<option value=\"m\" >m</option>
454
							<option value=\"H\" >H</option>
455
							<option value=\"J\" >J</option>
456
						</select>";
457
					break;
1566 richard 458
				case 'Expiration' :
1326 richard 459
					/*Ajout du calendrier pour choisir la date*/
2312 tom.houday 460
					echo"<input id=\"popup_container\" type=\"text\" name=\"$name\" value=\"$val\" size=\"20\">";
1326 richard 461
					break;
2501 tom.houday 462
				case 'Alcasar-Filter' :
463
					echo "<select name=\"$name\">";
464
					echo "<option value=\"\"></option>";
465
					echo "<option value=\"1\">$l_filtering_none</option>";
2841 rexy 466
					echo "<option value=\"2\">$l_filtering_av</option>";
467
					echo "<option value=\"3\">$l_filtering_av_bl</option>";
468
					echo "<option value=\"4\">$l_filtering_av_wl</option>";
1377 richard 469
					echo "</select>";
470
					break;
2505 tom.houday 471
				case 'Alcasar-Protocols-Filter' :
2501 tom.houday 472
					echo "<select name=\"$name\">";
473
					echo "<option value=\"\"></option>";
474
					echo "<option value=\"1\">$l_proto_0</option>";
475
					echo "<option value=\"2\">$l_proto_1</option>";
476
					echo "<option value=\"3\">$l_proto_2</option>";
477
					echo "<option value=\"4\">$l_proto_3</option>";
478
					echo "</select>";
479
					break;
2505 tom.houday 480
				case 'Alcasar-Status-Page-Must-Stay-Open' :
2653 tom.houday 481
					echo "<select name=\"$name\">";
482
					echo "<option value=\"\"></option>";
2896 rexy 483
					echo "<option value=\"1\">$l_no</option>";
484
					echo "<option value=\"2\">$l_yes</option>";
2653 tom.houday 485
					echo "</select>";
2501 tom.houday 486
					break;
2565 lucas.echa 487
				case 'Login-Time':
2628 lucas.echa 488
					echo "<input type=\"text\" name=\"$name\" id=\"$name\" value=\"$val\" size=\"20\">";
2565 lucas.echa 489
					echo "<a id=\"login-time-calendar\" href=\"#\"><img alt=\"schedule\" src=\"images/calendar.png\"/></a>";
490
					echo '<div id="login-time-dialog" title="Weekly period"><div id="login-time-schedule"></div></div>';
491
					break;
1326 richard 492
				default :
2312 tom.houday 493
					echo "<input type=\"text\" name=\"$name\" value=\"$val\" size=\"20\">";
1326 richard 494
					break;
495
			}
496
		}
2312 tom.houday 497
		echo '</td>';
1326 richard 498
	}
2312 tom.houday 499
 
2394 tom.houday 500
 
2006 raphael.pi 501
	print <<<EOM
2424 tom.houday 502
	<tr>
2312 tom.houday 503
		<td class="etiquette" colspan="$colspan">
1326 richard 504
			$l_lang_ticket
505
		</td>
506
		<td width=20>
507
EOM;
2312 tom.houday 508
/*Choix de la langue du ticket d'impression*/
1326 richard 509
	echo" <select name=\"$langue_imp\" onchange=\"lang_imp(this,'newuser')\">
510
			<option value=\"fr\" selected>Fran&ccedil;ais</option>
511
			<option value=\"en\" >English</option>
512
			<option value=\"nl\" >Nederlandse</option>
513
			<option value=\"de\" >Deutsch</option>
514
			<option value=\"es\" >Espa&ntilde;ol</option>
515
			<option value=\"it\" >Italiano</option>
516
			<option value=\"pt\" >Portugês</option>
1805 clement.si 517
		</select></td></tr>";
2312 tom.houday 518
	}
519
echo "</table><br>";
1326 richard 520
if($create == 1)
521
{
2312 tom.houday 522
	echo "<center><a href=\"user_admin.php?login=$login\">$l_show_profile</a></center>";
1326 richard 523
}
524
else
525
{
2312 tom.houday 526
	echo "<input type=\"submit\" class=button value=\"$l_create\" OnClick=\"return formControl('newuser');\">";
527
	echo "<input type=\"hidden\" name=\"nbtickets\" value=\"\">";
528
	echo "<button type=\"button\" id =\"show-advanced-fields\" onclick=\"showAdvancedFields(true)\" style=\"float: right; display: none;\">$l_simple_menu</button>";
529
	echo "<button type=\"button\" id =\"hide-advanced-fields\" onclick=\"showAdvancedFields(false)\" style=\"float: right;\">$l_advanced_menu</button>";
1326 richard 530
	echo "<br>$l_or :<br>";
2312 tom.houday 531
	echo "<input type=\"button\" class=button value=\"$l_create_multiple\" OnClick=\"return createTickets(this.form, '$l_createTicketsMSG');\">";
1326 richard 532
	echo $l_create_multiple_comment;
533
}
534
?>
535
</form>
2312 tom.houday 536
 
537
	</td></tr>
1326 richard 538
</table>
2312 tom.houday 539
</tr>
540
</table>
541
</center>
542
</TD></TR>
1326 richard 543
</TABLE>
544
</td></tr>
545
</TABLE>
2565 lucas.echa 546
<script type="text/javascript" src="/js/jquery.min.js"></script>
547
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
548
<script type="text/javascript" src="/js/schedule.js"></script>
549
<script type="text/javascript" src="/js/login-time.js"></script>
1326 richard 550
</body>
551
</html>