diff options
author | Colin Fleming <cj_fleming@sky.com> | 2015-12-17 22:35:25 +0000 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-17 17:44:17 -0500 |
commit | bb9185a0b715e3124f7702d89953887b49e91e11 (patch) | |
tree | f833f07da54eeaa3d7815a8f47c13c3d872c83a6 /src/usr/local/www/widgets | |
parent | 18ca572b3aa38457e44fb8a67348f95835ee9827 (diff) | |
download | pfsense-bb9185a0b715e3124f7702d89953887b49e91e11.zip pfsense-bb9185a0b715e3124f7702d89953887b49e91e11.tar.gz |
Tidy up "services_dyndns.php"
services_dyndns.php
- remove duplicate double quotes
- tidy up tabs/spaces
services_rfc2136.php
- remove duplicate double quotes
- tidy up tabs/spaces
dyn_dns_status.widget.php
- change echo to print
- change FONT tag to SPAN tags and use correct class
- remove DIV and change table to correct format
- add THEAD and TBODY
- remove CLASS statement from table cells and add to the table row
Diffstat (limited to 'src/usr/local/www/widgets')
-rw-r--r-- | src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php | 64 |
1 files changed, 26 insertions, 38 deletions
diff --git a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php index 2eb1c84..bae4be3 100644 --- a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php +++ b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php @@ -83,87 +83,75 @@ if ($_REQUEST['getdyndnsstatus']) { $cached_ip_s = explode(':', file_get_contents($filename)); $cached_ip = $cached_ip_s[0]; if ($ipaddr <> $cached_ip) { - echo "<font color='red'>"; + print('<span class="text-danger">'); } else { - echo "<font color='green'>"; + print('<span class="text-success">'); } - echo htmlspecialchars($cached_ip); - echo "</font>"; + print(htmlspecialchars($cached_ip)); + print('</span>'); } else { - echo "N/A " . date("H:i:s"); + print('N/A ' . date("H:i:s")); } } exit; } ?> -<div class="content"> -<table> + +<table id="dyn_dns_status" class="table table-striped table-hover"> + <thead> <tr> - <td width="5%" class="listhdrr"><?=gettext("Int.");?></td> - <td width="15%" class="listhdrr"><?=gettext("Service");?></td> - <td width="20%" class="listhdrr"><?=gettext("Hostname");?></td> - <td width="20%" class="listhdrr"><?=gettext("Cached IP");?></td> + <th style="width:5%;"><?=gettext("Int.");?></th> + <th style="width:20%;"><?=gettext("Service");?></th> + <th style="width:25%;"><?=gettext("Hostname");?></th> + <th style="width:25%;"><?=gettext("Cached IP");?></th> </tr> + </thead> + <tbody> <?php $dyndnsid = 0; foreach ($a_dyndns as $dyndns): ?> - <tr ondblclick="document.location='services_dyndns_edit.php?id=<?=$dyndnsid;?>'"> - <td class="listlr"> + <tr ondblclick="document.location='services_dyndns_edit.php?id=<?=$dyndnsid;?>'"<?=!isset($dyndns['enable'])?' class="disabled"':''?>> + <td> <?php $iflist = get_configured_interface_with_descr(); foreach ($iflist as $if => $ifdesc) { if ($dyndns['interface'] == $if) { - if (!isset($dyndns['enable'])) { - echo "<span class=\"gray\">{$ifdesc}</span>"; - } else { - echo "{$ifdesc}"; - } + print('$ifdesc'); break; } } $groupslist = return_gateway_groups_array(); foreach ($groupslist as $if => $group) { if ($dyndns['interface'] == $if) { - if (!isset($dyndns['enable'])) { - echo "<span class=\"gray\">{$if}</span>"; - } else { - echo "{$if}"; - } + print($if); break; } } ?> </td> - <td class="listr"> + <td> <?php $types = explode(",", DYNDNS_PROVIDER_DESCRIPTIONS); $vals = explode(" ", DYNDNS_PROVIDER_VALUES); 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]); - } + print(htmlspecialchars($types[$j])); break; } } ?> </td> - <td class="listr"> + <td> <?php - if (!isset($dyndns['enable'])) { - echo "<span class=\"gray\">".htmlspecialchars($dyndns['host'])."</span>"; - } else { - echo htmlspecialchars($dyndns['host']); - } + print(htmlspecialchars($dyndns['host'])); ?> </td> - <td class="listr"> - <div id='dyndnsstatus<?= $dyndnsid;?>'><?= gettext("Checking ...");?></div> + <td> + <div id="dyndnsstatus<?= $dyndnsid;?>"><?= gettext("Checking ...");?></div> </td> </tr> <?php $dyndnsid++; endforeach;?> + </tbody> </table> -</div> + <script type="text/javascript"> //<![CDATA[ function dyndns_getstatus() { |