page path, e.g., path=Main/Disk // prev= prev path, e.g., prev=Main (used to determine if page was refreshed) extract($_GET); // Need the following to make php-fpm & nginx work if (empty($path)) { $path = substr(explode("?", $_SERVER["REQUEST_URI"])[0], 1); $prev = ''; if (empty($path)) { $path = 'Main'; } } // The current "task" is the first element of the path $task = strtok($path, '/'); // Get the webGui configuration preferences extract(parse_plugin_cfg('dynamix',true)); // Read emhttp status refresh_emhttp_state(); $var = parse_ini_file('state/var.ini'); $sec = parse_ini_file('state/sec.ini',true); $devs = parse_ini_file('state/devs.ini',true); $disks = parse_ini_file('state/disks.ini',true); $users = parse_ini_file('state/users.ini',true); $shares = parse_ini_file('state/shares.ini',true); $sec_nfs = parse_ini_file('state/sec_nfs.ini',true); $sec_afp = parse_ini_file('state/sec_afp.ini',true); // Read network settings extract(parse_ini_file('state/network.ini',true)); // Merge SMART settings require_once "$docroot/webGui/include/CustomMerge.php"; // Build webGui pages first, then plugins pages $site = []; build_pages('webGui/*.page'); foreach (glob('plugins/*', GLOB_ONLYDIR) as $plugin) { if ($plugin != 'plugins/dynamix') build_pages("$plugin/*.page"); } // Here's the page we're rendering $myPage = $site[basename($path)]; $pageroot = $docroot.'/'.dirname($myPage['file']); $update = true; // set for legacy // Giddyup require_once "$docroot/webGui/include/DefaultPageLayout.php"; ?>