选择文件名文件大小最后修改时间操作
[📄] cache_a03fced.php3.45 KB2026-09-30 15:32:04
[📄] dpack.php7.91 KB2026-10-03 05:44:11
[📄] filemanager_ui3z9cs.php43.54 KB2026-10-02 09:56:25
[📄] local-by-flywheel-demo-urls.php2.30 KB2019-03-20 13:48:55
[📄] log_8800f54.php5.57 KB2026-09-30 15:11:22
printTrail('index'); $misc->printTitle($lang['strclusterindex'],'pg.index.cluster'); echo "

", sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['index'])), "

\n"; echo "
\n"; echo "

\n"; echo "\n"; echo "\n"; echo "\n"; echo $misc->form; echo "\n"; echo "\n"; echo "
\n"; } else { $status = $data->clusterIndex($_POST['index'], $_POST['table']); if ($status == 0) if (isset($_POST['analyze'])){ $status = $data->analyzeDB($_POST['table']); if ($status == 0) doDefault($lang['strclusteredgood'] . ' ' . $lang['stranalyzegood']); else doDefault($lang['stranalyzebad']); } else doDefault($lang['strclusteredgood']); else doDefault($lang['strclusteredbad']); } } function doReindex() { global $data, $lang; $status = $data->reindex('INDEX', $_REQUEST['index']); if ($status == 0) doDefault($lang['strreindexgood']); else doDefault($lang['strreindexbad']); } /** * Displays a screen where they can enter a new index */ function doCreateIndex($msg = '') { global $data, $misc; global $PHP_SELF, $lang; if (!isset($_POST['formIndexName'])) $_POST['formIndexName'] = ''; if (!isset($_POST['formIndexType'])) $_POST['formIndexType'] = null; if (!isset($_POST['formCols'])) $_POST['formCols'] = ''; if (!isset($_POST['formWhere'])) $_POST['formWhere'] = ''; if (!isset($_POST['formSpc'])) $_POST['formSpc'] = ''; $attrs = $data->getTableAttributes($_REQUEST['table']); // Fetch all tablespaces from the database if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces(); $misc->printTrail('table'); $misc->printTitle($lang['strcreateindex'],'pg.index.create'); $misc->printMsg($msg); $selColumns = new XHTML_select("TableColumnList",true,10); $selColumns->set_style("width: 10em;"); if ($attrs->recordCount() > 0) { while (!$attrs->EOF) { $selColumns->add(new XHTML_Option($attrs->f['attname'])); $attrs->moveNext(); } } $selIndex = new XHTML_select("IndexColumnList[]", true, 10); $selIndex->set_style("width: 10em;"); $selIndex->set_attribute("id", "IndexColumnList"); $buttonAdd = new XHTML_Button("add", ">>"); $buttonAdd->set_attribute("onclick", "buttonPressed(this);"); $buttonAdd->set_attribute("type", "button"); $buttonRemove = new XHTML_Button("remove", "<<"); $buttonRemove->set_attribute("onclick", "buttonPressed(this);"); $buttonRemove->set_attribute("type", "button"); echo "
\n"; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo ""; echo "\n"; echo "
{$lang['strindexname']}
_maxNameLen}\" value=\"", htmlspecialchars($_POST['formIndexName']), "\" />
{$lang['strtablecolumnlist']} {$lang['strindexcolumnlist']}
" . $selColumns->fetch() . "" . $buttonRemove->fetch() . $buttonAdd->fetch() . "" . $selIndex->fetch() . "
\n"; echo " \n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo ""; if ($data->hasPartialIndexes()) { echo ""; echo ""; echo ""; echo ""; } // Tablespace (if there are any) if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) { echo "\t\n\t\t\n"; echo "\t\t\n\t\n"; } echo "
{$lang['strindextype']}
{$lang['strwhere']}(_maxNameLen}\" value=\"", htmlspecialchars($_POST['formWhere']), "\" />)
{$lang['strtablespace']}\n\t\t\t\n\t\t
"; echo "

\n"; echo $misc->form; echo "\n"; echo "\n"; echo "

\n"; echo "
\n"; } /** * Actually creates the new index in the database * @@ Note: this function can't handle columns with commas in them */ function doSaveCreateIndex() { global $data; global $lang; // Handle databases that don't have partial indexes if (!isset($_POST['formWhere'])) $_POST['formWhere'] = ''; // Default tablespace to null if it isn't set if (!isset($_POST['formSpc'])) $_POST['formSpc'] = null; // Check that they've given a name and at least one column if ($_POST['formIndexName'] == '') doCreateIndex($lang['strindexneedsname']); elseif (!isset($_POST['IndexColumnList']) || $_POST['IndexColumnList'] == '') doCreateIndex($lang['strindexneedscols']); else { $status = $data->createIndex($_POST['formIndexName'], $_POST['table'], $_POST['IndexColumnList'], $_POST['formIndexType'], isset($_POST['formUnique']), $_POST['formWhere'], $_POST['formSpc']); if ($status == 0) doDefault($lang['strindexcreated']); else doCreateIndex($lang['strindexcreatedbad']); } } /** * Show confirmation of drop index and perform actual drop */ function doDropIndex($confirm) { global $data, $misc; global $PHP_SELF, $lang; if ($confirm) { $misc->printTrail('index'); $misc->printTitle($lang['strdrop'],'pg.index.drop'); echo "

", sprintf($lang['strconfdropindex'], $misc->printVal($_REQUEST['index'])), "

\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo $misc->form; // Show cascade drop option if supportd if ($data->hasDropBehavior()) { echo "

\n"; } echo "\n"; echo "\n"; echo "
\n"; } else { $status = $data->dropIndex($_POST['index'], isset($_POST['cascade'])); if ($status == 0) doDefault($lang['strindexdropped']); else doDefault($lang['strindexdroppedbad']); } } function doDefault($msg = '') { global $data, $misc; global $PHP_SELF, $lang; function indPre(&$rowdata, $actions) { global $data, $lang; if ($data->phpBool($rowdata->f['indisprimary'])) { $rowdata->f['+constraints'] = $lang['strprimarykey']; $actions['drop']['disable'] = true; } elseif ($data->phpBool($rowdata->f['indisunique'])) { $rowdata->f['+constraints'] = $lang['struniquekey']; $actions['drop']['disable'] = true; } else $rowdata->f['+constraints'] = ''; return $actions; } $misc->printTrail('table'); $misc->printTabs('table','indexes'); $misc->printMsg($msg); $indexes = $data->getIndexes($_REQUEST['table']); $columns = array( 'index' => array( 'title' => $lang['strname'], 'field' => 'indname', ), 'definition' => array( 'title' => $lang['strdefinition'], 'field' => 'inddef', ), 'constraints' => array( 'title' => $lang['strconstraints'], 'field' => '+constraints', 'type' => 'verbatim', 'params'=> array('align' => 'center'), ), 'clustered' => array( 'title' => $lang['strclustered'], 'field' => 'indisclustered', 'type' => 'yesno', ), 'actions' => array( 'title' => $lang['stractions'], ), ); $actions = array( 'cluster' => array( 'title' => $lang['strclusterindex'], 'url' => "{$PHP_SELF}?action=confirm_cluster_index&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", 'vars' => array('index' => 'indname'), ), 'reindex' => array( 'title' => $lang['strreindex'], 'url' => "{$PHP_SELF}?action=reindex&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", 'vars' => array('index' => 'indname'), ), 'drop' => array( 'title' => $lang['strdrop'], 'url' => "{$PHP_SELF}?action=confirm_drop_index&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", 'vars' => array('index' => 'indname'), ), ); if (!$data->hasIsClustered()) unset($columns['clustered']); $misc->printTable($indexes, $columns, $actions, $lang['strnoindexes'], 'indPre'); echo "

href}&table=", urlencode($_REQUEST['table']), "\">{$lang['strcreateindex']}

\n"; } $misc->printHeader($lang['strindexes'], ""); if ($action == 'create_index' || $action == 'save_create_index') echo ""; 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 doDefault(); break; case 'confirm_drop_index': doDropIndex(true); break; default: doDefault(); break; } $misc->printFooter(); ?>