$action = $api[3]; echo $ws->setModuleStatus($module, $action); } // LOGS if (sizeof($api) == 3 and $api[1] == "log" and $api[2] == "dhcp") { echo $ws->getLogDHCP(); } if (sizeof($api) == 3 and $api[1] == "log" and $api[2] == "station") { echo $ws->getLogStation(); } // STATUS if (sizeof($api) == 3 and $api[1] == "status" and $api[2] == "cpu") { echo $ws->getStatusCPU(); } if (sizeof($api) == 3 and $api[1] == "status" and $api[2] == "mem") { echo $ws->getStatusMEM(); } // CONFIG CORE if (sizeof($api) == 3 and $api[1] == "config" and $api[2] == "core") { # example: /config/core echo $ws->getConfigCoreAll(); } if (sizeof($api) == 4 and $api[1] == "config" and $api[2] == "core" and $api[3] != "") { # example: /config/core/hostapd_ssid echo $ws->getConfigCore($api[3]); } if (sizeof($api) == 5 and $api[1] == "config" and $api[2] == "core" and $api[3] != "" and $api[4] != "") { # example: /config/core/io_mode/1 echo $ws->setConfigCore($api[3], $api[4]); } // CONFIG MODULES