diff --git a/README.md b/README.md
index 4f27261b..68c55dfb 100644
--- a/README.md
+++ b/README.md
@@ -43,12 +43,7 @@ So what I have done is added the `www-data` user to the sudoers file, but with r
Add the following to the end of `/etc/sudoers`:
```sh
-www-data ALL=(ALL) NOPASSWD:/sbin/ifdown wlan0,/sbin/ifup wlan0,/bin/cat
-/etc/wpa_supplicant/wpa_supplicant.conf,/bin/cp /tmp/wifidata
-/etc/wpa_supplicant/wpa_supplicant.conf,/sbin/wpa_cli scan_results,
-/sbin/wpa_cli scan,/bin/cp /tmp/hostapddata /etc/hostapd/hostapd.conf,
-/etc/init.d/hostapd start,/etc/init.d/hostapd stop,/etc/init.d/dnsmasq start,
-/etc/init.d/dnsmasq stop,/bin/cp /tmp/dhcpddata /etc/dnsmasq.conf
+www-data ALL=(ALL) NOPASSWD:/sbin/ifdown wlan0,/sbin/ifup wlan0,/bin/cat /etc/wpa_supplicant/wpa_supplicant.conf,/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant.conf,/sbin/wpa_cli scan_results, /sbin/wpa_cli scan,/bin/cp /tmp/hostapddata /etc/hostapd/hostapd.conf, /etc/init.d/hostapd start,/etc/init.d/hostapd stop,/etc/init.d/dnsmasq start, /etc/init.d/dnsmasq stop,/bin/cp /tmp/dhcpddata /etc/dnsmasq.conf, /sbin/shutdown -h now, /sbin/reboot
```
Once those modifications are done, git clone the files to `/var/www`.
diff --git a/dist/css/custom.css b/dist/css/custom.css
index ea237b1d..72498bce 100644
--- a/dist/css/custom.css
+++ b/dist/css/custom.css
@@ -27,4 +27,9 @@
.btn-primary:hover {
background-color: #c61931;
border-color: #c61931;
-}
\ No newline at end of file
+}
+
+.info-item {
+ width: 160px;
+ float: left;
+}
diff --git a/includes/functions.php b/includes/functions.php
index 9354c554..d2773023 100755
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -161,50 +161,53 @@ function DisplayDashboard(){
-
-
-
-
Interface Information
- Interface Name : wlan0
- IP Address :
- Subnet Mask :
- Mac Address :
+
+
+
+
Interface Information
+
Interface Name
wlan0
+
IP Address
+
Subnet Mask
+
Mac Address
-
Interface Statistics
- Received Packets :
- Received Bytes :
- Transferred Packets :
- Transferred Bytes :
-
-
-
+
Interface Statistics
+
Received Packets
+
Received Bytes
+
Transferred Packets
+
Transferred Bytes
+
+
+
-
-
-
+
+
+
Wireless Information
- Connected To :
- AP Mac Address :
- Bitrate :
- Transmit Power :
- Frequency :
- Link Quality :
-
- Signal Level :
-
-
-
-
-
-
+
Connected To
+
AP Mac Address
+
Bitrate
+
Transmit Power
+
Frequency
+
Link Quality
+
+
Signal Level
+
+
+
+
+
@@ -982,6 +985,103 @@ function DisplayTorProxyConfig(){
1)? 's ':' '); }
+ if ($hours != 0) { $uptime .= $hours . ' hour' . (($hours > 1)? 's ':' '); }
+ if ($minutes != 0) { $uptime .= $minutes . ' minute' . (($minutes > 1)? 's ':' '); }
+
+ // mem used
+ exec("free -m | awk '/Mem:/ { total=$2 } /buffers\/cache/ { used=$3 } END { print used/total*100}'", $memarray);
+ $memused = floor($memarray[0]);
+ if ($memused > 90) { $memused_status = "danger"; }
+ elseif ($memused > 75) { $memused_status = "warning"; }
+ elseif ($memused > 0) { $memused_status = "success"; }
+
+ // cpu load
+ $cores = exec("grep -c ^processor /proc/cpuinfo");
+ $loadavg = exec("awk '{print $1}' /proc/loadavg");
+ $cpuload = floor(($loadavg * 100) / $cores);
+ if ($cpuload > 90) { $cpuload_status = "danger"; }
+ elseif ($cpuload > 75) { $cpuload_status = "warning"; }
+ elseif ($cpuload > 0) { $cpuload_status = "success"; }
+
+ ?>
+
+
+
+
System
+
+
+ System Rebooting Now!
';
+ $result = shell_exec("sudo /sbin/reboot");
+ }
+ if (isset($_POST['system_shutdown'])) {
+ echo '
System Shutting Down Now!
';
+ $result = shell_exec("sudo /sbin/shutdown -h now");
+ }
+ ?>
+
+
+
+
+
+
System Information
+
Hostname
+
Uptime
+
Memory Used
+
+
CPU Load
+
+
+
+
+
+
+
+
+
+
+
+
+
Configure RaspAP
+
+ System
+
@@ -176,6 +179,9 @@ $page = $_GET['page'];
case "save_hostapd_conf":
SaveHostAPDConfig();
break;
+ case "system_info":
+ DisplaySystem();
+ break;
default:
DisplayDashboard();
}