From 829f205dc8e151a7f94bf2e235fbfc53467893b8 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Fri, 26 Feb 2016 13:29:50 +0100 Subject: [PATCH] (legacy) refactor services_dyndns.php --- src/www/services_dyndns.php | 318 +++++++++++++++++------------------- 1 file changed, 146 insertions(+), 172 deletions(-) diff --git a/src/www/services_dyndns.php b/src/www/services_dyndns.php index 08a068867..059904a70 100644 --- a/src/www/services_dyndns.php +++ b/src/www/services_dyndns.php @@ -1,30 +1,30 @@ gettext('Add'), 'href'=>'services_dyndns_edit.php'), + array('label'=>gettext('Add'), 'href'=>'services_dyndns_edit.php'), ); - ?> - + + - -
-
-
- - 0) print_input_errors($input_errors); ?> - - -
- -
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- $ifdesc) { - if ($dyndns['interface'] == $if) { - if (!isset($dyndns['enable'])) - echo "{$ifdesc}"; - else - echo "{$ifdesc}"; - break; - } - } - $groupslist = return_gateway_groups_array(); - foreach ($groupslist as $if => $group) { - if ($dyndns['interface'] == $if) { - if (!isset($dyndns['enable'])) - echo "{$if}"; - else - echo "{$if}"; - break; - } - } - ?> - - ' . htmlspecialchars($types[$dyndns['type']]) . ''; - } else { - echo htmlspecialchars($types[$dyndns['type']]); - } - } - ?> - - " . htmlspecialchars($dyndns['host']) . ""; - else - echo htmlspecialchars($dyndns['host']); - ?> - - $cached_ip) - echo ""; - else - echo ""; - echo htmlspecialchars($cached_ip); - echo ""; - } else if (file_exists($filename_v6)) { - $ipv6addr = get_interface_ipv6($dyndns['interface']); - $cached_ipv6_s = explode("|", file_get_contents($filename_v6)); - $cached_ipv6 = $cached_ipv6_s[0]; - if ($ipv6addr <> $cached_ipv6) - echo ""; - else - echo ""; - echo htmlspecialchars($cached_ipv6); - echo ""; - } else { - echo "N/A"; - } - ?> - - ".htmlspecialchars($dyndns['descr']).""; - else - echo htmlspecialchars($dyndns['descr']); - ?> - - -  ')" class="btn btn-default btn-xs"> -

-
-
-
-

-
 
-
-
- -
-
-
-
-
- - +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + $cached_ip) + echo ""; + else + echo ""; + echo htmlspecialchars($cached_ip); + echo ""; + } elseif (file_exists($filename_v6)) { + $ipv6addr = get_interface_ipv6($dyndns['interface']); + $cached_ipv6_s = explode("|", file_get_contents($filename_v6)); + $cached_ipv6 = $cached_ipv6_s[0]; + if ($ipv6addr <> $cached_ipv6) + echo ""; + else + echo ""; + echo htmlspecialchars($cached_ipv6); + echo ""; + } else { + echo "N/A"; + }?> + + + +
+


+
+

+
+
+
+
+
+
+
+