diff --git a/includes/functions.php b/includes/functions.php index c5ba1a47..e177aa52 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -271,15 +271,15 @@ function ConvertToSecurity($security) /** * Renders a simple PHP template */ -function renderTemplate($name, $data = []) +function renderTemplate($name, $__template_data = []) { $file = realpath(dirname(__FILE__) . "/../templates/$name.php"); if (!file_exists($file)) { return "template $name ($file) not found"; } - if (is_array($data)) { - extract($data); + if (is_array($__template_data)) { + extract($__template_data); } ob_start(); diff --git a/templates/dhcp.php b/templates/dhcp.php index a8df0a5d..c93ab7ef 100755 --- a/templates/dhcp.php +++ b/templates/dhcp.php @@ -10,282 +10,52 @@
-
-
-
-
-
- -
-
- -
-
-
-
- showMessages(); ?> -
- - - - -
-
-

DHCP server settings

-
-
- - -
-
-
-
- - -
-
+
+
-
-
- - -
-
- -
-
- - -
-
- - -
-
- -
-
- - -
-
- -
-
- - -
-
- -
- - -
- -
-
-
- -
- -
- aria-describedby="no-resolv-description"> - -
-

- send DNS queries to the servers configured below exclusively. By default RaspAP also uses its upstream DHCP server's name servers.") ?> -
no-resolv to the dnsmasq configuration.") ?> -

+
+
+
+
- -
- -
- -
- -
-
- +
+
+
+
-
- -
- "> -
- -
-
-

- - - ]/[domain/]][[#][@|[#]]"); ?> - -

- -
-
+
+ showMessages(); ?> + + - -
+ + -
-
-
-

- -

-
- aria-describedby="log-dhcp-requests"> - -
-
- aria-describedby="log-dhcp-queries"> - -
-
-
-
+ +
+ + + + + +
+ + + +
+ + -
-

Client list

-
-
-
-
- -
-
- - - - - - - - - - - - - - - - - - - -
-
-
-
-
- - -
-

- -
- - -
-
- " class="form-control"> -
-
- " class="form-control"> -
-
- -
-
- -
- -
-
-
- " class="form-control" autofocus="autofocus"> -
-
- " class="form-control"> -
-
- -
-
-
- - - - - -
-

-
-
- '.htmlspecialchars($log, ENT_QUOTES).''; - ?> -
-
-
- - - -
- -
- -
- -
-
diff --git a/templates/dhcp/advanced.php b/templates/dhcp/advanced.php new file mode 100644 index 00000000..6366977c --- /dev/null +++ b/templates/dhcp/advanced.php @@ -0,0 +1,63 @@ + +
+ +
+
+
+ +
+ +
+ aria-describedby="no-resolv-description"> + +
+

+ send DNS queries to the servers configured below exclusively. By default RaspAP also uses its upstream DHCP server's name servers.") ?> +
no-resolv to the dnsmasq configuration.") ?> +

+
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+ "> +
+ +
+
+

+ + + ]/[domain/]][[#][@|[#]]"); ?> + +

+ +
+
+ + +
+ +
diff --git a/templates/dhcp/clients.php b/templates/dhcp/clients.php new file mode 100644 index 00000000..c0d9d06d --- /dev/null +++ b/templates/dhcp/clients.php @@ -0,0 +1,35 @@ +
+

Client list

+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
diff --git a/templates/dhcp/general.php b/templates/dhcp/general.php new file mode 100644 index 00000000..e4023392 --- /dev/null +++ b/templates/dhcp/general.php @@ -0,0 +1,59 @@ +
+

DHCP server settings

+
+
+ + +
+
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
diff --git a/templates/dhcp/logging.php b/templates/dhcp/logging.php new file mode 100644 index 00000000..60e7166e --- /dev/null +++ b/templates/dhcp/logging.php @@ -0,0 +1,19 @@ + +
+

+

+ +
+ aria-describedby="log-dhcp-requests"> + +
+
+ aria-describedby="log-dhcp-queries"> + +
+ + '.htmlspecialchars($log, ENT_QUOTES).''; + ?> +
diff --git a/templates/dhcp/static_leases.php b/templates/dhcp/static_leases.php new file mode 100644 index 00000000..3b804270 --- /dev/null +++ b/templates/dhcp/static_leases.php @@ -0,0 +1,48 @@ + +
+

+ +
+ + +
+
+ " class="form-control"> +
+
+ " class="form-control"> +
+
+ +
+
+ +
+ +
+
+
+ " class="form-control" autofocus="autofocus"> +
+
+ " class="form-control"> +
+
+ +
+
+ + +