diff --git a/scripts/switchnetwork.php b/scripts/switchnetwork.php index cc79f3e..c04bc4c 100644 --- a/scripts/switchnetwork.php +++ b/scripts/switchnetwork.php @@ -10,7 +10,14 @@ include "../config/config.php"; include("../config/networks.php"); include "../include/tools.php"; include "../include/functions.php"; -include "../include/init.php"; + +//Some basic inits +$mmdvmconfigs = getMMDVMConfig(); +if (!defined("MMDVMLOGPREFIX")) + define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs)); +if (!defined("TIMEZONE")) + define("TIMEZONE", "UTC"); + if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWORKPW !== "") { header('WWW-Authenticate: Basic realm="Dashboard"'); header('HTTP/1.0 401 Unauthorized'); @@ -53,7 +60,6 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWO