<?php namespace lib; use lib\Uptime; use lib\Memory; use lib\CPU; use lib\Storage; use lib\Network; use lib\Rbpi; use lib\Users; use lib\Temp; $uptime = Uptime::uptime(); $ram = Memory::ram(); $swap = Memory::swap(); $cpu = CPU::cpu(); $cpu_heat = CPU::heat(); $hdd = Storage::hdd(); $net_connections = Network::connections(); $net_eth = Network::ethernet(); $users = Users::connected(); $temp = Temp::temp(); function icon_alert($alert) { echo '<i class="icon-'; switch ($alert) { case 'success': echo 'ok'; break; case 'warning': echo 'warning-sign';
function build_memory($response) { $response['memory']['ram'] = Memory::ram(); $response['memory']['swap'] = Memory::swap(); return $response; }