Subversion Repositories ALCASAR

Rev

Rev 2501 | Rev 2510 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2501 Rev 2505
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: user_edit.php 2501 2018-02-28 00:34:14Z tom.houdayer $
2
# $Id: user_edit.php 2505 2018-03-11 13:41:00Z tom.houdayer $
3
 
3
 
4
//gestion de la langue
4
//gestion de la langue
5
if (is_file("../lib/langues.php"))
5
if (is_file("../lib/langues.php"))
6
	include("../lib/langues.php");
6
	include("../lib/langues.php");
7
 
7
 
8
// Update Alcasar-Status-Open-Required
8
// Update Alcasar-Status-Page-Must-Stay-Open
9
if ((isset($_POST['Alcasar-Status-Open-Required0'])) && ($_POST['Alcasar-Status-Open-Required0'] === '2')) {
9
if ((isset($_POST['Alcasar-Status-Page-Must-Stay-Open0'])) && ($_POST['Alcasar-Status-Page-Must-Stay-Open0'] === '2')) {
10
	$_POST['Idle-Timeout0'] = '600'; // 10 minutes
10
	$_POST['Idle-Timeout0'] = '600'; // 10 minutes
11
} else {
11
} else {
12
	$_POST['Idle-Timeout0'] = '';
12
	$_POST['Idle-Timeout0'] = '';
13
}
13
}
14
$_POST['Idle-Timeout0_op'] = '=';
14
$_POST['Idle-Timeout0_op'] = '=';
Line 288... Line 288...
288
						$grp_filter = $l_filtering_none;
288
						$grp_filter = $l_filtering_none;
289
					} else {
289
					} else {
290
						$grp_filter = '';
290
						$grp_filter = '';
291
					}
291
					}
292
					break;
292
					break;
293
				case 'Alcasar-Filter-Proto' :
293
				case 'Alcasar-Protocols-Filter' :
294
					if ($val === '4') {
294
					if ($val === '4') {
295
						$grp_filterProto = $l_proto_3;
295
						$grp_filterProto = $l_proto_3;
296
					} else if ($val === '3') {
296
					} else if ($val === '3') {
297
						$grp_filterProto = $l_proto_2;
297
						$grp_filterProto = $l_proto_2;
298
					} else if ($val === '2') {
298
					} else if ($val === '2') {
Line 301... Line 301...
301
						$grp_filterProto = $l_proto_0;
301
						$grp_filterProto = $l_proto_0;
302
					} else {
302
					} else {
303
						$grp_filterProto = '';
303
						$grp_filterProto = '';
304
					}
304
					}
305
					break;
305
					break;
306
				case 'Alcasar-Status-Open-Required' :
306
				case 'Alcasar-Status-Page-Must-Stay-Open' :
307
					if ($val === '2') {
307
					if ($val === '2') {
308
						$grp_statusOpenRequired = $l_no;
308
						$grp_statusOpenRequired = $l_no;
309
					} else if ($val === '1') {
309
					} else if ($val === '1') {
310
						$grp_statusOpenRequired = $l_yes;
310
						$grp_statusOpenRequired = $l_yes;
311
					} else {
311
					} else {
Line 495... Line 495...
495
				case 'Alcasar-Filter' :
495
				case 'Alcasar-Filter' :
496
					$advanced = false;
496
					$advanced = false;
497
					$help_link = "help/filtering_help.html";
497
					$help_link = "help/filtering_help.html";
498
					$desc = $l_filtering;
498
					$desc = $l_filtering;
499
					break;
499
					break;
500
				case 'Alcasar-Filter-Proto' :
500
				case 'Alcasar-Protocols-Filter' :
501
					$advanced = false;
501
					$advanced = false;
502
					$help_link = "help/protocols_help.html";
502
					$help_link = "help/protocols_help.html";
503
					$desc = $l_proto;
503
					$desc = $l_proto;
504
					break;
504
					break;
505
				case 'Alcasar-Status-Open-Required' :
505
				case 'Alcasar-Status-Page-Must-Stay-Open' :
506
					$advanced = false;
506
					$advanced = false;
507
					$help_link = "help/statusOpenRequired_help.html";
507
					$help_link = "help/statusOpenRequired_help.html";
508
					$desc = $l_statusOpenRequired;
508
					$desc = $l_statusOpenRequired;
509
					break;
509
					break;
510
				default:
510
				default:
Line 538... Line 538...
538
					case 'ChilliSpot-Max-Total-Octets' :
538
					case 'ChilliSpot-Max-Total-Octets' :
539
					case 'ChilliSpot-Bandwidth-Max-Up' :
539
					case 'ChilliSpot-Bandwidth-Max-Up' :
540
					case 'ChilliSpot-Bandwidth-Max-Down' :
540
					case 'ChilliSpot-Bandwidth-Max-Down' :
541
					case 'WISPr-Redirection-URL' :
541
					case 'WISPr-Redirection-URL' :
542
					case 'Alcasar-Filter' :
542
					case 'Alcasar-Filter' :
543
					case 'Alcasar-Filter-Proto' :
543
					case 'Alcasar-Protocols-Filter' :
544
					case 'Alcasar-Status-Open-Required' :
544
					case 'Alcasar-Status-Page-Must-Stay-Open' :
545
						echo "<td><select name=\"$oper_name\"><option $selected[$op_eq] value=\"=\">=</option></select></td>";
545
						echo "<td><select name=\"$oper_name\"><option $selected[$op_eq] value=\"=\">=</option></select></td>";
546
						break;
546
						break;
547
					default :
547
					default :
548
						print <<<EOM
548
						print <<<EOM
549
							<td>
549
							<td>
Line 588... Line 588...
588
					case 'ChilliSpot-Max-Total-Octets' :
588
					case 'ChilliSpot-Max-Total-Octets' :
589
					case 'ChilliSpot-Bandwidth-Max-Up' :
589
					case 'ChilliSpot-Bandwidth-Max-Up' :
590
					case 'ChilliSpot-Bandwidth-Max-Down' :
590
					case 'ChilliSpot-Bandwidth-Max-Down' :
591
					case 'WISPr-Redirection-URL' :
591
					case 'WISPr-Redirection-URL' :
592
					case 'Alcasar-Filter' :
592
					case 'Alcasar-Filter' :
593
					case 'Alcasar-Filter-Proto' :
593
					case 'Alcasar-Protocols-Filter' :
594
					case 'Alcasar-Status-Open-Required' :
594
					case 'Alcasar-Status-Page-Must-Stay-Open' :
595
						echo "<input type=\"hidden\" name=\"$oper_name\" value=\"=\">";
595
						echo "<input type=\"hidden\" name=\"$oper_name\" value=\"=\">";
596
						break;
596
						break;
597
					default :
597
					default :
598
						print <<<EOM
598
						print <<<EOM
599
							<select name=\"$oper_name\">
599
							<select name=\"$oper_name\">
Line 663... Line 663...
663
						echo "$grp_redir";
663
						echo "$grp_redir";
664
						break;
664
						break;
665
					case 'Alcasar-Filter' :
665
					case 'Alcasar-Filter' :
666
						echo "$grp_filter";
666
						echo "$grp_filter";
667
						break;
667
						break;
668
					case 'Alcasar-Filter-Proto' :
668
					case 'Alcasar-Protocols-Filter' :
669
						echo "$grp_filterProto";
669
						echo "$grp_filterProto";
670
						break;
670
						break;
671
					case 'Alcasar-Status-Open-Required' :
671
					case 'Alcasar-Status-Page-Must-Stay-Open' :
672
						echo "$grp_statusOpenRequired";
672
						echo "$grp_statusOpenRequired";
673
						break;
673
						break;
674
					default :
674
					default :
675
						break;
675
						break;
676
				}
676
				}
Line 717... Line 717...
717
					echo "<option value=\"2\"".(($val === '2') ? ' selected' : '').">$l_filtering_havp</option>";
717
					echo "<option value=\"2\"".(($val === '2') ? ' selected' : '').">$l_filtering_havp</option>";
718
					echo "<option value=\"3\"".(($val === '3') ? ' selected' : '').">$l_filtering_havp_bl</option>";
718
					echo "<option value=\"3\"".(($val === '3') ? ' selected' : '').">$l_filtering_havp_bl</option>";
719
					echo "<option value=\"4\"".(($val === '4') ? ' selected' : '').">$l_filtering_havp_wl</option>";
719
					echo "<option value=\"4\"".(($val === '4') ? ' selected' : '').">$l_filtering_havp_wl</option>";
720
					echo "</select>";
720
					echo "</select>";
721
					break;
721
					break;
722
				case 'Alcasar-Filter-Proto' :
722
				case 'Alcasar-Protocols-Filter' :
723
					echo "<select name=\"$name1\">";
723
					echo "<select name=\"$name1\">";
724
					echo "<option value=\"\"".(($val === '') ? ' selected' : '')."></option>";
724
					echo "<option value=\"\"".(($val === '') ? ' selected' : '')."></option>";
725
					echo "<option value=\"1\"".(($val === '1') ? ' selected' : '').">$l_proto_0</option>";
725
					echo "<option value=\"1\"".(($val === '1') ? ' selected' : '').">$l_proto_0</option>";
726
					echo "<option value=\"2\"".(($val === '2') ? ' selected' : '').">$l_proto_1</option>";
726
					echo "<option value=\"2\"".(($val === '2') ? ' selected' : '').">$l_proto_1</option>";
727
					echo "<option value=\"3\"".(($val === '3') ? ' selected' : '').">$l_proto_2</option>";
727
					echo "<option value=\"3\"".(($val === '3') ? ' selected' : '').">$l_proto_2</option>";
728
					echo "<option value=\"4\"".(($val === '4') ? ' selected' : '').">$l_proto_3</option>";
728
					echo "<option value=\"4\"".(($val === '4') ? ' selected' : '').">$l_proto_3</option>";
729
					echo "</select>";
729
					echo "</select>";
730
					break;
730
					break;
731
				case 'Alcasar-Status-Open-Required' :
731
				case 'Alcasar-Status-Page-Must-Stay-Open' :
732
					echo "<label><input type=\"radio\" name=\"$name1\" value=\"\"".(($val !== '2') ? ' checked' : '').">$l_yes</label>
732
					echo "<label><input type=\"radio\" name=\"$name1\" value=\"\"".(($val !== '2') ? ' checked' : '').">$l_yes</label>
733
						<label><input type=\"radio\" name=\"$name1\" value=\"2\"".(($val === '2') ? ' checked' : '').">$l_no</label>";
733
						<label><input type=\"radio\" name=\"$name1\" value=\"2\"".(($val === '2') ? ' checked' : '').">$l_no</label>";
734
					break;
734
					break;
735
				default :
735
				default :
736
					echo "<input type=\"text\" name=\"$name1\" value=\"$val\" size=\"20\">";
736
					echo "<input type=\"text\" name=\"$name1\" value=\"$val\" size=\"20\">";