diff options
author | bcyrill <cyrill@bannwart.info> | 2013-02-02 14:10:45 +0100 |
---|---|---|
committer | bcyrill <cyrill@bannwart.info> | 2013-02-02 14:10:45 +0100 |
commit | 51ce2ea779981713fa2943b8e93cb24e0e53fd52 (patch) | |
tree | 9c89ec9ec813d1c6be0e90cd34cba6d7760389fa /usr | |
parent | 5a39eb2b6895431ed36983802e751c81a1d0f063 (diff) | |
download | pfsense-51ce2ea779981713fa2943b8e93cb24e0e53fd52.zip pfsense-51ce2ea779981713fa2943b8e93cb24e0e53fd52.tar.gz |
Gray-out disabled DynDNS entries
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/services_dyndns.php | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php index aa8e762..4b88178 100755 --- a/usr/local/www/services_dyndns.php +++ b/usr/local/www/services_dyndns.php @@ -120,7 +120,10 @@ include("head.inc"); <?php $iflist = get_configured_interface_with_descr(); foreach ($iflist as $if => $ifdesc) { if ($dyndns['interface'] == $if) { - echo "{$ifdesc}"; + if (!isset($dyndns['enable'])) + echo "<span class=\"gray\">{$ifdesc}</span>"; + else + echo "{$ifdesc}"; $iface = $if; break; } @@ -128,7 +131,10 @@ include("head.inc"); $groupslist = return_gateway_groups_array(); foreach ($groupslist as $if => $group) { if ($dyndns['interface'] == $if) { - echo "{$if}"; + if (!isset($dyndns['enable'])) + echo "<span class=\"gray\">{$if}</span>"; + else + echo "{$if}"; $iface = $if; break; } @@ -139,15 +145,23 @@ include("head.inc"); <?php $types = explode(",", "DNS-O-Matic, DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,ODS.org,ZoneEdit,Loopia,freeDNS, DNSexit, OpenDNS, Namecheap, HE.net, HE.net Tunnelbroker, SelfHost, Route 53, Custom"); $vals = explode(" ", "dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip ods zoneedit loopia freedns dnsexit opendns namecheap he-net he-net-tunnelbroker selfhost route53 custom"); - $j = 0; for ($j = 0; $j < count($vals); $j++) - if ($vals[$j] == $dyndns['type']) { - echo htmlspecialchars($types[$j]); + for ($j = 0; $j < count($vals); $j++) + if ($vals[$j] == $dyndns['type']) { + if (!isset($dyndns['enable'])) + echo "<span class=\"gray\">".htmlspecialchars($types[$j])."</span>"; + else + echo htmlspecialchars($types[$j]); break; } ?> </td> <td class="listr"> - <?=htmlspecialchars($dyndns['host']);?> + <?php + if (!isset($dyndns['enable'])) + echo "<span class=\"gray\">".htmlspecialchars($dyndns['host'])."</span>"; + else + echo htmlspecialchars($dyndns['host']); + ?> </td> <td class="listr"> <?php @@ -168,12 +182,16 @@ include("head.inc"); ?> </td> <td class="listbg"> - <?=htmlspecialchars($dyndns['descr']);?> + <?php + if (!isset($dyndns['enable'])) + echo "<span class=\"gray\">".htmlspecialchars($dyndns['descr'])."</span>"; + else + echo htmlspecialchars($dyndns['descr']); + ?> </td> <td valign="middle" nowrap class="list"> <a href="services_dyndns_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a> - - <a href="services_dyndns.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a> + <a href="services_dyndns.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a> </td> </tr> <?php $i++; endforeach; ?> |