Project

General

Profile

« Previous | Next » 

Revision c0948c6c

Added by Renato Botelho almost 15 years ago

Just fix some space and tab problems

View differences:

usr/local/www/diag_backup.php
642 642
							</tr>
643 643
						</table>
644 644
						<p><input name="Submit" type="submit" class="formbtn" id="restore" value="<?=gettext("Restore configuration"); ?>"></p>
645
                      	<p><strong><span class="red"><?=gettext("Note:"); ?></span></strong><br /><?=gettext("The firewall will reboot after restoring the configuration."); ?><br /></p>
645
						<p><strong><span class="red"><?=gettext("Note:"); ?></span></strong><br /><?=gettext("The firewall will reboot after restoring the configuration."); ?><br /></p>
646 646
					</td>
647 647
				</tr>
648 648
				<?php if($config['installedpackages']['package'] != "") { ?>
usr/local/www/diag_nanobsd.php
161 161
					<tr>
162 162
						<td width="22%" valign="top" class="vncell"><?=gettext("Duplicate bootup slice");?></td>
163 163
						<td width="78%" class="vtable">
164
							<form action="diag_nanobsd.php" method="post" name="iform">						
164
							<form action="diag_nanobsd.php" method="post" name="iform">
165 165
								<?=gettext("Destination slice:");?>
166 166
								<select name='destslice'>
167 167
									<option value='<?php echo $COMPLETE_PATH; ?>'>
usr/local/www/diag_system_pftop.php
96 96
		print_input_errors($input_errors);
97 97
?>
98 98
	<form method="post">
99
	<?=gettext("Sort type:"); ?> 
99
	<?=gettext("Sort type:"); ?>
100 100
	<select name='sorttype' id='sorttype' onChange='this.form.submit();'>
101 101
		<option value='<?=$sorttype?>'><?=$sorttype?></option>
102 102
		<option value='age'><?=gettext("age");?></option>
usr/local/www/diag_traceroute.php
133 133
				<tr>
134 134
				  <td width="22%" valign="top">&nbsp;</td>
135 135
				  <td width="78%"> 
136
					<span class="vexpl"><b><?=gettext("Note:");?></b></span><?=gettext("Multi-wan is not supported from this utility currently.");?> 
136
					<span class="vexpl"><b><?=gettext("Note:");?></b></span><?=gettext("Multi-wan is not supported from this utility currently.");?>
137 137
				 </td>
138 138
				</tr>					
139 139
			</table>
usr/local/www/firewall_schedule.php
114 114
					 if ($schedstatus) { ?>
115 115
					 	&nbsp;<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_frmfld_time.png" title="<?=gettext("Schedule is currently active");?>" width="17" height="17" border="0">
116 116
					 <?php } ?>
117
    
117

  
118 118
  		</td>
119 119
  		<td class="listlr" ondblclick="document.location='firewall_schedule_edit.php?id=<?=$i;?>';">
120 120
  			<table width="98%" border="0" cellpadding="0" cellspacing="0">
121
			<?php 
122
			
121
			<?php
122

  
123 123
				foreach($schedule['timerange'] as $timerange) {
124 124
						$tempFriendlyTime = "";
125 125
						$tempID = "";
126 126
						$firstprint = false;
127 127
						if ($timerange){
128 128
							$dayFriendly = "";
129
							$tempFriendlyTime = "";							
130
								
129
							$tempFriendlyTime = "";
130

  
131 131
							//get hours
132 132
							$temptimerange = $timerange['hour'];
133 133
							$temptimeseparator = strrpos($temptimerange, "-");
134
							
135
							$starttime = substr ($temptimerange, 0, $temptimeseparator); 
136
							$stoptime = substr ($temptimerange, $temptimeseparator+1); 
137
								
134

  
135
							$starttime = substr ($temptimerange, 0, $temptimeseparator);
136
							$stoptime = substr ($temptimerange, $temptimeseparator+1);
137

  
138 138
							if ($timerange['month']){
139 139
								$tempmontharray = explode(",", $timerange['month']);
140 140
								$tempdayarray = explode(",",$timerange['day']);
......
144 144
								foreach ($tempmontharray as $monthtmp){
145 145
									$month = $tempmontharray[$arraycounter];
146 146
									$day = $tempdayarray[$arraycounter];
147
									
147

  
148 148
									if (!$firstDayFound)
149 149
									{
150 150
										$firstDay = $day;
151 151
										$firstmonth = $month;
152 152
										$firstDayFound = true;
153 153
									}
154
										
154

  
155 155
									$currentDay = $day;
156 156
									$nextDay = $tempdayarray[$arraycounter+1];
157 157
									$currentDay++;
......
163 163
											$dayFriendly .= $monthArray[$firstmonth-1] . " " . $firstDay . " - " . $currentDay ;
164 164
										else
165 165
											$dayFriendly .=  $monthArray[$month-1] . " " . $day;
166
										$firstDayFound = false;	
166
										$firstDayFound = false;
167 167
										$firstPrint = true;
168
									}													
169
									$arraycounter++;	
168
									}
169
									$arraycounter++;
170 170
								}
171 171
							}
172 172
							else
173 173
							{
174 174
								$tempdayFriendly = $timerange['position'];
175 175
								$firstDayFound = false;
176
								$tempFriendlyDayArray = explode(",", $tempdayFriendly);								
176
								$tempFriendlyDayArray = explode(",", $tempdayFriendly);
177 177
								$currentDay = "";
178 178
								$firstDay = "";
179 179
								$nextDay = "";
180
								$counter = 0;													
180
								$counter = 0;
181 181
								foreach ($tempFriendlyDayArray as $day){
182 182
									if ($day != ""){
183 183
										if (!$firstDayFound)
......
188 188
										$currentDay =$tempFriendlyDayArray[$counter];
189 189
										//get next day
190 190
										$nextDay = $tempFriendlyDayArray[$counter+1];
191
										$currentDay++;					
191
										$currentDay++;
192 192
										if ($currentDay != $nextDay){
193 193
											if ($firstprint)
194 194
												$dayFriendly .= "<br/>";
......
197 197
												$dayFriendly .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1];
198 198
											else
199 199
												$dayFriendly .= $dayArray[$firstDay-1];
200
											$firstDayFound = false;	
201
											$firstprint = true;			
200
											$firstDayFound = false;
201
											$firstprint = true;
202 202
										}
203 203
										$counter++;
204 204
									}
205 205
								}
206
							}		
206
							}
207 207
							$timeFriendly = $starttime . "-" . $stoptime;
208
							$description = $timerange['rangedescr'];	
209
							
208
							$description = $timerange['rangedescr'];
209

  
210 210
							?><tr><td><?=$dayFriendly;?></td><td><?=$timeFriendly;?></td><td><?=$description;?></td><tr/><?php
211 211
						}
212 212
					}//end for?></table>
usr/local/www/firewall_virtual_ip_edit.php
465 465
				      <p>
466 466
				      	<span class="vexpl">
467 467
				      		<span class="red">
468
				      			<b><?=gettext("Note:");?><br></b>
468
							<b><?=gettext("Note:");?><br></b>
469 469
				      		</span>&nbsp;&nbsp;
470 470
				      		<?=gettext("ProxyARP type IP addresses *DO NOT* work with add on packages such as Squid.  Use a CARP or IP Alias type address for these cases.");?>
471 471
				      		<p>&nbsp;&nbsp;&nbsp;<?=gettext("For more information on CARP and the above values, visit the OpenBSD ");?><a href='http://www.openbsd.org/faq/pf/carp.html'> <?=gettext("CARP FAQ"); ?></A>.
usr/local/www/interfaces.php
93 93
	if ($a_ppps[$pppid]['type'] == "ppp"){
94 94
		$pconfig['username'] = $a_ppps[$pppid]['username'];
95 95
		$pconfig['password'] = base64_decode($a_ppps[$pppid]['password']);
96
		
96

  
97 97
		$pconfig['phone'] = $a_ppps[$pppid]['phone'];
98 98
		$pconfig['apn'] = $a_ppps[$pppid]['apn'];
99 99
	}
100
	
100

  
101 101
	if ($a_ppps[$pppid]['type'] == "pppoe"){
102 102
		$pconfig['pppoe_username'] = $a_ppps[$pppid]['username'];
103 103
		$pconfig['pppoe_password'] = base64_decode($a_ppps[$pppid]['password']);
......
108 108
		/* ================================================ */
109 109
		/* = force a connection reset at a specific time? = */
110 110
		/* ================================================ */
111
		
111

  
112 112
		if (isset($a_ppps[$pppid]['pppoe-reset-type'])) {
113 113
			$pconfig['pppoe-reset-type'] = $a_ppps[$pppid]['pppoe-reset-type'];
114 114
			$itemhash = getMPDCRONSettings($a_ppps[$pppid]['if']);
......
127 127
				/*  just initialize $pconfig['pppoe_resetdate'] if the
128 128
				 *  coresponding item contains appropriate numeric values.
129 129
				 */
130
				if ($resetTime_a[2] <> "*" && $resetTime_a[3] <> "*") 
130
				if ($resetTime_a[2] <> "*" && $resetTime_a[3] <> "*")
131 131
					$pconfig['pppoe_resetdate'] = "{$resetTime_a[3]}/{$resetTime_a[2]}/" . date("Y");
132 132
			} else if ($a_ppps[$pppid]['pppoe-reset-type'] == "preset") {
133 133
				$pconfig['pppoe_pr_preset'] = true;
......
147 147
				}
148 148
			}
149 149
		}// End force pppoe reset at specific time
150
	}// End if type == pppoe		
150
	}// End if type == pppoe
151 151
	if ($a_ppps[$pppid]['type'] == "pptp"){
152 152
		$pconfig['pptp_username'] = $a_ppps[$pppid]['username'];
153 153
		$pconfig['pptp_password'] = base64_decode($a_ppps[$pppid]['password']);
......
298 298
	unset($input_errors);
299 299
	if (!is_subsystem_dirty('interfaces'))
300 300
		$intput_errors[] = gettext("You have already applied your settings!");
301
	else {	
301
	else {
302 302
		unlink_if_exists("{$g['tmp_path']}/config.cache");
303 303
		clear_subsystem_dirty('interfaces');
304 304
		if ($pconfig['enable'])
305 305
			interface_configure($if, true);
306 306
		else
307 307
			interface_bring_down($if);
308
		
309
		/* restart snmp so that it binds to correct address */		
310
		services_snmpd_configure();		
311
		if ($if == "lan") 		
308

  
309
		/* restart snmp so that it binds to correct address */
310
		services_snmpd_configure();
311
		if ($if == "lan")
312 312
			$savemsg = gettext("The changes have been applied.  You may need to correct your web browser's IP address.");
313 313

  
314 314
		/* sync filter configuration */
315 315
		setup_gateways_monitor();
316 316

  
317 317
		clear_subsystem_dirty('staticroutes');
318
		
318

  
319 319
		filter_configure();
320
		
320

  
321 321
		enable_rrd_graphing();
322 322
	}
323 323
	header("Location: interfaces.php?if={$if}");
......
348 348
	 * message.
349 349
	 */
350 350
	if (empty($_POST['pppoe-reset-type'])) {
351
		unset($_POST['pppoe_pr_type']);                
351
		unset($_POST['pppoe_pr_type']);
352 352
		unset($_POST['pppoe_resethour']);
353 353
		unset($_POST['pppoe_resetminute']);
354 354
		unset($_POST['pppoe_resetdate']);
......
400 400

  
401 401
	/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
402 402
	$_POST['spoofmac'] = strtolower(str_replace("-", ":", $_POST['spoofmac']));
403
	if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr']))) 
403
	if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr'])))
404 404
		$input_errors[] = gettext("A valid IP address must be specified.");
405
	if (($_POST['subnet'] && !is_numeric($_POST['subnet']))) 
405
	if (($_POST['subnet'] && !is_numeric($_POST['subnet'])))
406 406
		$input_errors[] = gettext("A valid subnet bit count must be specified.");
407
	if (($_POST['alias-address'] && !is_ipaddr($_POST['alias-address']))) 
407
	if (($_POST['alias-address'] && !is_ipaddr($_POST['alias-address'])))
408 408
		$input_errors[] = gettext("A valid alias IP address must be specified.");
409
	if (($_POST['alias-subnet'] && !is_numeric($_POST['alias-subnet']))) 
409
	if (($_POST['alias-subnet'] && !is_numeric($_POST['alias-subnet'])))
410 410
		$input_errors[] = gettext("A valid alias subnet bit count must be specified.");
411 411
	if ($_POST['gateway'] != "none") {
412 412
		$match = false;
......
419 419
			$input_errors[] = gettext("A valid gateway must be specified.");
420 420
		}
421 421
	}
422
	if (($_POST['provider'] && !is_domain($_POST['provider']))) 
422
	if (($_POST['provider'] && !is_domain($_POST['provider'])))
423 423
		$input_errors[] = gettext("The service name contains invalid characters.");
424
	if (($_POST['pppoe_idletimeout'] != "") && !is_numericint($_POST['pppoe_idletimeout'])) 
424
	if (($_POST['pppoe_idletimeout'] != "") && !is_numericint($_POST['pppoe_idletimeout']))
425 425
		$input_errors[] = gettext("The idle timeout value must be an integer.");
426
	if ($_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) && 
427
		$_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23) 
426
	if ($_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) &&
427
		$_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23)
428 428
			$input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23).");
429
	if ($_POST['pppoe_resetminute'] <> "" && !is_numericint($_POST['pppoe_resetminute']) && 
430
		$_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <=59) 
429
	if ($_POST['pppoe_resetminute'] <> "" && !is_numericint($_POST['pppoe_resetminute']) &&
430
		$_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <=59)
431 431
			$input_errors[] = gettext("A valid PPPoE reset minute must be specified (0-59).");
432
	if ($_POST['pppoe_resetdate'] <> "" && !is_numeric(str_replace("/", "", $_POST['pppoe_resetdate']))) 
432
	if ($_POST['pppoe_resetdate'] <> "" && !is_numeric(str_replace("/", "", $_POST['pppoe_resetdate'])))
433 433
		$input_errors[] = gettext("A valid PPPoE reset date must be specified (mm/dd/yyyy).");
434
	if (($_POST['pptp_local'] && !is_ipaddr($_POST['pptp_local']))) 
434
	if (($_POST['pptp_local'] && !is_ipaddr($_POST['pptp_local'])))
435 435
		$input_errors[] = gettext("A valid PPTP local IP address must be specified.");
436
	if (($_POST['pptp_subnet'] && !is_numeric($_POST['pptp_subnet']))) 
436
	if (($_POST['pptp_subnet'] && !is_numeric($_POST['pptp_subnet'])))
437 437
		$input_errors[] = gettext("A valid PPTP subnet bit count must be specified.");
438
	if (($_POST['pptp_remote'] && !is_ipaddr($_POST['pptp_remote']))) 
438
	if (($_POST['pptp_remote'] && !is_ipaddr($_POST['pptp_remote'])))
439 439
		$input_errors[] = gettext("A valid PPTP remote IP address must be specified.");
440
	if (($_POST['pptp_idletimeout'] != "") && !is_numericint($_POST['pptp_idletimeout'])) 
440
	if (($_POST['pptp_idletimeout'] != "") && !is_numericint($_POST['pptp_idletimeout']))
441 441
		$input_errors[] = gettext("The idle timeout value must be an integer.");
442
	if (($_POST['spoofmac'] && !is_macaddr($_POST['spoofmac']))) 
442
	if (($_POST['spoofmac'] && !is_macaddr($_POST['spoofmac'])))
443 443
		$input_errors[] = gettext("A valid MAC address must be specified.");
444
	if ($_POST['mtu'] && ($_POST['mtu'] < 576)) 
444
	if ($_POST['mtu'] && ($_POST['mtu'] < 576))
445 445
		$input_errors[] = gettext("The MTU must be greater than 576 bytes.");
446
	if ($_POST['mss'] && ($_POST['mss'] < 576)) 
446
	if ($_POST['mss'] && ($_POST['mss'] < 576))
447 447
		$input_errors[] = gettext("The MSS must be greater than 576 bytes.");
448 448
	/* Wireless interface? */
449 449
	if (isset($wancfg['wireless'])) {
......
519 519
		unset($a_ppps[$pppid]['gateway']);
520 520
		unset($a_ppps[$pppid]['pppoe-reset-type']);
521 521
		unset($a_ppps[$pppid]['provider']);
522
		
522

  
523 523
		$wancfg['descr'] = remove_bad_chars($_POST['descr']);
524 524
		$wancfg['enable'] =  $_POST['enable']  == "yes" ? true : false;
525 525

  
......
544 544
				unset($gateway_item);
545 545
			}
546 546
		}
547
			
547

  
548 548
		switch($_POST['type']) {
549 549
			case "static":
550 550
				$wancfg['ipaddr'] = $_POST['ipaddr'];
......
615 615
				if($gateway_item) {
616 616
					$a_gateways[] = $gateway_item;
617 617
				}
618
				
618

  
619 619
				break;
620 620
			case "pptp":
621 621
				$a_ppps[$pppid]['ptpid'] = $_POST['ptpid'];
......
645 645
				break;
646 646
		}
647 647
		handle_pppoe_reset($_POST);
648
		
648

  
649 649
		if($_POST['blockpriv'] == "yes") {
650 650
			$wancfg['blockpriv'] = true;
651 651
		} else {
......
670 670
		if (isset($wancfg['wireless'])) {
671 671
			handle_wireless_post();
672 672
		}
673
		
673

  
674 674
		write_config();
675 675
		mark_subsystem_dirty('interfaces');
676 676
		/* regenerate cron settings/crontab file */
......
679 679
		header("Location: interfaces.php?if={$if}");
680 680
		exit;
681 681
	}
682
	
683
	
684
	
685
} // end if($_POST) 
682

  
683

  
684

  
685
} // end if($_POST)
686 686

  
687 687
function handle_wireless_post() {
688 688
	global $_POST, $config, $g, $wancfg, $if, $wl_countries_attr, $wlanbaseif;
......
748 748
		unset($wancfg['wireless']['wpa']['mac_acl_enable']);
749 749
	if ($_POST['rsn_preauth'] == "yes")
750 750
		$wancfg['wireless']['wpa']['rsn_preauth'] = true;
751
	else 
751
	else
752 752
		unset($wancfg['wireless']['wpa']['rsn_preauth']);
753 753
	if ($_POST['ieee8021x'] == "yes")
754 754
		$wancfg['wireless']['wpa']['ieee8021x']['enable'] = true;
......
850 850

  
851 851
$closehead = false;
852 852
include("head.inc");
853
$types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP") /* , "carpdev-dhcp" => "CarpDev"*/); 
853
$types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP") /* , "carpdev-dhcp" => "CarpDev"*/);
854 854

  
855 855
?>
856 856

  
......
899 899
	}
900 900

  
901 901
	function show_reset_settings(reset_type) {
902
		if (reset_type == 'preset') { 
902
		if (reset_type == 'preset') {
903 903
			Effect.Appear('pppoepresetwrap', { duration: 0.0 });
904
			Effect.Fade('pppoecustomwrap', { duration: 0.0 }); 
905
		} 
906
		else if (reset_type == 'custom') { 
904
			Effect.Fade('pppoecustomwrap', { duration: 0.0 });
905
		}
906
		else if (reset_type == 'custom') {
907 907
			Effect.Appear('pppoecustomwrap', { duration: 0.0 });
908 908
			Effect.Fade('pppoepresetwrap', { duration: 0.0 });
909 909
		} else {
......
919 919

  
920 920
	function openwindow(url) {
921 921
		var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
922
		if (oWin==null || typeof(oWin)=="undefined") 
922
		if (oWin==null || typeof(oWin)=="undefined")
923 923
			return false;
924
		else 
924
		else
925 925
			return true;
926 926
	}
927 927
	function country_list() {
......
943 943
		});
944 944
		$('trcountry').setStyle({display : "table-row"});
945 945
	}
946
	
946

  
947 947
	function providers_list() {
948 948
		$('provider').childElements().each(function(node) { node.remove(); });
949 949
		$('providerplan').childElements().each(function(node) { node.remove(); });
......
963 963
		$('trprovider').setStyle({display : "table-row"});
964 964
		$('trproviderplan').setStyle({display : "none"});
965 965
	}
966
	
966

  
967 967
	function providerplan_list() {
968 968
		$('providerplan').childElements().each(function(node) { node.remove(); });
969 969
		$('providerplan').insert( new Element('option') );
......
975 975
				responseTextArr.each( function(value) {
976 976
					if(value != "") {
977 977
						providerplan = value.split(":");
978
	
978

  
979 979
						var option = new Element('option');
980 980
						option.text = providerplan[0] + " - " + providerplan[1];
981 981
						option.value = providerplan[1];
......
986 986
		});
987 987
		$('trproviderplan').setStyle({display : "table-row"});
988 988
	}
989
	
989

  
990 990
	function prefill_provider() {
991 991
		new Ajax.Request("getserviceproviders.php",{
992 992
			parameters: {country : $F('country'), provider : $F('provider'), plan : $F('providerplan')},
......
1045 1045
						</tr>
1046 1046
						<tr>
1047 1047
							<td valign="middle" class="vncell"><strong><?=gettext("Type"); ?></strong></td>
1048
							<td class="vtable"> 
1048
							<td class="vtable">
1049 1049
								<select name="type" onChange="updateType(this.value);" class="formselect" id="type">
1050
								<?php 
1051
									foreach ($types as $key => $opt) { 
1050
								<?php
1051
									foreach ($types as $key => $opt) {
1052 1052
										echo "<option onClick=\"updateType('{$key}');\"";
1053
										if ($key == $pconfig['type']) 
1053
										if ($key == $pconfig['type'])
1054 1054
											echo " selected";
1055 1055
										echo " value=\"{$key}\" >" . htmlspecialchars($opt);
1056 1056
										echo "</option>";
1057
									} 
1057
									}
1058 1058
								?>
1059 1059
								</select>
1060 1060
							</td>
......
1081 1081
						</tr>
1082 1082
						<tr>
1083 1083
							<td valign="top" class="vncell"><?=gettext("MTU"); ?></td>
1084
							<td class="vtable"> 
1084
							<td class="vtable">
1085 1085
								<input name="mtu" type="text" class="formfld unknown" id="mtu" size="8" value="<?=htmlspecialchars($pconfig['mtu']);?>">
1086 1086
								<br>
1087 1087
								<?=gettext("If you leave this field blank, " .
......
1090 1090
						</tr>
1091 1091
						<tr>
1092 1092
							<td valign="top" class="vncell"><?=gettext("MSS"); ?></td>
1093
							<td class="vtable"> 
1093
							<td class="vtable">
1094 1094
								<input name="mss" type="text" class="formfld unknown" id="mss" size="8" value="<?=htmlspecialchars($pconfig['mss']);?>">
1095 1095
								<br>
1096 1096
								<?=gettext("If you enter a value in this field, then MSS clamping for " .
1097
								"TCP connections to the value entered above minus 40 (TCP/IP " . 
1098
								"header size) will be in effect."); ?> 
1097
								"TCP connections to the value entered above minus 40 (TCP/IP " .
1098
								"header size) will be in effect."); ?>
1099 1099
							</td>
1100 1100
						</tr>
1101 1101
						<tr>
1102 1102
							<td colspan="2" valign="top" height="16"></td>
1103
						</tr>			
1103
						</tr>
1104 1104
						<tr style="display:none;" name="none" id="none">
1105 1105
						</tr>
1106 1106
						<tr style="display:none;" name="static" id="static">
......
1111 1111
									</tr>
1112 1112
									<tr>
1113 1113
										<td width="22%" valign="top" class="vncellreq"><?=gettext("IP address"); ?></td>
1114
										<td width="78%" class="vtable"> 
1114
										<td width="78%" class="vtable">
1115 1115
											<input name="ipaddr" type="text" class="formfld unknown" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>">
1116 1116
											/
1117 1117
											<select name="subnet" class="formselect" id="subnet">
......
1153 1153
											<div id='notebox'>
1154 1154
											</div>
1155 1155
											<div id="status">
1156
											</div>								
1156
											</div>
1157 1157
											<div style="display:none" id="addgateway" name="addgateway">
1158
												<p> 
1158
												<p>
1159 1159
												<table border="1" style="background:#990000; border-style: none none none none; width:225px;">
1160 1160
													<tr>
1161 1161
														<td>
......
1171 1171
																?>
1172 1172
																<tr>
1173 1173
																	<td width="45%" align="right"><font color="white"><?=gettext("Default  gateway:"); ?></td><td><input type="checkbox" id="defaultgw" name="defaultgw"<?=$checked?>></td>
1174
																</tr>												
1174
																</tr>
1175 1175
																<tr>
1176 1176
																	<td align="right"><font color="white"><?=gettext("Gateway Name:"); ?></td><td><input id="name" name="name" value="<?=$wancfg['descr'] . "GW"?>"></td>
1177 1177
																</tr>
......
1188 1188
																		<center>
1189 1189
																			<div id='savebuttondiv'>
1190 1190
																				<input type="hidden" name="addrtype" id="addrtype" value="IPv4" />
1191
																				<input id="gwsave" type="Button" value="<?=gettext("Save Gateway"); ?>" onClick='hide_add_gatewaysave();'> 
1191
																				<input id="gwsave" type="Button" value="<?=gettext("Save Gateway"); ?>" onClick='hide_add_gatewaysave();'>
1192 1192
																				<input id="gwcancel" type="Button" value="<?=gettext("Cancel"); ?>" onClick='hide_add_gateway();'>
1193 1193
																			</div>
1194 1194
																		</center>
......
1224 1224
									</tr>
1225 1225
									<tr>
1226 1226
										<td width="22%" valign="top" class="vncell"><?=gettext("Alias IP address"); ?></td>
1227
										<td width="78%" class="vtable"> 
1227
										<td width="78%" class="vtable">
1228 1228
											<input name="alias-address" type="text" class="formfld unknown" id="alias-address" size="20" value="<?=htmlspecialchars($pconfig['alias-address']);?>">
1229 1229
											<select name="alias-subnet" class="formselect" id="alias-subnet">
1230 1230
												<?php
......
1336 1336
											<a href="/interfaces_ppps_edit.php" class="navlnk"><?=gettext("Click here"); ?> </a>
1337 1337
											<?=gettext("to create a PPP configuration."); ?>
1338 1338
											</td>
1339
										<?php endif; ?>	
1339
										<?php endif; ?>
1340 1340
									</tr>
1341 1341
								</table>
1342 1342
							</td>
......
1397 1397
														<?php else: ?>
1398 1398
															<p style="margin: 2px; padding: 4px; width: 94%; display: none;" id="pppoecustomwrap">
1399 1399
														<?php endif; ?>
1400
														<input type="text" name="pppoe_resethour" class="fd_incremental_inp_range_0_23 fd_increment_1 fd_classname_dec_buttonDec fd_classname_inc_buttonInc" maxlength="2" id="pppoe_resethour" value="<?= $pconfig['pppoe_resethour']; ?>" size="3" /> 
1400
														<input type="text" name="pppoe_resethour" class="fd_incremental_inp_range_0_23 fd_increment_1 fd_classname_dec_buttonDec fd_classname_inc_buttonInc" maxlength="2" id="pppoe_resethour" value="<?= $pconfig['pppoe_resethour']; ?>" size="3" />
1401 1401
														<?=gettext("hour (0-23)"); ?><br />
1402
														<input type="text" name="pppoe_resetminute" class="fd_incremental_inp_range_0_59 fd_increment_1 fd_classname_dec_buttonDec fd_classname_inc_buttonInc" maxlength="2" id="pppoe_resetminute" value="<?= $pconfig['pppoe_resetminute']; ?>" size="3" /> 
1402
														<input type="text" name="pppoe_resetminute" class="fd_incremental_inp_range_0_59 fd_increment_1 fd_classname_dec_buttonDec fd_classname_inc_buttonInc" maxlength="2" id="pppoe_resetminute" value="<?= $pconfig['pppoe_resetminute']; ?>" size="3" />
1403 1403
														<?=gettext("minute (0-59)"); ?><br />
1404
														<input name="pppoe_resetdate" type="text" class="w8em format-m-d-y highlight-days-67" id="pppoe_resetdate" maxlength="10" size="10" value="<?=htmlspecialchars($pconfig['pppoe_resetdate']);?>" /> 
1404
														<input name="pppoe_resetdate" type="text" class="w8em format-m-d-y highlight-days-67" id="pppoe_resetdate" maxlength="10" size="10" value="<?=htmlspecialchars($pconfig['pppoe_resetdate']);?>" />
1405 1405
														<?=gettext("reset at a specific date (mm/dd/yyyy)"); ?>
1406 1406
														<br />&nbsp;<br />
1407 1407
														<span class="red"><strong><?=gettext("Note:"); ?> </strong></span>
......
1412 1412
														<?php else: ?>
1413 1413
															<p style="margin: 2px; padding: 4px; width: 94%; display: none;" id="pppoepresetwrap">
1414 1414
														<?php endif; ?>
1415
														<input name="pppoe_pr_preset_val" type="radio" id="pppoe_monthly" value="monthly" <?php if ($pconfig['pppoe_monthly']) echo "checked=\"checked\""; ?> /> 
1415
														<input name="pppoe_pr_preset_val" type="radio" id="pppoe_monthly" value="monthly" <?php if ($pconfig['pppoe_monthly']) echo "checked=\"checked\""; ?> />
1416 1416
														<?=gettext("reset at each month ('0 0 1 * *')"); ?>
1417 1417
														<br />
1418
														<input name="pppoe_pr_preset_val" type="radio" id="pppoe_weekly" value="weekly" <?php if ($pconfig['pppoe_weekly']) echo "checked=\"checked\""; ?> /> 
1418
														<input name="pppoe_pr_preset_val" type="radio" id="pppoe_weekly" value="weekly" <?php if ($pconfig['pppoe_weekly']) echo "checked=\"checked\""; ?> />
1419 1419
														<?=gettext("reset at each week ('0 0 * * 0')"); ?>
1420 1420
														<br />
1421
														<input name="pppoe_pr_preset_val" type="radio" id="pppoe_daily" value="daily" <?php if ($pconfig['pppoe_daily']) echo "checked=\"checked\""; ?> /> 
1421
														<input name="pppoe_pr_preset_val" type="radio" id="pppoe_daily" value="daily" <?php if ($pconfig['pppoe_daily']) echo "checked=\"checked\""; ?> />
1422 1422
														<?=gettext("reset at each day ('0 0 * * *')"); ?>
1423 1423
														<br />
1424
														<input name="pppoe_pr_preset_val" type="radio" id="pppoe_hourly" value="hourly" <?php if ($pconfig['pppoe_hourly']) echo "checked=\"checked\""; ?> /> 
1424
														<input name="pppoe_pr_preset_val" type="radio" id="pppoe_hourly" value="hourly" <?php if ($pconfig['pppoe_hourly']) echo "checked=\"checked\""; ?> />
1425 1425
														<?=gettext("reset at each hour ('0 * * * *')"); ?>
1426 1426
														</p>
1427 1427
													</td>
......
1429 1429
											</table>
1430 1430
										</td>
1431 1431
									</tr>
1432
									
1432

  
1433 1433
									<tr>
1434 1434
										<td width="22%" valign="top" class="vncell"><?=gettext("Advanced and MLPPP"); ?></td>
1435 1435
										<?php if (isset($pconfig['pppid'])): ?>
1436 1436
											<td width="78%" class="vtable">
1437
											<a href="/interfaces_ppps_edit.php?id=<?=htmlspecialchars($pconfig['pppid']);?>" class="navlnk"><?=gettext("Click here"); ?> </a> 
1437
											<a href="/interfaces_ppps_edit.php?id=<?=htmlspecialchars($pconfig['pppid']);?>" class="navlnk"><?=gettext("Click here"); ?> </a>
1438 1438
											<?=gettext("for additional PPPoE configuration options. Save first if you made changes."); ?>
1439 1439
											</td>
1440 1440
										<?php else: ?>
......
1442 1442
											<a href="/interfaces_ppps_edit.php" class="navlnk"><?=gettext("Click here"); ?> </a>
1443 1443
											<?=gettext("for advanced PPPoE configuration options and MLPPP configuration."); ?>
1444 1444
											</td>
1445
										<?php endif; ?>	
1445
										<?php endif; ?>
1446 1446
									</tr>
1447 1447
								</table>
1448 1448
							</td>
......
1467 1467
									</tr>
1468 1468
									<tr>
1469 1469
										<td width="22%" width="100" valign="top" class="vncellreq"><?=gettext("Local IP address"); ?></td>
1470
										<td width="78%" class="vtable"> 
1470
										<td width="78%" class="vtable">
1471 1471
											<input name="pptp_local" type="text" class="formfld unknown" id="pptp_local" size="20"  value="<?=htmlspecialchars($pconfig['pptp_local'][0]);?>">
1472 1472
											/
1473 1473
											<select name="pptp_subnet" class="formselect" id="pptp_subnet">
......
1502 1502
										<td width="22%" valign="top" class="vncell"><?=gettext("Advanced"); ?></td>
1503 1503
										<?php if (isset($pconfig['pppid'])): ?>
1504 1504
											<td width="78%" class="vtable">
1505
											<a href="/interfaces_ppps_edit.php?id=<?=htmlspecialchars($pconfig['pppid']);?>" class="navlnk"><?=gettext("Click here");?></a> 
1505
											<a href="/interfaces_ppps_edit.php?id=<?=htmlspecialchars($pconfig['pppid']);?>" class="navlnk"><?=gettext("Click here");?></a>
1506 1506
											<?=gettext("for additional PPTP and L2TP configuration options. Save first if you made changes.");?>
1507 1507
											</td>
1508 1508
										<?php else: ?>
......
1510 1510
											<a href="/interfaces_ppps_edit.php" class="navlnk"><?=gettext("Click here");?></a>
1511 1511
											<?=gettext("for advanced PPTP and L2TP configuration options");?>.
1512 1512
											</td>
1513
										<?php endif; ?>	
1513
										<?php endif; ?>
1514 1514
									</tr>
1515 1515
								</table>
1516 1516
							</td>
......
1521 1521
						?>
1522 1522
						<tr>
1523 1523
							<td colspan="2" valign="top" height="16"></td>
1524
						</tr>										
1524
						</tr>
1525 1525
						<tr>
1526 1526
							<td colspan="2" valign="top" class="listtopic"><?=gettext("Common wireless configuration - Settings apply to all wireless networks on"); ?> <?=$wlanbaseif;?>.</td>
1527 1527
						</tr>
......
1718 1718
						</tr>
1719 1719
						<tr>
1720 1720
							<td colspan="2" valign="top" height="16"></td>
1721
						</tr>										
1721
						</tr>
1722 1722
						<tr>
1723 1723
							<td colspan="2" valign="top" class="listtopic"><?=gettext("Network-specific wireless configuration");?></td>
1724 1724
						</tr>
......
1791 1791
						</tr>
1792 1792
						<tr>
1793 1793
							<td valign="top" class="vncell"><?=gettext("WEP"); ?></td>
1794
							<td class="vtable"> 
1794
							<td class="vtable">
1795 1795
								<input name="wep_enable" type="checkbox" id="wep_enable" value="yes" <?php if ($pconfig['wep_enable']) echo "checked"; ?>>
1796 1796
								<strong><?=gettext("Enable WEP"); ?></strong>
1797 1797
								<table border="0" cellspacing="0" cellpadding="0">
......
1875 1875
						</tr>
1876 1876
						<tr>
1877 1877
							<td valign="top" class="vncell"><?=gettext("WPA Key Management Mode"); ?></td>
1878
							<td class="vtable"> 
1878
							<td class="vtable">
1879 1879
								<select name="wpa_key_mgmt" class="formselect" id="wpa_key_mgmt">
1880 1880
									<option <?php if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK') echo "selected";?> value="WPA-PSK"><?=gettext("Pre Shared Key"); ?></option>
1881 1881
									<option <?php if ($pconfig['wpa_key_mgmt'] == 'WPA-EAP') echo "selected";?> value="WPA-EAP"><?=gettext("Extensible Authentication Protocol"); ?></option>
......
1971 1971
						<tr>
1972 1972
							<td valign="middle" class="vncell">&nbsp;</td>
1973 1973
							<td class="vtable">
1974
								<a name="rfc1918"></a> 
1974
								<a name="rfc1918"></a>
1975 1975
								<input name="blockpriv" type="checkbox" id="blockpriv" value="yes" <?php if ($pconfig['blockpriv']) echo "checked"; ?>>
1976 1976
								<strong><?=gettext("Block private networks"); ?></strong><br>
1977 1977
								<?=gettext("When set, this option blocks traffic from IP addresses that are reserved " .
1978 1978
								"for private  networks as per RFC 1918 (10/8, 172.16/12, 192.168/16) as"); ?>
1979 1979
								<?=gettext("well as loopback addresses (127/8)."); ?>&nbsp;&nbsp; <?=gettext("You should generally " .
1980 1980
								"leave this option turned on, unless your WAN network lies in such " .
1981
								"a private address space, too."); ?> 
1981
								"a private address space, too."); ?>
1982 1982
							</td>
1983 1983
						</tr>
1984 1984
						<tr>
1985 1985
							<td valign="middle" class="vncell">&nbsp;</td>
1986
							<td class="vtable"> 
1986
							<td class="vtable">
1987 1987
								<input name="blockbogons" type="checkbox" id="blockbogons" value="yes" <?php if ($pconfig['blockbogons']) echo "checked"; ?>>
1988 1988
								<strong><?=gettext("Block bogon networks"); ?></strong><br>
1989 1989
								<?=gettext("When set, this option blocks traffic from IP addresses that are reserved " .
......
1998 1998
							</td>
1999 1999
							<td>
2000 2000
								<br/>
2001
								<input id="save" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> 
2001
								<input id="save" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
2002 2002
								<input id="cancel" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
2003 2003
								<input name="if" type="hidden" id="if" value="<?=$if;?>">
2004 2004
								<?php if ($wancfg['if'] == $a_ppps[$pppid]['if']) : ?>
......
2033 2033
		}
2034 2034
		function hide_add_gateway() {
2035 2035
			document.getElementById("addgateway").style.display = 'none';
2036
			document.getElementById("addgwbox").style.display = '';	
2036
			document.getElementById("addgwbox").style.display = '';
2037 2037
			document.getElementById("gateway").style.display = '';
2038 2038
			document.getElementById("save").style.display = '';
2039 2039
			document.getElementById("cancel").style.display = '';
......
2058 2058
					parameters: pars,
2059 2059
					onFailure: report_failure,
2060 2060
					onComplete: save_callback
2061
				});	
2061
				});
2062 2062
		}
2063 2063
		function addOption(selectbox,text,value)
2064 2064
		{
......
2068 2068
			selectbox.options.add(optn);
2069 2069
			selectbox.selectedIndex = (selectbox.options.length-1);
2070 2070
			$('notebox').innerHTML="<p/><strong><?=gettext("NOTE:"); ?></strong> <?=gettext("You can manage Gateways"); ?> <a target='_new' href='system_gateways.php'><?=gettext("here"); ?></a>.";
2071
		}				
2071
		}
2072 2072
		function report_failure() {
2073 2073
			alert("Sorry, we could not create your gateway at this time.");
2074 2074
			hide_add_gateway();
usr/local/www/load_balancer_virtual_server_edit.php
77 77
    	$reqdfieldsn = array(gettext("IP Address"),gettext("Name"),gettext("Port"),gettext("Relay Protocol"));
78 78
      break;
79 79
    }
80
  }    
80
  }
81 81

  
82 82
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
83 83

  
......
192 192
		  			<td width="22%" valign="top" class="vncellreq"><?=gettext("IP Address"); ?></td>
193 193
                  <td width="78%" class="vtable" colspan="2">
194 194
                    <input name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"{$pconfig['ipaddr']}\"";?> size="16" maxlength="16">
195
		    		<br><?=gettext("This is normally the WAN IP address that you would like the server to listen on.  All connections to this IP and port will be forwarded to the pool cluster."); ?>
195
					<br><?=gettext("This is normally the WAN IP address that you would like the server to listen on.  All connections to this IP and port will be forwarded to the pool cluster."); ?>
196 196
                  </td>
197 197
			</tr>
198 198
                <tr align="left">
199 199
		  			<td width="22%" valign="top" class="vncellreq"><?=gettext("Port"); ?></td>
200 200
                  <td width="78%" class="vtable" colspan="2">
201 201
                    <input name="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"{$pconfig['port']}\"";?> size="16" maxlength="16">
202
		    		<br><?=gettext("This is the port that the clients will connect to.  All connections to this port will be forwarded to the pool cluster."); ?>
202
					<br><?=gettext("This is the port that the clients will connect to.  All connections to this port will be forwarded to the pool cluster."); ?>
203 203
                  </td>
204 204
			</tr>
205 205
                <tr align="left">
206 206
		  			<td width="22%" valign="top" class="vncellreq"><?=gettext("Virtual Server Pool"); ?></td>
207 207
					<td width="78%" class="vtable" colspan="2">
208 208
			<?php if(count($config['load_balancer']['lbpool']) == 0): ?>
209
				<b><?=gettext("NOTE:"); ?></b> <?=gettext("Please add a pool on the Pools tab to use this feature."); ?>    
209
				<b><?=gettext("NOTE:"); ?></b> <?=gettext("Please add a pool on the Pools tab to use this feature."); ?>
210 210
			<?php else: ?>
211 211
				<select id="pool" name="pool">
212 212
			<?php
......
225 225
		  			<td width="22%" valign="top" class="vncellreq"><?=gettext("Fall Back Pool"); ?></td>
226 226
					<td width="78%" class="vtable" colspan="2">
227 227
					<?php if(count($config['load_balancer']['lbpool']) == 0): ?>
228
						<b><?=gettext("NOTE:"); ?></b> <?=gettext("Please add a pool on the Pools tab to use this feature."); ?>    
228
						<b><?=gettext("NOTE:"); ?></b> <?=gettext("Please add a pool on the Pools tab to use this feature."); ?>
229 229
					<?php else: ?>
230 230
						<select id="sitedown" name="sitedown">
231 231
							<option value=""<?=$pconfig['sitedown'] == '' ? ' selected' : ''?>><?=gettext("none"); ?></option>
......
238 238
            				}
239 239
            			?>
240 240
            			</select>
241
                  		<br><b><?=gettext("NOTE:"); ?></b> <?=gettext("This is the server that clients will be redirected to if *ALL* servers in the pool are offline."); ?>
241
				<br><b><?=gettext("NOTE:"); ?></b> <?=gettext("This is the server that clients will be redirected to if *ALL* servers in the pool are offline."); ?>
242 242
				  <?php endif; ?>
243 243
                  </td>
244 244
				</tr>
......
249 249
                  <td width="78%" class="vtable" colspan="2">
250 250
                    <input id="redirect_mode" type="radio" name="mode" value="redirect"<?=$pconfig['mode'] == 'redirect' ? ' checked="checked"': ''?>> Redirect
251 251
                    <input id="relay_mode" type="radio" name="mode" value="relay"<?=$pconfig['mode'] == 'relay' ? ' checked="checked"': ''?>> Relay
252
                             
252

  
253 253
                  <br>
254 254
                  </td>
255 255
				</tr>
......
272 272
				</tr>
273 273
                <tr align="left">
274 274
                  <td align="left" valign="bottom">
275
					<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>"> 
275
					<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>">
276 276
					<input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
277 277
			<?php if (isset($id) && $a_vs[$id] && $_GET['act'] != 'dup'): ?>
278 278
				<input name="id" type="hidden" value="<?=$id;?>">
usr/local/www/services_captiveportal.php
628 628
      <td valign="top" class="vncell"><?=gettext("HTTPS server name"); ?> </td>
629 629
      <td class="vtable">
630 630
        <input name="httpsname" type="text" class="formfld unknown" id="httpsname" size="30" value="<?=htmlspecialchars($pconfig['httpsname']);?>"><br>
631
    	<?=printf(gettext("This name will be used in the form action for the HTTPS POST and should match the Common Name (CN) in your certificate (otherwise, the client browser will most likely display a security warning). Make sure captive portal clients can resolve this name in DNS and verify on the client that the IP resolves to the correct interface IP on %s."), $g['product_name']);?> </td>
631
	<?=printf(gettext("This name will be used in the form action for the HTTPS POST and should match the Common Name (CN) in your certificate (otherwise, the client browser will most likely display a security warning). Make sure captive portal clients can resolve this name in DNS and verify on the client that the IP resolves to the correct interface IP on %s."), $g['product_name']);?> </td>
632 632
	  </tr>
633 633
	<tr>
634 634
      <td valign="top" class="vncell"><?=gettext("HTTPS certificate"); ?></td>

Also available in: Unified diff