Subversion Repositories ALCASAR

Rev

Rev 2653 | Rev 2691 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
324 richard 1
<?php
2319 tom.houday 2
# $Id: group_new.php 2654 2018-11-04 02:11:25Z tom.houdayer $
508 richard 3
 
2319 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'] = '';
2393 tom.houday 13
}
2501 tom.houday 14
$_POST['Idle-Timeout_op'] = '=';
2393 tom.houday 15
 
2319 tom.houday 16
require('/etc/freeradius-web/config.php');
17
 
18
if (!isset ($create)) $create=0;
19
if (!isset ($login)) $login='';
20
if (!isset ($selected)) $selected=array();
21
 
22
require('../lib/attrshow.php');
23
require('../lib/defaults.php');
24
require("../lib/$config[general_lib_type]/group_info.php");
25
 
1805 clement.si 26
if ($config['general_lib_type'] != 'sql'){
324 richard 27
	echo <<<EOM
28
<title>$l_title</title>
1840 raphael.pi 29
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
324 richard 30
<link rel="stylesheet" href="style.css">
31
</head>
32
<body>
33
<center>
34
<b>This page is only available if you are using sql as general library type</b>
35
</body>
36
</html>
37
EOM;
38
        exit();
39
}
40
 
41
 
2319 tom.houday 42
if (false && /* Hide operator column */ $config['general_lib_type'] == 'sql' && $config['sql_use_operators'] == 'true'){
324 richard 43
	$colspan=2;
44
	$show_ops=1;
1805 clement.si 45
	include_once("../lib/operators.php");
46
	if(!isset($selected[$op_eq])) $selected[$op_eq] = '';
324 richard 47
}else{
48
	$show_ops = 0;
49
	$colspan=1;
50
}
51
?>
2319 tom.houday 52
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
911 richard 53
<html><head><title>New group</title>
1840 raphael.pi 54
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
2565 lucas.echa 55
<link rel="stylesheet" href="/css/jquery-ui.min.css">
324 richard 56
<link rel="stylesheet" href="/css/style.css">
508 richard 57
<link rel="stylesheet" type="text/css" href="/css/epoch_styles.css" />
509 richard 58
<script type="text/javascript" src="/js/epoch_classes.js"></script>
59
<script type="text/javascript" src="/js/fonctions.js"></script>
324 richard 60
<script language="javascript" type="text/javascript">
508 richard 61
/*Insertion du calendrier*/
1805 clement.si 62
	var dp_cal;
508 richard 63
window.onload = function () {
64
	dp_cal  = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
65
};
66
/*Fin calendrier*/
324 richard 67
</script>
2319 tom.houday 68
<script type="text/javascript">
69
	function showAdvancedFields(show) {
70
		var form = document.forms['newgroup'];
71
		var btn_show = document.getElementById('show-advanced-fields');
72
		var btn_hide = document.getElementById('hide-advanced-fields');
73
 
74
		if (show) {
75
			btn_hide.style.display = null;
76
			btn_show.style.display = 'none';
77
			form.className += ' hide-advanced-fields';
78
		} else {
79
			btn_show.style.display = null;
80
			btn_hide.style.display = 'none';
81
			form.className = form.className.replace(' hide-advanced-fields', '');
82
 
83
		}
84
	}
85
</script>
86
<style type="text/css">
87
	.hide-advanced-fields .advanced-field {
88
		display: none;
89
	}
90
</style>
324 richard 91
</head>
92
<body>
93
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
911 richard 94
	<tr><th><? echo "$l_groups_managment"; ?></th></tr>
1805 clement.si 95
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
324 richard 96
height="2"></td></tr>
97
</TABLE>
98
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
99
	<tr bgcolor="#666666"><td>
100
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
101
		<tr><td valign="middle" align="left">
102
<center>
1377 richard 103
<table border=0 width=750 cellpadding=1 cellspacing=1>
324 richard 104
<tr valign=top>
105
<td width=340></td>
106
<td bgcolor="black" width=200>
107
	<table border=0 width=100% cellpadding=2 cellspacing=0>
108
	<tr bgcolor="#907030" align=right valign=top><th>
109
	<font color="white"><? echo "$l_group_create"; ?></font>
110
	</th></tr>
111
	</table>
112
</td></tr>
113
<tr bgcolor="black" valign=top><td colspan=2>
114
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
115
	<tr><td>
1805 clement.si 116
 
324 richard 117
<?php
118
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
119
	include("../lib/$config[general_lib_type]/group_info.php");
120
if ($create == 1){
121
	if ($group_exists != "no"){
122
		echo <<<EOM
907 richard 123
<b><i>$login</i> $l_already_exist</b>
324 richard 124
EOM;
125
	}
126
	else{
2654 tom.houday 127
		$Members = preg_split("/[\n\s]+/",$members,-1,PREG_SPLIT_NO_EMPTY);
128
		$group_macs = [];
129
		if (!empty($Members)){
130
			foreach ($Members as $member){
131
				$mac = exec('sudo /usr/sbin/chilli_query list | awk '.escapeshellarg('($5 == 1) && ($6 == "'.$member.'") {print $1}'));
132
				if (!empty($mac)) {
133
					exec('sudo /usr/sbin/chilli_query logout mac '.escapeshellarg($mac));
134
					if ($member === $mac) {
135
						$group_macs[] = $mac;
136
					}
137
				}
138
			}
139
		}
140
 
324 richard 141
		if (is_file("../lib/$config[general_lib_type]/create_group.php"))
142
			include("../lib/$config[general_lib_type]/create_group.php");
143
		if (is_file("../lib/$config[general_lib_type]/group_info.php"))
144
			include("../lib/$config[general_lib_type]/group_info.php");
2654 tom.houday 145
 
146
		// Reconnect allowed MAC from the selected group
147
		foreach ($group_macs as $mac) {
148
			exec('sudo /usr/sbin/chilli_query login mac '.escapeshellarg($mac).' username '.escapeshellarg($mac)." password 'password'");
149
		}
324 richard 150
	}
151
}
1377 richard 152
if ($create == 0){
324 richard 153
?>
2319 tom.houday 154
   <form name="newgroup" method="post" class="">
155
      <input type="hidden" name="create" value="0">
156
      <input type="hidden" name="show" value="0">
324 richard 157
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
158
<?php
159
	echo <<<EOM
160
	<tr>
508 richard 161
		<td class="etiquette" colspan=$colspan>
907 richard 162
		$l_created_groups
324 richard 163
		</td><td>
164
EOM;
165
		if (!isset($existing_groups))
907 richard 166
			echo "<b>$l_group_empty</b>\n";
324 richard 167
		else{
1805 clement.si 168
			echo "<select name=\"existing_groups\">\n";
324 richard 169
			foreach ($existing_groups as $group => $count)
170
				echo "<option value=\"$group\">$group\n";
171
			echo "</select>\n";
172
		}
173
	echo <<<EOM
174
		</td>
175
	</tr>
176
	<tr>
508 richard 177
		<td class="etiquette" colspan=$colspan>
907 richard 178
		$l_group_name
324 richard 179
		</td><td>
180
		<input type=text name="login" value="$login" size=35>
181
		</td>
182
	</tr>
183
	<tr>
508 richard 184
		<td class="etiquette" colspan=$colspan>
907 richard 185
		$l_group_members
324 richard 186
		</td><td>
1377 richard 187
		<textarea name=members cols="50" wrap="PHYSICAL" rows=5></textarea>
324 richard 188
		</td>
189
	</tr>
1805 clement.si 190
 
324 richard 191
EOM;
192
	foreach($show_attrs as $key => $desc){
2394 tom.houday 193
		if ($key === 'Idle-Timeout') continue;
324 richard 194
		$name = $attrmap["$key"];
195
		if ($name == 'none')
196
			continue;
197
		$oper_name = $name . '_op';
1805 clement.si 198
		if(isset($item_vals["$key"][0]) && $item_vals["$key"][0] != ''){
199
			$val = $item_vals["$key"][0];
200
		} else if(isset($default_vals["$key"][0])) {
201
			$val = $default_vals["$key"][0];
202
		} else {
203
			$val = '';
204
		}
508 richard 205
		switch ($key)
206
		{
1805 clement.si 207
		// $advanced = 1 : champs de saisie amélioré (calendrier, convertisseur, etc.)
208
			case 'Simultaneous-Use' :
2319 tom.houday 209
				$advanced = false;
210
				$help_link = "help/simultaneous_use_help.html";
211
				$desc = $l_simultaneous_use;
907 richard 212
				break;
213
			case 'Max-All-Session' :
2618 tom.houday 214
				$advanced = true;
2319 tom.houday 215
				$help_link = "help/max_all_session_help.html";
216
				$desc = $l_max_all_session;
907 richard 217
				break;
1805 clement.si 218
			case 'Session-Timeout' :
2319 tom.houday 219
				$advanced = true;
220
				$help_link = "help/session_timeout_help.html";
221
				$desc = $l_session_timeout;
907 richard 222
				break;
223
			case 'Max-Daily-Session' :
2319 tom.houday 224
				$advanced = true;
225
				$help_link = "help/session_timeout_help.html";
226
				$desc = $l_daily_timeout;
907 richard 227
				break;
228
			case 'Max-Monthly-Session' :
2319 tom.houday 229
				$advanced = true;
230
				$help_link = "help/session_timeout_help.html";
231
				$desc = $l_monthly_timeout;
907 richard 232
				break;
1805 clement.si 233
			case 'Login-Time' :
2319 tom.houday 234
				$advanced = true;
235
				$help_link = "help/login_time_help.html";
236
				$desc = $l_login_time;
907 richard 237
				break;
238
			case 'Expiration' :
2319 tom.houday 239
				$advanced = false;
240
				$help_link = "help/expiration_help.html";
241
				$desc = $l_expiration;
907 richard 242
				break;
2512 tom.houday 243
			case 'CoovaChilli-Max-Input-Octets' :
2319 tom.houday 244
				$advanced = true;
2512 tom.houday 245
				$help_link = "help/coovachilli_max_input_octets_help.html";
2319 tom.houday 246
				$desc = $l_max_input_octets;
907 richard 247
				break;
2512 tom.houday 248
			case 'CoovaChilli-Max-Output-Octets' :
2319 tom.houday 249
				$advanced = true;
2512 tom.houday 250
				$help_link = "help/coovachilli_max_output_octets_help.html";
2319 tom.houday 251
				$desc = $l_max_output_octets;
907 richard 252
				break;
2512 tom.houday 253
			case 'CoovaChilli-Max-Total-Octets' :
2319 tom.houday 254
				$advanced = true;
2512 tom.houday 255
				$help_link = "help/coovachilli_max_total_octets_help.html";
2319 tom.houday 256
				$desc = $l_max_total_octets;
907 richard 257
				break;
2513 tom.houday 258
			case 'CoovaChilli-Max-Total-Octets-Daily' :
259
				$advanced = true;
260
				$help_link = "help/coovachilli_max_total_octets_help.html";
261
				$desc = $l_max_total_octets_daily;
262
				break;
263
			case 'CoovaChilli-Max-Total-Octets-Monthly' :
264
				$advanced = true;
265
				$help_link = "help/coovachilli_max_total_octets_help.html";
266
				$desc = $l_max_total_octets_monthly;
267
				break;
2512 tom.houday 268
			case 'CoovaChilli-Bandwidth-Max-Up' :
2319 tom.houday 269
				$advanced = true;
2512 tom.houday 270
				$help_link = "help/coovachilli_bandwidth_max_up_help.html";
2319 tom.houday 271
				$desc = $l_max_bandwidth_up;
907 richard 272
				break;
2512 tom.houday 273
			case 'CoovaChilli-Bandwidth-Max-Down' :
2319 tom.houday 274
				$advanced = true;
2512 tom.houday 275
				$help_link = "help/coovachilli_bandwidth_max_down_help.html";
2319 tom.houday 276
				$desc = $l_max_bandwidth_down;
907 richard 277
				break;
508 richard 278
			case 'WISPr-Redirection-URL' :
2319 tom.houday 279
				$advanced = true;
280
				$help_link = "help/wispr_redirection_url_help.html";
281
				$desc = $l_wispr_redirection;
508 richard 282
				break;
2501 tom.houday 283
			case 'Alcasar-Filter' :
2319 tom.houday 284
				$advanced = false;
285
				$help_link = "help/filtering_help.html";
286
				$desc = $l_filtering;
1377 richard 287
				break;
2505 tom.houday 288
			case 'Alcasar-Protocols-Filter' :
2501 tom.houday 289
				$advanced = false;
290
				$help_link = "help/protocols_help.html";
291
				$desc = $l_proto;
292
				break;
2505 tom.houday 293
			case 'Alcasar-Status-Page-Must-Stay-Open' :
2501 tom.houday 294
				$advanced = false;
295
				$help_link = "help/statusOpenRequired_help.html";
296
				$desc = $l_statusOpenRequired;
297
				break;
2510 tom.houday 298
			case 'Alcasar-Expire-After' :
2595 tom.houday 299
				$advanced = true;
300
				$help_link = "help/expire_after_help.html";
301
				$desc = $l_expire_after;
2510 tom.houday 302
				break;
508 richard 303
			default:
2319 tom.houday 304
				$advanced = true;
508 richard 305
				break;
306
		}
2319 tom.houday 307
 
308
		$advancedField = ($advanced) ? ' class="advanced-field"' : '';
309
 
310
		if ($show_ops){
907 richard 311
		print <<<EOM
2319 tom.houday 312
			<tr$advancedField>
907 richard 313
			<td class="etiquette">
2319 tom.houday 314
			<a href="$help_link" target=help onclick="window.open('$help_link','help','width=600,height=250,toolbar=no,scrollbars=no,resizable=yes')" title="$l_click_for_help"><font color="blue">$desc</font></a>
907 richard 315
			</td>
324 richard 316
EOM;
2319 tom.houday 317
			switch ($key) {
1805 clement.si 318
				case 'Simultaneous-Use' :
890 stephane 319
				case 'Max-All-Session' :
508 richard 320
				case 'Max-Daily-Session' :
321
				case 'Max-Weekly-Session' :
322
				case 'Max-Monthly-Session' :
1805 clement.si 323
				case 'Login-Time' :
907 richard 324
				case 'Expiration' :
2510 tom.houday 325
				case 'Alcasar-Expire-After' :
2513 tom.houday 326
				case 'CoovaChilli-Max-Total-Octets-Daily' :
327
				case 'CoovaChilli-Max-Total-Octets-Monthly' :
2618 tom.houday 328
				case 'CoovaChilli-Max-Total-Octets' :
2319 tom.houday 329
					echo "<td><select name=\"$oper_name\"><option $selected[$op_eq] value=\":=\">:=";
508 richard 330
					break;
907 richard 331
				case 'Session-Timeout' :
2512 tom.houday 332
				case 'CoovaChilli-Max-Input-Octets' :
333
				case 'CoovaChilli-Max-Output-Octets' :
334
				case 'CoovaChilli-Bandwidth-Max-Up' :
335
				case 'CoovaChilli-Bandwidth-Max-Down' :
508 richard 336
				case 'WISPr-Redirection-URL' :
2501 tom.houday 337
				case 'Alcasar-Filter' :
2505 tom.houday 338
				case 'Alcasar-Protocols-Filter' :
339
				case 'Alcasar-Status-Page-Must-Stay-Open' :
2319 tom.houday 340
					echo "<td><select name=\"$oper_name\"><option $selected[$op_eq] value=\"=\">=";
508 richard 341
					break;
342
				default :
343
					print <<<EOM
344
					<td>
2319 tom.houday 345
						<select name=\"$oper_name\">
907 richard 346
							<option $selected[$op_eq] value="=">=
347
							<option $selected[$op_set] value=":=">:=
348
							<option $selected[$op_add] value="+=">+=
349
							<option $selected[$op_eq2] value="==">==
350
							<option $selected[$op_ne] value="!=">!=
351
							<option $selected[$op_gt] value=">">&gt;
352
							<option $selected[$op_ge] value=">=">&gt;=
353
							<option $selected[$op_lt] value="<">&lt;
354
							<option $selected[$op_le] value="<=">&lt;=
355
							<option $selected[$op_regeq] value="=~">=~
356
							<option $selected[$op_regne] value="!~">!~
357
							<option $selected[$op_exst] value="=*">=*
358
							<option $selected[$op_nexst] value="!*">!*
359
						</select>
508 richard 360
					</td>
324 richard 361
EOM;
508 richard 362
					break;
363
			}
2319 tom.houday 364
		} else {
365
			print <<<EOM
366
				<tr$advancedField>
367
				<td class="etiquette" colspan="$colspan">
368
				<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>
369
EOM;
370
			switch ($key) {
371
				case 'Simultaneous-Use' :
372
				case 'Max-All-Session' :
373
				case 'Max-Daily-Session' :
374
				case 'Max-Weekly-Session' :
375
				case 'Max-Monthly-Session' :
376
				case 'Login-Time' :
377
				case 'Expiration' :
2501 tom.houday 378
				case 'Alcasar-Filter' :
2505 tom.houday 379
				case 'Alcasar-Protocols-Filter' :
380
				case 'Alcasar-Status-Page-Must-Stay-Open' :
2510 tom.houday 381
				case 'Alcasar-Expire-After' :
2513 tom.houday 382
				case 'CoovaChilli-Max-Total-Octets-Daily' :
383
				case 'CoovaChilli-Max-Total-Octets-Monthly' :
2618 tom.houday 384
				case 'CoovaChilli-Max-Total-Octets' :
2319 tom.houday 385
					echo "<input type=\"hidden\" name=\"$oper_name\" value=\":=\">";
386
					break;
387
				case 'Session-Timeout' :
2512 tom.houday 388
				case 'CoovaChilli-Max-Input-Octets' :
389
				case 'CoovaChilli-Max-Output-Octets' :
390
				case 'CoovaChilli-Bandwidth-Max-Up' :
391
				case 'CoovaChilli-Bandwidth-Max-Down' :
2319 tom.houday 392
				case 'WISPr-Redirection-URL' :
393
					echo "<input type=\"hidden\" name=\"$oper_name\" value=\"=\">";
394
					break;
395
				default :
396
					print <<<EOM
397
						<select name=\"$oper_name\">
398
							<option $selected[$op_eq] value="=">=</option>
399
							<option $selected[$op_set] value=":=">:=</option>
400
							<option $selected[$op_add] value="+=">+=</option>
401
							<option $selected[$op_eq2] value="==">==</option>
402
							<option $selected[$op_ne] value="!=">!=</option>
403
							<option $selected[$op_gt] value=">">&gt;</option>
404
							<option $selected[$op_ge] value=">=">&gt;=</option>
405
							<option $selected[$op_lt] value="<">&lt;</option>
406
							<option $selected[$op_le] value="<=">&lt;=</option>
407
							<option $selected[$op_regeq] value="=~">=~</option>
408
							<option $selected[$op_regne] value="!~">!~</option>
409
							<option $selected[$op_exst] value="=*">=*</option>
410
							<option $selected[$op_nexst] value="!*">!*</option>
411
						</select>
412
EOM;
413
					break;
414
			}
415
			echo '</td>';
324 richard 416
		}
1805 clement.si 417
 
418
/*
419
Ajout du choix d'unité (pour les durées limites de session, journée et de mois)
508 richard 420
et d'un calendrier pour la date d'expiration
421
Sauf dans le cas de la visualisation
422
*/
2319 tom.houday 423
	echo '<td>';
424
	if ($create == 0) {
508 richard 425
		switch ($name){
426
			/*
2319 tom.houday 427
			Choix de l'unité jour, heures, minutes ou secondes
428
			pour les durées limites max, de session,de journée et de mois
1805 clement.si 429
			*/
508 richard 430
			case 'Session-Timeout' :
431
			case 'Max-Daily-Session' :
2319 tom.houday 432
				/*valeur d'origine de durée limite */
433
				echo"<input type=\"text\" name=\"$name\" onfocus=\"this.value=''\" value=\"$val\" size=10>";
434
				/* Choix d'unité*/
2321 tom.houday 435
				echo" <select name=\"$name"."_opt"."\" onchange=\"temps(this,'$name','newgroup')\">
2319 tom.houday 436
						<option value=\"s\" selected>s</option>
437
						<option value=\"m\" >m</option>
438
						<option value=\"H\" >H</option>
439
					</select>";
440
				break;
508 richard 441
			case 'Max-Monthly-Session' :
907 richard 442
			case 'Max-All-Session' :
2510 tom.houday 443
			case 'Alcasar-Expire-After' :
508 richard 444
				/*valeur d'origine de durée limite */
2319 tom.houday 445
				echo"<input type=\"text\" name=\"$name\" onfocus=\"this.value=''\" value=\"$val\" size=10>";
508 richard 446
				/* Choix d'unité*/
2321 tom.houday 447
				echo" <select name=\"$name"."_opt"."\" onchange=\"temps(this,'$name','newgroup')\">
508 richard 448
						<option value=\"s\" selected>s</option>
449
						<option value=\"m\" >m</option>
450
						<option value=\"H\" >H</option>
2319 tom.houday 451
						<option value=\"J\" >J</option>
508 richard 452
					</select>";
453
				break;
454
			case 'Expiration' :
455
				/*Ajout du calendrier pour choisir la date*/
2319 tom.houday 456
				echo"<input id=\"popup_container\" type=\"text\" name=\"$name\" value=\"$val\" size=\"20\">";
508 richard 457
				break;
2501 tom.houday 458
			case 'Alcasar-Filter' :
459
				echo "<select name=\"$name\">";
460
				echo "<option value=\"\"></option>";
461
				echo "<option value=\"1\">$l_filtering_none</option>";
462
				echo "<option value=\"2\">$l_filtering_havp</option>";
463
				echo "<option value=\"3\">$l_filtering_havp_bl</option>";
464
				echo "<option value=\"4\">$l_filtering_havp_wl</option>";
1377 richard 465
				echo "</select>";
466
				break;
2505 tom.houday 467
			case 'Alcasar-Protocols-Filter' :
2501 tom.houday 468
				echo "<select name=\"$name\">";
469
				echo "<option value=\"\"></option>";
470
				echo "<option value=\"1\">$l_proto_0</option>";
471
				echo "<option value=\"2\">$l_proto_1</option>";
472
				echo "<option value=\"3\">$l_proto_2</option>";
473
				echo "<option value=\"4\">$l_proto_3</option>";
474
				echo "</select>";
475
				break;
2505 tom.houday 476
			case 'Alcasar-Status-Page-Must-Stay-Open' :
2653 tom.houday 477
				echo "<select name=\"$name\">";
478
				echo "<option value=\"\"></option>";
479
				echo "<option value=\"1\">$l_yes</option>";
480
				echo "<option value=\"2\">$l_no</option>";
481
				echo "</select>";
2501 tom.houday 482
				break;
2565 lucas.echa 483
			case 'Login-Time':
2628 lucas.echa 484
				echo "<input type=\"text\" name=\"$name\" id=\"$name\" value=\"$val\" size=\"20\">";
2565 lucas.echa 485
				echo "<a id=\"login-time-calendar\" href=\"#\"><img alt=\"schedule\" src=\"images/calendar.png\"/></a>";
486
				echo '<div id="login-time-dialog" title="Weekly period"><div id="login-time-schedule"></div></div>';
487
				break;
508 richard 488
			default :
2319 tom.houday 489
				echo "<input type=\"text\" name=\"$name\" value=\"$val\" size=\"20\">";
508 richard 490
				break;
2319 tom.houday 491
		}
324 richard 492
	}
508 richard 493
/*fin Ajout*/
494
}
2006 raphael.pi 495
 
324 richard 496
echo "</table><BR>";
2394 tom.houday 497
 
1377 richard 498
}
324 richard 499
if ($create == 1)
1377 richard 500
	echo "<br/><center><a href=\"group_admin.php?login=$login\">$l_show_profile</a></center>";
2383 tom.houday 501
else {
907 richard 502
	echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newgroup');\">";
2319 tom.houday 503
	echo "<button type=\"button\" id =\"show-advanced-fields\" onclick=\"showAdvancedFields(true)\" style=\"float: right;\">$l_simple_menu</button>";
504
	echo "<button type=\"button\" id =\"hide-advanced-fields\" onclick=\"showAdvancedFields(false)\" style=\"float: right; display: none;\">$l_advanced_menu</button>";
2383 tom.houday 505
}
324 richard 506
?>
507
<br><br>
508
</form>
509
	</td></tr>
510
</table>
511
</tr>
512
</table>
2319 tom.houday 513
</center>
324 richard 514
</TD></TR>
515
</TABLE>
516
</td></tr>
517
</TABLE>
2565 lucas.echa 518
<script type="text/javascript" src="/js/jquery.min.js"></script>
519
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
520
<script type="text/javascript" src="/js/schedule.js"></script>
521
<script type="text/javascript" src="/js/login-time.js"></script>
324 richard 522
</body>
523
</html>