diff --git a/scripts/lib/web_mode.php b/scripts/lib/web_mode.php new file mode 100644 index 0000000..c8dba48 --- /dev/null +++ b/scripts/lib/web_mode.php @@ -0,0 +1,50 @@ +request_handling(); + } + + function request_handling() + { + // Files - Always finde the correct path + $dir_path = __FILE__; + $dir_path = str_replace("web_mode.php", "", $dir_path); + $files = glob($dir_path . "../../*.txt"); + + // TODO: Update to support what services that shoud output + if (isset($_POST["conf"]) && $_POST["conf"] == "unbound") + { + require_once $dir_path . "../plugins/unbound.php"; + $unbound = new unbound("web"); + $unbound->make("web", $files, $_POST["ip"]); + } + else + { + $this->show_gui(); + } + } + + function show_gui() + { + ?> + +
+
+ unbound
+ Other
+ Other2
+ +
+ + \ No newline at end of file