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 | |
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')
-rw-r--r-- | src/usr/local/www/services_dyndns.php | 6 | ||||
-rw-r--r-- | src/usr/local/www/services_rfc2136.php | 6 | ||||
-rw-r--r-- | src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php | 64 |
3 files changed, 32 insertions, 44 deletions
diff --git a/src/usr/local/www/services_dyndns.php b/src/usr/local/www/services_dyndns.php index 0b42b8e..234f5f9 100644 --- a/src/usr/local/www/services_dyndns.php +++ b/src/usr/local/www/services_dyndns.php @@ -122,7 +122,7 @@ display_top_tabs($tab_array); $i = 0; foreach ($a_dyndns as $dyndns): ?> - <tr<?=!isset($dyndns['enable'])?' class="disabled""':''?>> + <tr<?=!isset($dyndns['enable'])?' class="disabled"':''?>> <td> <?php $iflist = get_configured_interface_with_descr(); @@ -203,13 +203,13 @@ foreach ($a_dyndns as $dyndns): ?> </td> <td> - <a class="fa fa-pencil" title="<?=gettext('Edit service')?>" href="services_dyndns_edit.php?id=<?=$i?>"></a> + <a class="fa fa-pencil" title="<?=gettext('Edit service')?>" href="services_dyndns_edit.php?id=<?=$i?>"></a> <?php if (isset($dyndns['enable'])) { ?> <a class="fa fa-ban" title="<?=gettext('Disable service')?>" href="?act=toggle&id=<?=$i?>"></a> <?php } else { ?> - <a class="fa fa-check-square-o" title="<?=gettext('Enable service')?>" href="?act=toggle&id=<?=$i?>" ></a> + <a class="fa fa-check-square-o" title="<?=gettext('Enable service')?>" href="?act=toggle&id=<?=$i?>"></a> <?php } ?> <a class="fa fa-trash" title="<?=gettext('Delete service')?>" href="services_dyndns.php?act=del&id=<?=$i?>"></a> diff --git a/src/usr/local/www/services_rfc2136.php b/src/usr/local/www/services_rfc2136.php index 0649abd..3a01332 100644 --- a/src/usr/local/www/services_rfc2136.php +++ b/src/usr/local/www/services_rfc2136.php @@ -124,7 +124,7 @@ $iflist = get_configured_interface_with_descr(); $i = 0; foreach ($a_rfc2136 as $rfc2136): ?> - <tr <?=(isset($rfc2136['enable']) ? '' : 'class="disabled"')?>"> + <tr<?=(isset($rfc2136['enable']) ? '' : ' class="disabled"')?>> <td> <?php foreach ($iflist as $if => $ifdesc) { @@ -194,13 +194,13 @@ foreach ($a_rfc2136 as $rfc2136): <?=htmlspecialchars($rfc2136['descr'])?> </td> <td> - <a class="fa fa-pencil" title="<?=gettext('Edit client')?>" href="services_rfc2136_edit.php?id=<?=$i?>"></a> + <a class="fa fa-pencil" title="<?=gettext('Edit client')?>" href="services_rfc2136_edit.php?id=<?=$i?>"></a> <?php if (isset($rfc2136['enable'])) { ?> <a class="fa fa-ban" title="<?=gettext('Disable client')?>" href="?act=toggle&id=<?=$i?>"></a> <?php } else { ?> - <a class="fa fa-check-square-o" title="<?=gettext('Enable client')?>" href="?act=toggle&id=<?=$i?>" ></a> + <a class="fa fa-check-square-o" title="<?=gettext('Enable client')?>" href="?act=toggle&id=<?=$i?>"></a> <?php } ?> <a class="fa fa-trash" title="<?=gettext('Delete client')?>" href="services_rfc2136.php?act=del&id=<?=$i?>"></a> 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() { |