Subversion Repositories ALCASAR

Rev

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

Rev 1883 Rev 2006
Line 1... Line 1...
1
<?php
1
<?php
2
//gestion de la langue
2
//gestion de la langue
3
if (is_file("../lib/langues.php"))
3
if (is_file("../lib/langues.php"))
4
	include("../lib/langues.php");
4
	include("../lib/langues.php");
-
 
5
 
-
 
6
//update Filter-Id for protocol filtering
-
 
7
if (isset($_POST['Filter-Proto']) && isset($_POST['Filter-Id0']))
-
 
8
{
-
 
9
	$upId = (int)$_POST['Filter-Proto'];
-
 
10
	$downId = (int)$_POST['Filter-Id0'];
-
 
11
	$upId = $upId+$downId;
-
 
12
	$upId = str_pad($upId, 8, '0', STR_PAD_LEFT);
-
 
13
	$_POST['Filter-Id0'] = $upId;
-
 
14
}	
-
 
15
 
5
require('/etc/freeradius-web/config.php');
16
require('/etc/freeradius-web/config.php');
6
require('../lib/attrshow.php');
17
require('../lib/attrshow.php');
7
require('../lib/defaults.php');
18
require('../lib/defaults.php');
8
 
19
 
9
if(!isset($change)) $change = 0;
20
if(!isset($change)) $change = 0;
Line 266... Line 277...
266
						break;
277
						break;
267
					case 'WISPr-Redirection-URL' :
278
					case 'WISPr-Redirection-URL' :
268
						$grp_redir="<td bgcolor=\"#BEBEBE\">$val</td>";
279
						$grp_redir="<td bgcolor=\"#BEBEBE\">$val</td>";
269
						break;
280
						break;
270
					case 'Filter-Id' :
281
					case 'Filter-Id' :
-
 
282
					
-
 
283
						$grp_proto_select = array();
-
 
284
						$grp_proto_select[0] = '';
-
 
285
						$grp_proto_select[1] = '';
-
 
286
						$grp_proto_select[2] = '';
-
 
287
						$grp_proto_select[3] = '';
-
 
288
						
-
 
289
						//WL
271
						switch($val)
290
						if($val[5] == '1')
272
						{
291
						{
-
 
292
							$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp_wl</td>";
273
							case "00000001":
293
							if($val[0] == '1')
-
 
294
							{
274
								$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp</td>";
295
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_1</td>";
-
 
296
								break;
-
 
297
							}
-
 
298
							if($val[1] == '1')
-
 
299
							{
-
 
300
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_2</td>";
275
								break;
301
								break;
-
 
302
							}
276
							case "00000011":
303
							if($val[2] == '1')
-
 
304
							{
-
 
305
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_3</td>";
-
 
306
								break;
-
 
307
							}
-
 
308
							$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_0</td>";
-
 
309
							break;
-
 
310
						
-
 
311
							break;
-
 
312
						}
-
 
313
						
-
 
314
						//BL
-
 
315
						if($val[6] == '1')
-
 
316
						{
277
								$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp_bl</td>";
317
							$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp_bl</td>";
-
 
318
							if($val[0] == '1')
-
 
319
							{
-
 
320
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_1</td>";
-
 
321
								break;
-
 
322
							}
-
 
323
							if($val[1] == '1')
-
 
324
							{
-
 
325
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_2</td>";
-
 
326
								break;
-
 
327
							}
-
 
328
							if($val[2] == '1')
-
 
329
							{
-
 
330
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_3</td>";
-
 
331
								break;
-
 
332
							}
-
 
333
							$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_0</td>";
-
 
334
							break;
-
 
335
						}
-
 
336
						
-
 
337
						//HAVP
-
 
338
						if($val[7] == '1')
-
 
339
						{
-
 
340
							$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp</td>";
-
 
341
							if($val[0] == '1')
-
 
342
							{
-
 
343
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_1</td>";
278
								break;
344
								break;
-
 
345
							}
279
							case "00000101":
346
							if($val[1] == '1')
-
 
347
							{
280
								$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_havp_wl</td>";
348
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_2</td>";
281
								break;
349
								break;
-
 
350
							}
-
 
351
							if($val[2] == '1')
282
							default :
352
							{
283
								$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_none</td>";
353
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_3</td>";
284
								break;
354
								break;
-
 
355
							}
-
 
356
							$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_0</td>";
-
 
357
							break;
285
						}
358
						}
-
 
359
						else
-
 
360
						{
-
 
361
							$grp_filter="<td bgcolor=\"#BEBEBE\">$l_filtering_none</td>";
-
 
362
							if($val[0] == '1')
-
 
363
							{
-
 
364
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_1</td>";
-
 
365
								break;
-
 
366
							}
-
 
367
							if($val[1] == '1')
-
 
368
							{
-
 
369
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_2</td>";
-
 
370
								break;
-
 
371
							}
-
 
372
							if($val[2] == '1')
-
 
373
							{
-
 
374
								$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_3</td>";
-
 
375
								break;
-
 
376
							}
-
 
377
							$grp_proto="<td bgcolor=\"#BEBEBE\">$l_proto_0</td>";
-
 
378
							break;
-
 
379
						}
-
 
380
						
286
						break;
381
						break;
287
					}
382
					}
288
				}
383
				}
289
 
384
 
290
		}
385
		}
Line 543... Line 638...
543
						break;
638
						break;
544
					case 'WISPr-Redirection-URL' :
639
					case 'WISPr-Redirection-URL' :
545
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_redir<td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
640
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_redir<td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
546
						break;
641
						break;
547
					case 'Filter-Id' :
642
					case 'Filter-Id' :
-
 
643
						$proto_select = array();
-
 
644
						$proto_select[0] = '';
-
 
645
						$proto_select[1] = '';
-
 
646
						$proto_select[2] = '';
-
 
647
						$proto_select[3] = '';
-
 
648
						//WL
548
						switch($val)
649
						if($val[6] == '1')
549
						{
650
						{
550
							case "00000001":
651
							echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\" selected=\"selected\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
-
 
652
							if($val[0] == '1')
551
								echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$l_filtering_none</option><option value=\"00000001\" selected=\"selected\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
653
							{
-
 
654
								$proto_select[1] = "selected";
552
								break;
655
								break;
-
 
656
							}
553
							case "00000011":
657
							if($val[1] == '1')
554
								echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\" selected=\"selected\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
658
							{
-
 
659
								$proto_select[2] = "selected";
555
								break;
660
								break;
-
 
661
							}
556
							case "00000101":
662
							if($val[2] == '1')
-
 
663
							{
-
 
664
								$proto_select[3] = "selected";
-
 
665
								break;
-
 
666
							}
-
 
667
							$proto_select[0] = "selected";
-
 
668
							
-
 
669
							break;
-
 
670
						}
-
 
671
						//BL
-
 
672
						if($val[5] == '1')
-
 
673
						{
557
							echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\" selected=\"selected\">$l_filtering_havp_wl</option></select></td>";
674
							echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\" selected=\"selected\">$l_filtering_havp_wl</option></select></td>";
-
 
675
							if($val[0] == '1')
-
 
676
							{
-
 
677
								$proto_select[1] = "selected";
-
 
678
								break;
-
 
679
							}
-
 
680
							if($val[1] == '1')
-
 
681
							{
-
 
682
								$proto_select[2] = "selected";
-
 
683
								break;
-
 
684
							}
-
 
685
							if($val[2] == '1')
-
 
686
							{
-
 
687
								$proto_select[3] = "selected";
558
								break;
688
								break;
-
 
689
							}
-
 
690
							$proto_select[0] = "selected";
-
 
691
							break;
-
 
692
						}
-
 
693
						
-
 
694
						//HAVP 
-
 
695
						if($val[7] == '1')
-
 
696
						{
559
							default :
697
							echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\">$l_filtering_none</option><option value=\"00000001\" selected=\"selected\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
-
 
698
							if($val[0] == '1')
-
 
699
							{
-
 
700
								$proto_select[1] = "selected";
-
 
701
								break;
-
 
702
							}
-
 
703
							if($val[1] == '1')
-
 
704
							{
-
 
705
								$proto_select[2] = "selected";
-
 
706
								break;
-
 
707
							}
-
 
708
							if($val[2] == '1')
-
 
709
							{
-
 
710
								$proto_select[3] = "selected";
-
 
711
								break;
-
 
712
							}
-
 
713
							$proto_select[0] = "selected";
-
 
714
							break;
-
 
715
						}
-
 
716
						else //none
-
 
717
						{
560
							echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\" selected=\"selected\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
718
							echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td>$grp_filter<td><select name=\"$name1\"><option value=\"00000000\" selected=\"selected\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
-
 
719
							if($val[0] == '1')
-
 
720
							{
-
 
721
								$proto_select[1] = "selected";
-
 
722
								break;
-
 
723
							}
-
 
724
							if($val[1] == '1')
-
 
725
							{
-
 
726
								$proto_select[2] = "selected";
561
								break;
727
								break;
-
 
728
							}
-
 
729
							if($val[2] == '1')
-
 
730
							{
-
 
731
								$proto_select[3] = "selected";
-
 
732
								break;
-
 
733
							}
-
 
734
							$proto_select[0] = "selected";
-
 
735
							break;
562
						}
736
						}
-
 
737
						
-
 
738
						
563
						break;
739
						break;
564
					default :
740
					default :
565
						print <<<EOM
741
						print <<<EOM
566
<td>
742
<td>
567
<select name=$oper_name>
743
<select name=$oper_name>
Line 588... Line 764...
588
			print <<<EOM
764
			print <<<EOM
589
</tr>
765
</tr>
590
EOM;
766
EOM;
591
		}
767
		}
592
	}
768
	}
-
 
769
	
-
 
770
/*protocole filter*/
-
 
771
print <<<EOM
-
 
772
<tr>
-
 
773
<td class="etiquette" colspan=2>
-
 
774
	<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>
-
 
775
</td>
-
 
776
EOM;
-
 
777
if(isset($member_groups) && $user_type != 'group')
-
 
778
{
-
 
779
	echo $grp_proto;
-
 
780
}
-
 
781
		
-
 
782
echo "<td width=20>";
-
 
783
echo"<select name='Filter-Proto'>
-
 
784
	<option value=\"00000000\" $proto_select[0]>$l_proto_0</option>
-
 
785
	<option value=\"10000000\" $proto_select[1]>$l_proto_1</option>
-
 
786
	<option value=\"01000000\" $proto_select[2]>$l_proto_2</option>
-
 
787
	<option value=\"00100000\" $proto_select[3]>$l_proto_3</option>
-
 
788
	</select></td>
-
 
789
	
-
 
790
	
-
 
791
	</tr>";
-
 
792
	
-
 
793
	
593
if ($user_type != 'group'){
794
if ($user_type != 'group'){
594
	echo <<<EOM
795
	echo <<<EOM
595
<tr>
796
<tr>
596
<td align=right colspan=$colspan bgcolor="#d0ddb0">
797
<td align=right colspan=$colspan bgcolor="#d0ddb0">
597
$l_group_member<br><font size=-2><i>($l_main_group)</i></font>
798
$l_group_member<br><font size=-2><i>($l_main_group)</i></font>