Example #1
0
    $gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
// module not available for other databases except MySQL
if ($gDbType !== 'mysql') {
    $gMessage->show($gL10n->get('BAC_ONLY_MYSQL'));
}
// check backup path in adm_my_files and create it if necessary
$myFilesBackup = new MyFiles('BACKUP');
if (!$myFilesBackup->checkSettings()) {
    $gMessage->show($gL10n->get($myFilesBackup->errorText, $myFilesBackup->errorPath, '<a href="mailto:' . $gPreferences['email_administrator'] . '">', '</a>'));
}
$headline = $gL10n->get('BAC_DATABASE_BACKUP');
// create html page object
$page = new HtmlPage($headline);
$page->enableModal();
$backupabsolutepath = $myFilesBackup->getFolder() . '/';
// make sure to include trailing slash
if ($getMode === 'show_list') {
    $existingBackupFiles = array();
    // start navigation of this module here
    $gNavigation->addStartUrl(CURRENT_URL, $headline);
    // create a list with all valid files in the backup folder
    if ($handle = opendir($backupabsolutepath)) {
        while (false !== ($file = readdir($handle))) {
            try {
                admStrIsValidFileName($file, true);
                $existingBackupFiles[] = $file;
            } catch (AdmException $e) {
                $temp = 1;
            }
        }