function adminActions($action, $type) { global $script; if ($type == 'database') { $_REQUEST['object'] = $_REQUEST['database']; $script = 'database.php'; } else { // $_REQUEST['table'] is no set if we are in the schema page $_REQUEST['object'] = isset($_REQUEST['table']) ? $_REQUEST['table'] : ''; $script = 'tables.php'; } switch ($action) { case 'confirm_cluster': doCluster($type, true); break; case 'confirm_reindex': doReindex($type, true); break; case 'confirm_analyze': doAnalyze($type, true); break; case 'confirm_vacuum': doVacuum($type, true); break; case 'cluster': if (isset($_POST['cluster'])) { doCluster($type); } else { if ($type == 'table' && is_array($_REQUEST['object'])) { doDefault(); } else { doAdmin($type); } } break; case 'reindex': if (isset($_POST['reindex'])) { doReindex($type); } else { if ($type == 'table' && is_array($_REQUEST['object'])) { doDefault(); } else { doAdmin($type); } } break; case 'analyze': if (isset($_POST['analyze'])) { doAnalyze($type); } else { if ($type == 'table' && is_array($_REQUEST['object'])) { doDefault(); } else { doAdmin($type); } } break; case 'vacuum': if (isset($_POST['vacuum'])) { doVacuum($type); } else { if ($type == 'table' && is_array($_REQUEST['object'])) { doDefault(); } else { doAdmin($type); } } break; case 'admin': doAdmin($type); break; case 'confeditautovac': doEditAutovacuum($type, true); break; case 'confdelautovac': doDropAutovacuum($type, true); break; case 'confaddautovac': doAddAutovacuum(true); break; case 'editautovac': if (isset($_POST['save'])) { doEditAutovacuum($type, false); } else { doAdmin($type); } break; case 'delautovac': doDropAutovacuum($type, false); break; default: return false; } return true; }
} else { $misc->printBody(); } switch ($action) { case 'cluster_index': if (isset($_POST['cluster'])) { doClusterIndex(false); } else { doDefault(); } break; case 'confirm_cluster_index': doClusterIndex(true); break; case 'reindex': doReindex(); break; case 'save_create_index': if (isset($_POST['cancel'])) { doDefault(); } else { doSaveCreateIndex(); } break; case 'create_index': doCreateIndex(); break; case 'drop_index': if (isset($_POST['drop'])) { doDropIndex(false); } else {