Revision c83d04dc
Added by Renato Botelho over 11 years ago
usr/local/www/firewall_nat_out.php | ||
---|---|---|
322 | 322 |
<?php |
323 | 323 |
$i = 0; |
324 | 324 |
foreach ($a_out as $natent): |
325 |
$iconfn = "pass"; |
|
326 |
$textss = $textse = ""; |
|
327 |
if ($mode == "disabled" || $mode == "automatic" || isset($natent['disabled'])) { |
|
328 |
$textss = "<span class=\"gray\">"; |
|
329 |
$textse = "</span>"; |
|
330 |
$iconfn .= "_d"; |
|
331 |
} |
|
325 | 332 |
?> |
326 | 333 |
<tr valign="top" id="fr<?=$i;?>"> |
327 | 334 |
<td class="listt"> |
... | ... | |
329 | 336 |
</td> |
330 | 337 |
<td class="listt" align="center"> |
331 | 338 |
<?php |
332 |
$iconfn = "pass"; |
|
333 |
if ($mode == "disabled" || $mode == "automatic" || isset($natent['disabled'])) { |
|
334 |
$textss = "<span class=\"gray\">"; |
|
335 |
$textse = "</span>"; |
|
336 |
$iconfn .= "_d"; |
|
337 |
} else { |
|
338 |
$textss = $textse = ""; |
|
339 |
} |
|
340 |
|
|
341 |
if ($mode == "disabled" || $mode == "automatic"): |
|
339 |
if ($mode == "disabled" || $mode == "automatic"): |
|
342 | 340 |
?> |
343 |
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="<?=gettext("This rule is being ignored");?>" alt="icon" /> |
|
341 |
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" |
|
342 |
title="<?=gettext("This rule is being ignored");?>" alt="icon" /> |
|
344 | 343 |
<?php |
345 |
else:
|
|
344 |
else: |
|
346 | 345 |
?> |
347 |
<a href="?act=toggle&id=<?=$i;?>"> |
|
348 |
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="<?=gettext("click to toggle enabled/disabled status");?>" alt="icon" /> |
|
349 |
</a> |
|
346 |
<a href="?act=toggle&id=<?=$i;?>"> |
|
347 |
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" |
|
348 |
title="<?=gettext("click to toggle enabled/disabled status");?>" alt="icon" /> |
|
349 |
</a> |
|
350 | 350 |
<?php |
351 | 351 |
endif; |
352 | 352 |
?> |
353 | 353 |
</td> |
354 | 354 |
<td class="listlr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$i;?>';"> |
355 |
<?php echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])); ?>
|
|
355 |
<?php echo $textss . htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])) . $textse; ?>
|
|
356 | 356 |
|
357 | 357 |
</td> |
358 | 358 |
<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$i;?>';"> |
359 |
<?=$natent['source']['network'];?>
|
|
359 |
<?php echo $textss . $natent['source']['network'] . $textse;?>
|
|
360 | 360 |
</td> |
361 | 361 |
<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$i;?>';"> |
362 | 362 |
<?php |
363 |
echo $textss; |
|
363 | 364 |
echo ($natent['protocol']) ? $natent['protocol'] . '/' : "" ; |
364 | 365 |
if (!$natent['sourceport']) |
365 | 366 |
echo "*"; |
366 | 367 |
else |
367 | 368 |
echo $natent['sourceport']; |
369 |
echo $textse; |
|
368 | 370 |
?> |
369 | 371 |
</td> |
370 | 372 |
<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$i;?>';"> |
371 | 373 |
<?php |
374 |
echo $textss; |
|
372 | 375 |
if (isset($natent['destination']['any'])) |
373 | 376 |
echo "*"; |
374 | 377 |
else { |
... | ... | |
376 | 379 |
echo "! "; |
377 | 380 |
echo $natent['destination']['address']; |
378 | 381 |
} |
382 |
echo $textse; |
|
379 | 383 |
?> |
380 | 384 |
</td> |
381 | 385 |
<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$i;?>';"> |
382 | 386 |
<?php |
387 |
echo $textss; |
|
383 | 388 |
echo ($natent['protocol']) ? $natent['protocol'] . '/' : "" ; |
384 | 389 |
if (!$natent['dstport']) |
385 | 390 |
echo "*"; |
386 | 391 |
else |
387 | 392 |
echo $natent['dstport']; |
393 |
echo $textse; |
|
388 | 394 |
?> |
389 | 395 |
</td> |
390 | 396 |
<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$i;?>';"> |
391 | 397 |
<?php |
398 |
echo $textss; |
|
392 | 399 |
if (isset($natent['nonat'])) |
393 | 400 |
echo '<I>NO NAT</I>'; |
394 | 401 |
elseif (!$natent['target']) |
... | ... | |
397 | 404 |
echo $natent['targetip'] . '/' . $natent['targetip_subnet']; |
398 | 405 |
else |
399 | 406 |
echo $natent['target']; |
407 |
echo $textse; |
|
400 | 408 |
?> |
401 | 409 |
</td> |
402 | 410 |
<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$i;?>';"> |
403 | 411 |
<?php |
412 |
echo $textss; |
|
404 | 413 |
if (!$natent['natport']) |
405 | 414 |
echo "*"; |
406 | 415 |
else |
407 | 416 |
echo $natent['natport']; |
417 |
echo $textse; |
|
408 | 418 |
?> |
409 | 419 |
</td> |
410 | 420 |
<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$i;?>';" align="center"> |
411 | 421 |
<?php |
422 |
echo $textss; |
|
412 | 423 |
if(isset($natent['staticnatport'])) |
413 | 424 |
echo gettext("YES"); |
414 | 425 |
else |
415 | 426 |
echo gettext("NO"); |
427 |
echo $textse; |
|
416 | 428 |
?> |
417 | 429 |
</td> |
418 | 430 |
<td class="listbg" onclick="fr_toggle(<?=$i;?>)" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$i;?>';"> |
Also available in: Unified diff
Make it more visible when an item is disabled