Projet

Général

Profil

« Précédent | Suivant » 

Révision 1b0e073e

Ajouté par Renato Botelho il y a plus de 9 ans

Fix indent and whitespaces

Voir les différences:

usr/local/www/interfaces_assign.php
393 393

  
394 394
<form action="interfaces_assign.php" method="post" name="iform" id="iform">
395 395

  
396
<?php if (file_exists("/tmp/reload_interfaces")): ?><p>
397
	<?php print_info_box_np(gettext("The interface configuration has been changed.<br />You must apply the changes in order for them to take effect."));?><br /></p>
398
<?php elseif($savemsg): ?>
399
	<?php print_info_box($savemsg); ?>
400
<?php endif; ?>
401

  
402
<?php pfSense_handle_custom_code("/usr/local/pkg/interfaces_assign/pre_input_errors"); ?>
403
<?php if ($input_errors) print_input_errors($input_errors); ?>
396
<?php
397
if (file_exists("/tmp/reload_interfaces")) {
398
	echo "<p>\n";
399
	print_info_box_np(gettext("The interface configuration has been changed.<br />You must apply the changes in order for them to take effect."));
400
	echo "<br /></p>\n";
401
} elseif($savemsg)
402
	print_info_box($savemsg);
403

  
404
pfSense_handle_custom_code("/usr/local/pkg/interfaces_assign/pre_input_errors");
405
if ($input_errors)
406
	print_input_errors($input_errors);
407
?>
404 408

  
405 409
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="interfaces assign">
406
  <tr><td class="tabnavtbl">
410
	<tr><td class="tabnavtbl">
407 411
<?php
408 412
	$tab_array = array();
409 413
	$tab_array[0] = array(gettext("Interface assignments"), true, "interfaces_assign.php");
......
418 422
	$tab_array[10] = array(gettext("LAGG"), false, "interfaces_lagg.php");
419 423
	display_top_tabs($tab_array);
420 424
?>
421
  </td></tr>
422
  <tr>
423
    <td>
424
	<div id="mainarea">
425
        <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
426
       <tr>
427
	<td class="listhdrr"><?=gettext("Interface"); ?></td>
428
	<td class="listhdr"><?=gettext("Network port"); ?></td>
429
	<td class="list">&nbsp;</td>
430
  </tr>
431
  <?php foreach ($config['interfaces'] as $ifname => $iface):
432
  	if ($iface['descr'])
433
		$ifdescr = $iface['descr'];
434
	else
435
		$ifdescr = strtoupper($ifname);
436
	?>
437
  <tr>
438
	<td class="listlr" valign="middle"><strong><u><span onclick="location.href='/interfaces.php?if=<?=$ifname;?>'" style="cursor: pointer;"><?=$ifdescr;?></span></u></strong></td>
439
	  <td valign="middle" class="listr">
440
		<select onchange="javascript:jQuery('#savediv').show();" name="<?=$ifname;?>" id="<?=$ifname;?>">
441
		  <?php foreach ($portlist as $portname => $portinfo): ?>
442
			<option  value="<?=$portname;?>"  <?php if ($portname == $iface['if']) echo " selected=\"selected\"";?>>
443
				<?php if ($portinfo['isvlan']) {
444
					$descr = sprintf(gettext('VLAN %1$s on %2$s'),$portinfo['tag'],$portinfo['if']);
445
				if ($portinfo['descr'])
446
					$descr .= " (" . $portinfo['descr'] . ")";
447
					echo htmlspecialchars($descr);
448
				} elseif ($portinfo['iswlclone']) {
449
					$descr = $portinfo['cloneif'];
450
					if ($portinfo['descr'])
451
						$descr .= " (" . $portinfo['descr'] . ")";
452
					echo htmlspecialchars($descr);
453
				} elseif ($portinfo['isppp']) {
454
					echo htmlspecialchars($portinfo['descr']);
455
				} elseif ($portinfo['isbridge']) {
456
					$descr = strtoupper($portinfo['bridgeif']);
457
					if ($portinfo['descr'])
458
						$descr .= " (" . $portinfo['descr'] . ")";
459
					echo htmlspecialchars($descr);
460
				} elseif ($portinfo['isgre']) {
461
					$descr = "GRE {$portinfo['remote-addr']}";
462
					if ($portinfo['descr'])
463
						$descr .= " (" . $portinfo['descr'] . ")";
464
					echo htmlspecialchars($descr);
465
				} elseif ($portinfo['isgif']) {
466
					$descr = "GIF {$portinfo['remote-addr']}";
467
					if ($portinfo['descr'])
468
						$descr .= " (" . $portinfo['descr'] . ")";
469
					echo htmlspecialchars($descr);
470
				} elseif ($portinfo['islagg']) {
471
					$descr = strtoupper($portinfo['laggif']);
472
					if ($portinfo['descr'])
473
						$descr .= " (" . $portinfo['descr'] . ")";
474
					echo htmlspecialchars($descr);
475
				} elseif ($portinfo['isqinq']) {
476
					echo htmlspecialchars($portinfo['descr']);
477
				} elseif (substr($portname, 0, 4) == 'ovpn') {
478
					echo htmlspecialchars($portname . " (" . $ovpn_descrs[substr($portname, 5)] . ")");
479
				} else
480
					echo htmlspecialchars($portname . " (" . $portinfo['mac'] . ")");
481
			?></option>
482
		<?php endforeach; ?>
483
	</select>
484
	</td>
485
	<td valign="middle" class="list">
486
		  <?php if ($ifname != 'wan'): ?>
487
		  <a href="interfaces_assign.php?act=del&amp;id=<?=$ifname;?>" onclick="return confirm('<?=gettext("Do you really want to delete this interface?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete interface"); ?>" width="17" height="17" border="0" alt="delete" /></a>
488
		  <?php endif; ?>
489
		</td>
490
  </tr>
491
  <?php endforeach; ?>
492
  <?php if (count($config['interfaces']) < count($portlist)): ?>
493
  <tr>
494
	<td class="list" colspan="2"></td>
495
	<td class="list nowrap">
496
	<a href="interfaces_assign.php?act=add"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add interface"); ?>" width="17" height="17" border="0" alt="add" /></a>
497
	</td>
498
  </tr>
499
  <?php else: ?>
500
  <tr>
501
	<td class="list" colspan="3" height="10"></td>
502
  </tr>
503
  <?php endif; ?>
504
</table>
505
</div>
506
<br />
507
<div id='savediv' <?php if (empty($_GET['act'])) echo "style='display:none;'"; ?>>
508
	<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /><br /><br />
509
</div>
510
<ul>
511
	<li><span class="vexpl"><?=gettext("Interfaces that are configured as members of a lagg(4) interface will not be shown."); ?></span></li>
512
</ul>
513
</td>
514
</tr>
425
	</td></tr>
426
	<tr><td>
427
		<div id="mainarea">
428
			<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
429
				<tr>
430
					<td class="listhdrr"><?=gettext("Interface"); ?></td>
431
					<td class="listhdr"><?=gettext("Network port"); ?></td>
432
					<td class="list">&nbsp;</td>
433
				</tr>
434
<?php
435
			foreach ($config['interfaces'] as $ifname => $iface):
436
				if ($iface['descr'])
437
					$ifdescr = $iface['descr'];
438
				else
439
					$ifdescr = strtoupper($ifname);
440
?>
441
				<tr>
442
					<td class="listlr" valign="middle"><strong><u><span onclick="location.href='/interfaces.php?if=<?=$ifname;?>'" style="cursor: pointer;"><?=$ifdescr;?></span></u></strong></td>
443
					<td valign="middle" class="listr">
444
						<select onchange="javascript:jQuery('#savediv').show();" name="<?=$ifname;?>" id="<?=$ifname;?>">
445
<?php
446
						foreach ($portlist as $portname => $portinfo):
447
?>
448
							<option  value="<?=$portname;?>"  <?php if ($portname == $iface['if']) echo " selected=\"selected\"";?>>
449
<?php
450
							if ($portinfo['isvlan']) {
451
								$descr = sprintf(gettext('VLAN %1$s on %2$s'),$portinfo['tag'],$portinfo['if']);
452
							if ($portinfo['descr'])
453
								$descr .= " (" . $portinfo['descr'] . ")";
454
								echo htmlspecialchars($descr);
455
							} elseif ($portinfo['iswlclone']) {
456
								$descr = $portinfo['cloneif'];
457
								if ($portinfo['descr'])
458
									$descr .= " (" . $portinfo['descr'] . ")";
459
								echo htmlspecialchars($descr);
460
							} elseif ($portinfo['isppp']) {
461
								echo htmlspecialchars($portinfo['descr']);
462
							} elseif ($portinfo['isbridge']) {
463
								$descr = strtoupper($portinfo['bridgeif']);
464
								if ($portinfo['descr'])
465
									$descr .= " (" . $portinfo['descr'] . ")";
466
								echo htmlspecialchars($descr);
467
							} elseif ($portinfo['isgre']) {
468
								$descr = "GRE {$portinfo['remote-addr']}";
469
								if ($portinfo['descr'])
470
									$descr .= " (" . $portinfo['descr'] . ")";
471
								echo htmlspecialchars($descr);
472
							} elseif ($portinfo['isgif']) {
473
								$descr = "GIF {$portinfo['remote-addr']}";
474
								if ($portinfo['descr'])
475
									$descr .= " (" . $portinfo['descr'] . ")";
476
								echo htmlspecialchars($descr);
477
							} elseif ($portinfo['islagg']) {
478
								$descr = strtoupper($portinfo['laggif']);
479
								if ($portinfo['descr'])
480
									$descr .= " (" . $portinfo['descr'] . ")";
481
								echo htmlspecialchars($descr);
482
							} elseif ($portinfo['isqinq']) {
483
								echo htmlspecialchars($portinfo['descr']);
484
							} elseif (substr($portname, 0, 4) == 'ovpn') {
485
								echo htmlspecialchars($portname . " (" . $ovpn_descrs[substr($portname, 5)] . ")");
486
							} else
487
								echo htmlspecialchars($portname . " (" . $portinfo['mac'] . ")");
488
?>
489
							</option>
490
<?php
491
						endforeach;
492
?>
493
						</select>
494
					</td>
495
					<td valign="middle" class="list">
496
<?php
497
					if ($ifname != 'wan'):
498
?>
499
						<a href="interfaces_assign.php?act=del&amp;id=<?=$ifname;?>" onclick="return confirm('<?=gettext("Do you really want to delete this interface?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete interface"); ?>" width="17" height="17" border="0" alt="delete" /></a>
500
<?php
501
					endif;
502
?>
503
					</td>
504
				</tr>
505
<?php
506
			endforeach;
507
			if (count($config['interfaces']) < count($portlist)):
508
?>
509
				<tr>
510
					<td class="list" colspan="2"></td>
511
					<td class="list nowrap">
512
						<a href="interfaces_assign.php?act=add"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add interface"); ?>" width="17" height="17" border="0" alt="add" /></a>
513
					</td>
514
				</tr>
515
<?php
516
			else:
517
?>
518
				<tr>
519
					<td class="list" colspan="3" height="10"></td>
520
				</tr>
521
<?php
522
			endif;
523
?>
524
			</table>
525
		</div>
526
		<br />
527
		<div id='savediv' <?php if (empty($_GET['act'])) echo "style='display:none;'"; ?>>
528
			<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" /><br /><br />
529
		</div>
530
		<ul>
531
			<li><span class="vexpl"><?=gettext("Interfaces that are configured as members of a lagg(4) interface will not be shown."); ?></span></li>
532
		</ul>
533
	</td></tr>
515 534
</table>
516 535
</form>
517 536
<?php include("fend.inc"); ?>

Formats disponibles : Unified diff