示例#1
0
        $aus[] = "<br>&nbsp;&nbsp;&nbsp;<input class=\"Formbutton\" type=\"button\" value=\"" . $lang['back_to_minisql'] . "\" onclick=\"self.location.href='" . $relativ_path . "sql.php'\"></a>";
        $aus[] = "&nbsp;&nbsp;&nbsp;<input class=\"Formbutton\" type=\"button\" value=\"" . $lang['back_to_overview'] . "\" onclick=\"self.location.href='" . $relativ_path . "main.php?action=db&dbid=" . $databases['db_selected_index'] . "#dbid'\"></a>";
        $RestoreFertig = 1;
    } else {
        if ($restore['fileEOF']) {
            //Multipart-Restore
            $nextfile = NextPart($restore['filename']);
            if (!file_exists($config['paths']['backup'] . $nextfile)) {
                $done = number_format($restore['eintraege_ready'], 0, ",", ".");
                $to_do = number_format($restore['anzahl_eintraege'], 0, ",", ".");
                $aus[] = '<h3>' . $lang['restore'] . '</h3>';
                $aus[] = sprintf($lang['restore_db'], $databases['db_actual'], $config['dbhost']);
                $aus[] = '<p class="error">' . $lang['multi_part'] . ': ' . $lang['file_missing'] . ' \'' . $nextfile . '\' !</p>';
                $aus[] = sprintf($lang['restore_run1'], $done, $to_do);
                $aus[] = sprintf($lang['restore_run2'], $restore['actual_table']);
                $aus[] = '<p class="small">' . zeit_format(time() - $restore['xtime']) . ', ' . $restore['aufruf'] . ' pages';
                //, speed '.$anzahl_zeilen;
                $aus[] = $fmp > 0 ? ', ' . $lang['file'] . ' ' . $restore['part'] : '';
                $aus[] = $restore['errors'] > 0 ? ', <span class="error">' . $restore['errors'] . ' errors</span>' : '';
                $aus[] = '</p>' . (isset($restore['EOB']) ? "EOB" : "");
                WriteLog('<span class="error">Restore unsuccessful: Cannot find Multipartfile \'' . $nextfile . '\'</span>');
                $RestoreFertig = 1;
            } else {
                $restore['filename'] = urlencode($nextfile);
                $restore['offset'] = 0;
                $restore['part']++;
            }
        }
    }
} else {
    $aus[] = $fpath . $restore['filename'] . ' :  ' . $lang['file_open_error'];
示例#2
0
        $RestoreFertig = 1;
    } else {
        if ($restore['fileEOF']) {
            //Multipart-Restore
            $restore['fileEOF'] = false;
            $nextfile = NextPart($restore['filename'], 0, true);
            if (!file_exists($config['paths']['backup'] . $nextfile)) {
                $done = number_format($restore['eintraege_ready'], 0, ",", ".");
                $to_do = number_format($restore['anzahl_eintraege'], 0, ",", ".");
                $aus = array();
                $aus[] = '<h3>' . $lang['L_RESTORE'] . '</h3>';
                $aus[] = sprintf($lang['L_RESTORE_DB'], $databases['db_actual'], $config['dbhost']);
                $aus[] = '<p class="error">' . $lang['L_MULTI_PART'] . ': ' . $lang['L_FILE_MISSING'] . ' \'' . $nextfile . '\' !</p>';
                $aus[] = sprintf($lang['L_RESTORE_RUN1'], $done, $to_do);
                $aus[] = sprintf($lang['L_RESTORE_RUN2'], $restore['actual_table']);
                $aus[] = '<p class="small">' . zeit_format(time() - $restore['xtime']) . ', ' . $restore['aufruf'] . ' ' . $lang['L_PAGE_REFRESHS'];
                $aus[] = $restore['part'] > 0 ? ', ' . $lang['L_FILE'] . ' ' . $restore['part'] : '';
                $aus[] = $restore['errors'] > 0 ? ', <span class="error">' . $restore['errors'] . ' errors</span>' : '';
                $aus[] = '</p>';
                WriteLog('Restore unsuccessful: Cannot find Multipartfile \'' . $nextfile . '\'');
                $RestoreFertig = 1;
            } else {
                $restore['filename'] = $nextfile;
                $restore['offset'] = 0;
                $restore['part']++;
                WriteLog("Continue Multipart-Restore with File '" . $restore['filename'] . "'");
            }
        }
    }
} else {
    $aus[] = $config['paths']['backup'] . $restore['filename'] . ' :  ' . $lang['L_FILE_OPEN_ERROR'];
示例#3
0
文件: dump.php 项目: thaian2009/php
                DoFTP($i);
            }
        }
        $aus[] = '<strong>' . $lang['L_DONE'] . '</strong><br>';
        if ($config['multi_dump'] == 1) {
            $aus[] = sprintf($lang['L_MULTIDUMP'], count($databases['multi'])) . ': ';
            $aus[] = '<strong>' . implode(', ', $databases['multi']) . '</strong>';
            $aus2 = '';
            $out = '';
        } else {
            $aus[] = '<br>' . sprintf($lang['L_DUMP_ENDERGEBNIS'], $num_tables, number_format($dump['countdata'], 0, ',', '.'));
        }
        if ($dump['errors'] > 0) {
            $aus[] = sprintf($lang['L_DUMP_ERRORS'], $dump['errors']);
        }
        $aus[] = '<form action="dump.php?MySQLDumper=' . session_id() . '" method="POST">' . $out . '<br>' . '<p class="small">' . zeit_format($xtime) . ', ' . $dump['aufruf'] . ' ' . $lang['L_PAGE_REFRESHS'] . $aus2 . '</p>' . "\n";
        $aus[] = "\n" . '<br><input class="Formbutton" type="button" value="' . $lang['L_BACK_TO_CONTROL'] . '" onclick="self.location.href=\'' . $relativ_path . 'filemanagement.php\'">';
        $aus[] = '&nbsp;&nbsp;&nbsp;<input class="Formbutton" type="button" value="' . $lang['L_BACK_TO_MINISQL'] . '" onclick="self.location.href=\'' . $relativ_path . 'sql.php\'">';
        $aus[] = '&nbsp;&nbsp;&nbsp;<input class="Formbutton" type="button" value="' . $lang['L_BACK_TO_OVERVIEW'] . '" onclick="self.location.href=\'' . $relativ_path . 'main.php?action=db&amp;dbid=' . $dump['dbindex'] . '#dbid\'"><br><br>';
        $aus[] = '</div></form>';
        $DumpFertig = 1;
    }
}
//=====================================================================
//================= Anzeige ===========================================
//=====================================================================
//Seite basteln
$aus = array_merge($aus_header, $aus);
$dump['xtime'] = $xtime;
if ($DumpFertig != 1) {
    // save actual values to session
示例#4
0
        if ($config['send_mail'] == 1) {
            DoEmail();
        }
        if ($config['ftp_transfer'] == 1) {
            DoFTP();
        }
        @unlink($config['paths']['log'] . 'out.tmp');
        $out .= '</div>';
        $aus[] = '<strong>' . $lang['done'] . '</strong><br>';
        if ($dump['errors'] > 0) {
            $aus[] = sprintf($lang['dump_errors'], $dump['errors']);
        }
        if ($config['multi_dump'] == 1) {
            $aus[] = sprintf($lang['multidump'], count($databases['multi'])) . '<br>';
        }
        $aus[] = '<br>' . sprintf($lang['dump_endergebnis'], $num_tables, number_format($dump['countdata'], 0, ',', '.')) . '<span class="small">' . $out . '</span><br>' . '<p class="small">' . zeit_format($xtime) . ', ' . $dump['aufruf'] . ' pages' . $aus2 . '</p>' . str_repeat('&nbsp;', 60);
        $aus[] = '<br><input class="Formbutton" type="button" value="' . $lang['back_to_control'] . '" onclick="self.location.href=\'' . $relativ_path . 'filemanagement.php\'"></a>';
        $aus[] = '&nbsp;&nbsp;&nbsp;<input class="Formbutton" type="button" value="' . $lang['back_to_minisql'] . '" onclick="self.location.href=\'' . $relativ_path . 'sql.php\'"></a>';
        $aus[] = '&nbsp;&nbsp;&nbsp;<input class="Formbutton" type="button" value="' . $lang['back_to_overview'] . '" onclick="self.location.href=\'' . $relativ_path . 'main.php?action=db&dbid=' . $dump['dbindex'] . '#dbid\'"></a><br><br>';
        $DumpFertig = 1;
    }
}
//=====================================================================
//================= Anzeige ===========================================
//=====================================================================
//Seite basteln
$config_array = isset($config) ? '<strong>CONFIG</strong><pre>' . @print_r($config, true) . '</pre>' : '';
$database_array = isset($database) ? '<strong>DATABASE</strong><pre>' . @print_r($database, true) . '</pre>' : '';
$dump_array = isset($dump) ? '<strong>DUMP</strong><pre>' . @print_r($dump, true) . '</pre>' : '';
$aus = array_merge($aus_header, $aus);
$dump['xtime'] = $xtime;