From 990162e36c70849dc3715caf2d256369b07e307a Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Sat, 30 Aug 2014 13:38:07 -0300 Subject: Remove some redundancy and simplify changes made on last commit --- usr/local/www/status_interfaces.php | 78 ++++++++++++------------------------- 1 file changed, 25 insertions(+), 53 deletions(-) diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php index c05be7a..1942011 100755 --- a/usr/local/www/status_interfaces.php +++ b/usr/local/www/status_interfaces.php @@ -46,13 +46,12 @@ require_once("guiconfig.inc"); require_once("shaper.inc"); require_once("filter.inc"); -if ($_POST['if']) { +if ($_POST['if'] && $_POST['submit']) { $interface = $_POST['if']; - if ($_POST['action'] == "disconnect" || $_POST['action'] == "release") { + if ($_POST['status'] == "up") interface_bring_down($interface); - } else if ($_POST['action'] == "connect" || $_POST['action'] == "renew") { + else interface_configure($interface); - } header("Location: status_interfaces.php"); exit; } @@ -97,16 +96,11 @@ include("head.inc");
+ +    - - - - " /> - - - - " /> - + +
@@ -118,16 +112,11 @@ include("head.inc");
+ +    - - - - " /> - - - - " /> - + +
@@ -136,16 +125,11 @@ include("head.inc");
+ +    - - - - " /> - - - - " /> - + +
@@ -154,16 +138,11 @@ include("head.inc");
+ +    - - - - " /> - - - - " /> - + +
@@ -172,16 +151,11 @@ include("head.inc");
+ +    - - - - " /> - - - - " /> - + +
@@ -190,15 +164,13 @@ include("head.inc");
+ + - - " /> - - " /> -- cgit v1.1