Project

General

Profile

« Previous | Next » 

Revision 1d89d699

Added by Colin Fleming about 12 years ago

Tidy up "firewall_nat_out.php" XHTML

Close BR, INPUT and IMG tags and ALT to IMG tags
Update HTML Boolean operators
Move NOWRAP to class statement
Move CENTER tag to ALIGN statement in TD tag
Add missing closing SPAN tag
Add missing closing P tag

View differences:

usr/local/www/firewall_nat_out.php
305 305
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
306 306
<?php include("fbegin.inc"); ?>
307 307
<form action="firewall_nat_out.php" method="post" name="iform">
308
<script type="text/javascript" language="javascript" src="/javascript/row_toggle.js">
309
</script>
308
<script type="text/javascript" language="javascript" src="/javascript/row_toggle.js"></script>
310 309
<?php if ($savemsg) print_info_box($savemsg); ?>
311
<?php if (is_subsystem_dirty('natconf')): ?><p>
312
<?php print_info_box_np(gettext("The NAT configuration has been changed.")."<br>".gettext("You must apply the changes in order for them to take effect."));?><br>
310
<?php if (is_subsystem_dirty('natconf')): ?>
311
<?php print_info_box_np(gettext("The NAT configuration has been changed.")."<br/>".gettext("You must apply the changes in order for them to take effect."));?><br/>
313 312
<?php endif; ?>
314
<table width="100%" border="0" cellpadding="0" cellspacing="0">  <tr><td>
313
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="firwall nat outbound">  <tr><td>
315 314
<?php
316 315
	$tab_array = array();
317 316
	$tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
......
324 323
  <tr>
325 324
    <td>
326 325
	<div id="mainarea">
327
              <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
326
              <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
328 327
				<tr><td align="right"><b><?=gettext("Mode:"); ?></b></td>
329 328
                  <td>
330
                      &nbsp;&nbsp;<input name="advancedoripsec" type="radio" id="ipsecpassthru" value="ipsecpassthru" <?php if (isset($config['nat']['ipsecpassthru']['enable'])) echo "checked";?>>
329
                      &nbsp;&nbsp;<input name="advancedoripsec" type="radio" id="ipsecpassthru" value="ipsecpassthru" <?php if (isset($config['nat']['ipsecpassthru']['enable'])) echo "checked=\"checked\"";?> />
331 330
                      <strong><?=gettext("Automatic outbound NAT rule generation"); ?><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=gettext("(IPsec passthrough included)");?></strong>
332 331
                  </td>
333 332

  
334 333
                  <td>
335
                      &nbsp;&nbsp;<input name="advancedoripsec" type="radio" id="advancedoutbound" value="advancedoutboundnat" <?php if (isset($config['nat']['advancedoutbound']['enable'])) echo "checked";?>>
334
                      &nbsp;&nbsp;<input name="advancedoripsec" type="radio" id="advancedoutbound" value="advancedoutboundnat" <?php if (isset($config['nat']['advancedoutbound']['enable'])) echo "checked=\"checked\"";?> />
336 335
                      <strong><?=gettext("Manual Outbound NAT rule generation") . "<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . gettext("(AON - Advanced Outbound NAT)");?></strong></td>
337 336
                  <td valign="middle" align="left">
338
					<input name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>">
337
					<input name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
339 338
					&nbsp;<br/>&nbsp;
340 339
                  </td>
341 340
                </tr>
......
350 349
					</td>
351 350
				</tr>
352 351
              </table>
353
              <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
352
              <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="mappings">
354 353
				<tr><td colspan="5"><b>&nbsp;<?=gettext("Mappings:"); ?></b></td></tr>
355 354
				<tr><td>&nbsp;</td></tr>
356 355
                <tr id="frheader">
......
366 365
		  <td width="10%" class="listhdrr"><?=gettext("Static Port");?></td>
367 366
                  <td width="25%" class="listhdr"><?=gettext("Description");?></td>
368 367
                  <td width="5%" class="list">
369
                    <table border="0" cellspacing="0" cellpadding="1">
368
                    <table border="0" cellspacing="0" cellpadding="1" summary="add">
370 369
                      <tr>
371 370
			<td width="17"></td>
372
                        <td><a href="firewall_nat_out_edit.php?after=-1"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new mapping");?>"></a></td>
371
                        <td><a href="firewall_nat_out_edit.php?after=-1"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new mapping");?>" alt="add" /></a></td>
373 372
                      </tr>
374 373
                    </table>
375 374
		  </td>
376 375
                </tr>
377 376
              <?php $nnats = $i = 0; foreach ($a_out as $natent): ?>
378 377
                <tr valign="top" id="fr<?=$nnats;?>">
379
                  <td class="listt"><input type="checkbox" id="frc<?=$nnats;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nnats;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;"></td>
378
                  <td class="listt"><input type="checkbox" id="frc<?=$nnats;?>" name="rule[]" value="<?=$i;?>" onclick="fr_bgcolor('<?=$nnats;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;" /></td>
380 379
                  <td class="listt" align="center"></td>
381
                  <td class="listlr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
380
                  <td class="listlr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
382 381
                    <?php echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])); ?>
383 382
                                        &nbsp;
384 383
                  </td>
385
                  <td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
384
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
386 385
                    <?=$natent['source']['network'];?>
387 386
                  </td>
388
                  <td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
387
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
389 388
                    <?php
390 389
			echo ($natent['protocol']) ? $natent['protocol'] . '/' : "" ;
391 390
                      if (!$natent['sourceport'])
......
394 393
                          echo $natent['sourceport'];
395 394
                    ?>
396 395
                  </td>
397
                  <td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
396
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
398 397
                    <?php
399 398
                      if (isset($natent['destination']['any']))
400 399
                          echo "*";
......
405 404
                      }
406 405
                    ?>
407 406
                  </td>
408
                  <td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
407
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
409 408
                    <?php
410 409
			echo ($natent['protocol']) ? $natent['protocol'] . '/' : "" ;
411 410
                      if (!$natent['dstport'])
......
414 413
                          echo $natent['dstport'];
415 414
                    ?>
416 415
                  </td>
417
                  <td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
416
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
418 417
                    <?php
419 418
					if (isset($natent['nonat']))
420 419
						echo '<I>NO NAT</I>';
......
426 425
						echo $natent['target'];
427 426
                    ?>
428 427
                  </td>
429
                  <td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
428
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
430 429
                    <?php
431 430
                      if (!$natent['natport'])
432 431
                          echo "*";
......
434 433
                          echo $natent['natport'];
435 434
                    ?>
436 435
                  </td>
437
                  <td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
436
                  <td class="listr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';" align="center">
438 437
                    <?php
439 438
			if(isset($natent['staticnatport']))
440
			    echo "<CENTER>" . gettext("YES") . "</CENTER>";
439
			    echo gettext("YES");
441 440
			else
442
			    echo "<CENTER>" . gettext("NO") . "</CENTER>";
441
			    echo gettext("NO");
443 442
                    ?>		    
444 443
                  </td>
445
                  <td class="listbg"  onClick="fr_toggle(<?=$nnats;?>)" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
444
                  <td class="listbg" onclick="fr_toggle(<?=$nnats;?>)" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
446 445
                    <?=htmlspecialchars($natent['descr']);?>&nbsp;
447 446
                  </td>
448
                  <td class="list" valign="middle" nowrap>
449
                    <table border="0" cellspacing="0" cellpadding="1">
447
                  <td class="list nowrap" valign="middle">
448
                    <table border="0" cellspacing="0" cellpadding="1" summary="move">
450 449
                      <tr>
451
                        <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" height="17" type="image" width="17" border="0"></td>
452
                        <td><a href="firewall_nat_out_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit mapping");?>"></a></td>
450
                        <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" type="image" style="height:17;width:17;border:0" /></td>
451
                        <td><a href="firewall_nat_out_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit mapping");?>" alt="edit" /></a></td>
453 452
                      </tr>
454 453
                      <tr>
455
			<td align="center" valign="middle"><a href="firewall_nat_out.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this rule?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule");?>"></a></td>
456
                        <td><a href="firewall_nat_out_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new nat based on this one");?>" width="17" height="17" border="0"></a></td>
454
			<td align="center" valign="middle"><a href="firewall_nat_out.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this rule?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule");?>" alt="delete" /></a></td>
455
                        <td><a href="firewall_nat_out_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new nat based on this one");?>" width="17" height="17" border="0" alt="duplicate" /></a></td>
457 456
                      </tr>
458 457
                    </table>
459 458
              <?php $i++; $nnats++; endforeach; ?>
460 459
                <tr>
461 460
                  <td class="list" colspan="11"></td>
462
                  <td class="list" valign="middle" nowrap>
463
                    <table border="0" cellspacing="0" cellpadding="1">
461
                  <td class="list nowrap" valign="middle">
462
                    <table border="0" cellspacing="0" cellpadding="1" summary="edit">
464 463
                      <tr>
465
                        <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected mappings to end");?>" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected mappings to end");?>" border="0"><?php endif; ?></td>
466
                        <td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new mapping");?>"></a></td>
464
                        <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected mappings to end");?>" border="0" alt="move" /><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" style="width:17;height:17;border:0" title="<?=gettext("move selected mappings to end");?>" /><?php endif; ?></td>
465
                        <td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new mapping");?>" alt="add" /></a></td>
467 466
                      </tr>
468 467
                      <tr>
469
                        <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0"><?php else: ?><input name="del" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected mappings");?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected mappings?");?>')"><?php endif; ?></td>
468
                        <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0" alt="delete" /><?php else: ?><input name="del" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" style="width:17;height:17" title="<?=gettext("delete selected mappings");?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected mappings?");?>')" /><?php endif; ?></td>
470 469
                      </tr>
471 470
                    </table></td>
472 471
                </tr>
473 472
                <tr>
474 473
                  <td colspan="12">
475
			<p><span class="vexpl"><span class="red"><strong><?=gettext("Note:"); ?><br>
474
			<p><span class="vexpl"><span class="red"><strong><?=gettext("Note:"); ?><br/>
476 475
			</strong></span>
477 476
			<?=gettext("With automatic outbound NAT enabled, a mapping is automatically created " .
478 477
			"for each interface's subnet (except WAN-type connections) and the rules " .
......
486 485
			<?= gettext(" may also be required.") ?>
487 486
			<br/><br/>
488 487
			<?= gettext("To completely disable outbound NAT, switch to Manual Outbound NAT then delete any " .
489
			"NAT rules that appear in the list.") ?>
488
			"NAT rules that appear in the list.") ?></span></p>
490 489
                    </td>
491 490
                </tr>
492 491

  

Also available in: Unified diff