diff --git a/includes/dashboard.php b/includes/dashboard.php new file mode 100755 index 00000000..69ed7912 --- /dev/null +++ b/includes/dashboard.php @@ -0,0 +1,140 @@ +addMessage('Interface is up', 'success'); + $wlan0up = true; + } else { + $status->addMessage('Interface is down', 'warning'); + } + + if( isset($_POST['ifdown_wlan0']) ) { + exec( 'ifconfig wlan0 | grep -i running | wc -l',$test ); + if($test[0] == 1) { + exec( 'sudo ifdown wlan0',$return ); + } else { + echo 'Interface already down'; + } + } elseif( isset($_POST['ifup_wlan0']) ) { + exec( 'ifconfig wlan0 | grep -i running | wc -l',$test ); + if($test[0] == 0) { + exec( 'sudo ifup wlan0',$return ); + } else { + echo 'Interface already up'; + } + } + ?> +
showMessages(); ?>
+