コード例 #1
0
ファイル: menu.php プロジェクト: thaian2009/php
				var selected_div=parent.MySQL_Dumper_content.document.getElementById("sel").value;
			}
			else selected_div=\'\';
			parent.MySQL_Dumper_content.location.href=\'config_overview.php?config=' . urlencode($new_config) . '&sel=\'+selected_div</script>';
        }
        if (isset($_GET['config'])) {
            $config_refresh = '';
        }
        //Neu-Aufruf bei Uebergabe aus Content-Bereich verhindern
    }
}
echo MSDHeader(1);
echo headline('', 0);
if ($config_refresh > '') {
    $tpl->assign_block_vars('CONFIG_REFRESH_TRUE', array());
    $tpl->assign_var('CONFIG_REFRESH', $config_refresh);
}
// changed language
if ($config['language'] != $lang_old) {
    $tpl->assign_block_vars('CHANGED_LANGUAGE', array());
}
if (isset($_GET['action'])) {
    if ($_GET['action'] == 'dbrefresh') {
        // remember the name of the selected database
        $old_dbname = isset($databases['Name'][$databases['db_selected_index']]) ? $databases['Name'][$databases['db_selected_index']] : '';
        SetDefault();
        // select old database if it still is there
        SelectDB($old_dbname);
        $tpl->assign_block_vars('DB_REFRESH', array());
    }
}
コード例 #2
0
    ksort($databases);
    $_SESSION['databases'] = $databases;
}
if (isset($_POST['dbindex']) || isset($_GET['dbindex'])) {
    if (isset($_POST['dbindex'])) {
        $dbName = $_POST['dbindex'];
    }
    if (isset($_GET['dbindex'])) {
        $dbName = $_GET['dbindex'];
    }
    $dbName = base64_decode($dbName);
    $config['db_actual'] = $dbName;
    $dbo->selectDb($dbName);
    saveConfig();
}
$tplMenu->assign_var('GET_FILELIST', getConfigFilelist($config['config_file']));
if (count($databases) > 0) {
    // show menu items related to databases
    $tplMenu->assign_block_vars('MAINTENANCE', array());
    $tplMenu->assign_vars(array('DB_ACTUAL_URLENCODED' => base64_encode($config['db_actual'])));
    ksort($databases);
    $tplMenu->assign_block_vars('DB_LIST', array());
    foreach ($databases as $dbName => $val) {
        $selected = Html::getSelected($dbName, $config['db_actual']);
        $tplMenu->assign_block_vars('DB_LIST.DB_ROW', array('ID' => base64_encode($dbName), 'NAME' => $dbName, 'SELECTED' => $selected));
    }
} else {
    $tplMenu->assign_block_vars('NO_DB_FOUND', array());
}
$tplMenu->assign_vars(array('TIMESTAMP' => time()));
if (count($databases) == 0) {
コード例 #3
0
$dump['dump_start_time'] = time();
$dump['countdata'] = 0;
$dump['table_offset_total'] = 0;
$dump['page_refreshs'] = 0;
// used as overall flag including e-mail and ftp-actions
$dump['backup_in_progress'] = 1;
// used to determine id databases still need to be dumped
$dump['backup_done'] = 0;
$dump['selected_tables'] = FALSE;
if (isset($_POST['sel_tbl'])) {
    $dump['selected_tables'] = $_POST['sel_tbl'];
}
// function was called in dump_prepare
// -- maybe get rid of this second call later on
prepareDumpProcess();
// last_db_actual is used to detect if db changed in multidump-mode
// -> set to first db
$dump['last_db_actual'] = $dump['db_actual'];
$_SESSION['config_file'] = $config['config_file'];
$_SESSION['dump'] = $dump;
$tplDoDump = new MSDTemplate();
$tplDoDump->set_filenames(array('tplDoDump' => 'tpl/dump/dump.tpl'));
$gzip = $config['compression'] == 1 ? $icon['gz'] : $lang['L_NOT_ACTIVATED'];
$tplDoDump->assign_vars(array('ICONPATH' => $config['files']['iconpath'], 'GZIP' => $gzip, 'SESSION_ID' => session_id(), 'NOTIFICATION_POSITION' => $config['notification_position']));
$sizeUnits = array(1, 1024, 1024 * 1024, 1024 * 10242 * 1024);
$size = $config['multipartgroesse1'] * $sizeUnits[$config['multipartgroesse2']];
if ($config['multi_part'] > 0) {
    $tplDoDump->assign_block_vars('MULTIPART', array('SIZE' => byteOutput($size)));
}
$tplDoDump->assign_var('TABLES_TO_DUMP', $dump['tables_total']);