diff --git a/includes/dhcp.php b/includes/dhcp.php index a70cdb13..7536cca0 100755 --- a/includes/dhcp.php +++ b/includes/dhcp.php @@ -132,12 +132,16 @@ function DisplayDHCPConfig() } } + exec("ip -o link show | awk -F': ' '{print $2}'", $interfaces); + exec('cat ' . RASPI_DNSMASQ_LEASES, $leases); + echo renderTemplate("dhcp", compact( "status", "serviceStatus", "RangeStart", "RangeEnd", "arrRangeLeaseTime", "mselected", "hselected", "dselected", "infiniteselected", - "dnsmasq_state", "conf", "dhcpHost" + "dnsmasq_state", "conf", "dhcpHost", + "interfaces", "leases" )); } diff --git a/templates/dhcp.php b/templates/dhcp.php index acfcba75..228691e6 100644 --- a/templates/dhcp.php +++ b/templates/dhcp.php @@ -26,19 +26,11 @@
@@ -68,19 +60,17 @@ $select.'>'.htmlspecialchars($inet, ENT_QUOTES).'' , PHP_EOL; - + " name="savedhcpdsettings" /> -'; -} else { - echo''; -} -?> + + " name="stopdhcpd" /> + + " name="startdhcpd" /> +
@@ -103,17 +93,13 @@ if ($dnsmasq_state) { -'.PHP_EOL; -$lease_items = explode(' ', $lease); -foreach ($lease_items as $lease_item) { - echo ' '.htmlspecialchars($lease_item, ENT_QUOTES).''.PHP_EOL; -} -echo ' '.PHP_EOL; -}; -?> + + + + + + +