Example #1
0
                for ($i = 0; $i < count($this->HideFiles); $i++) {
                    $this->FullyQualifiedHideFiles[] = $this->CurrentBrowsingDirectory . "/" . $this->HideFiles[$i];
                }
            }
        }
        return $this->ErrorManager->Iif();
    }
}
// Define required variables for the application
$ErrorManager = new ErrorManager();
$Config = new Configuration();
$Config->ErrorManager =& $ErrorManager;
// ------------------------------------
// 1. RETRIEVE CONFIGURATION PROPERTIES
// ------------------------------------
$Config->RetrieveConfigurationPropertiesFromXml($Config->CurrentWorkingDirectory);
// Check for subfolder ids if directory browsing is allowed and some folder ids were supplied
if ($Config->BrowseSubFolders && count($Config->aFolderID) > 0) {
    for ($i = 0; $i < count($Config->aFolderID); $i++) {
        $CurrentFolderKey = ForceInt($Config->aFolderID[$i], 0);
        $Config->CurrentBrowsingDirectory = CheckForFolder($Config->CurrentBrowsingDirectory, $CurrentFolderKey, $Config);
        if (!$Config->CurrentBrowsingDirectory) {
            // IF the current browsing directory wasn't found, wipe out all directory settings and start from the root
            $Config->CurrentBrowsingDirectory = $Config->CurrentWorkingDirectory;
            $Config->FolderIDs = "";
            $Config->aFolderID = array();
            break;
        }
    }
}
// If the folder exists, and there is a _config.xml file in the folder, reconfigure the filebrowser