选择文件名文件大小最后修改时间操作
[📄] 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('database'); $misc->printTitle($lang['stralter'], 'pg.database.alter'); echo "
\n"; echo "\n"; echo "\n"; echo "\n"; $server_info = $misc->getServerInfo(); if ($data->hasAlterDatabaseOwner() && $data->isSuperUser($server_info['username'])) { // Fetch all users $rs = $data->getDatabaseOwner($_REQUEST['alterdatabase']); $owner = isset($rs->fields['usename']) ? $rs->fields['usename'] : ''; $users = $data->getUsers(); echo "\n"; echo "\n"; } if ($data->hasSharedComments()){ $rs = $data->getDatabaseComment($_REQUEST['alterdatabase']); $comment = isset($rs->fields['description']) ? $rs->fields['description'] : ''; echo "\n"; echo "\n"; } echo "
{$lang['strname']}"; echo "_maxNameLen}\" value=\"", htmlspecialchars($_REQUEST['alterdatabase']), "\" />
{$lang['strowner']}
{$lang['strcomment']}"; echo "
\n"; echo "\n"; echo $misc->form; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; } else { $newOwner = isset($_POST['owner']) ? $_POST['owner'] : ''; if ($data->AlterDatabase($_POST['oldname'], $_POST['newname'], $newOwner, $_POST['dbcomment']) == 0) { $_reload_browser = true; doDefault($lang['strdatabasealtered']); } else doDefault($lang['strdatabasealteredbad']); } } /** * Show confirmation of drop and perform actual drop */ function doDrop($confirm) { global $data, $misc; global $PHP_SELF, $lang, $_reload_drop_database; if ($confirm) { $misc->printTrail('database'); $misc->printTitle($lang['strdrop'], 'pg.database.drop'); echo "

", sprintf($lang['strconfdropdatabase'], $misc->printVal($_REQUEST['dropdatabase'])), "

\n"; echo "
\n"; echo "\n"; echo $misc->form; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; } else { $status = $data->dropDatabase($_POST['dropdatabase']); if ($status == 0) { $_reload_drop_database = true; doDefault($lang['strdatabasedropped']); } else doDefault($lang['strdatabasedroppedbad']); } } /** * Displays a screen where they can enter a new database */ function doCreate($msg = '') { global $data, $misc; global $PHP_SELF, $lang; $misc->printTrail('server'); $misc->printTitle($lang['strcreatedatabase'], 'pg.database.create'); $misc->printMsg($msg); if (!isset($_POST['formName'])) $_POST['formName'] = ''; // Default encoding is that in language file if (!isset($_POST['formEncoding'])) { if (isset($lang['appdbencoding'])) $_POST['formEncoding'] = $lang['appdbencoding']; else $_POST['formEncoding'] = ''; } if (!isset($_POST['formSpc'])) $_POST['formSpc'] = ''; if (!isset($_POST['formComment'])) $_POST['formComment'] = ''; // Fetch all tablespaces from the database if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces(); echo "
\n"; echo "\n"; echo "\t\n\t\t\n"; echo "\t\t\n\t\n"; echo "\t\n\t\t\n"; echo "\t\t\n\t\n"; // Tablespace (if there are any) if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) { echo "\t\n\t\t\n"; echo "\t\t\n\t\n"; } // Comments (if available) if ($data->hasSharedComments()) { echo "\t\n\t\t\n"; echo "\t\t\n\t\n"; } echo "
{$lang['strname']}_maxNameLen}\" value=\"", htmlspecialchars($_POST['formName']), "\" />
{$lang['strencoding']}\n"; echo "\t\t\t\n"; echo "\t\t
{$lang['strtablespace']}\n\t\t\t\n\t\t
{$lang['strcomment']}
\n"; echo "

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

\n"; echo "
\n"; } /** * Actually creates the new view in the database */ function doSaveCreate() { global $data, $lang, $_reload_browser; // Default tablespace to null if it isn't set if (!isset($_POST['formSpc'])) $_POST['formSpc'] = null; // Default comment to blank if it isn't set if (!isset($_POST['formComment'])) $_POST['formComment'] = null; // Check that they've given a name and a definition if ($_POST['formName'] == '') doCreate($lang['strdatabaseneedsname']); else { $status = $data->createDatabase($_POST['formName'], $_POST['formEncoding'], $_POST['formSpc'], $_POST['formComment']); if ($status == 0) { $_reload_browser = true; doDefault($lang['strdatabasecreated']); } else doCreate($lang['strdatabasecreatedbad']); } } /** * Displays options for cluster download */ function doExport($msg = '') { global $data, $misc; global $PHP_SELF, $lang; $misc->printTrail('server'); $misc->printTabs('server','export'); $misc->printMsg($msg); echo "
\n"; echo "\n"; echo "\n"; // Data only echo "\n"; echo "\n"; echo "\n\n"; echo "\n\n"; // Structure only echo "\n"; echo "\n\n"; // Structure and data echo "\n"; echo "\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; echo "
{$lang['strformat']}{$lang['stroptions']}
"; echo "{$lang['strformat']}\n
"; echo "{$lang['strformat']}\n
\n"; echo "

{$lang['stroptions']}

\n"; echo "

\n"; echo "

\n"; echo "

\n"; echo "

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

\n"; echo "
\n"; } /** * Show default list of databases in the server */ function doDefault($msg = '') { global $data, $conf, $misc; global $PHP_SELF, $lang; $misc->printTrail('server'); $misc->printTabs('server','databases'); $misc->printMsg($msg); $databases = $data->getDatabases(); $columns = array( 'database' => array( 'title' => $lang['strdatabase'], 'field' => 'datname', ), 'owner' => array( 'title' => $lang['strowner'], 'field' => 'datowner', ), 'encoding' => array( 'title' => $lang['strencoding'], 'field' => 'datencoding', ), 'tablespace' => array( 'title' => $lang['strtablespace'], 'field' => 'tablespace', ), 'dbsize' => array( 'title' => $lang['strsize'], 'field' => 'dbsize', 'type' => 'prettysize', ), 'actions' => array( 'title' => $lang['stractions'], ), 'comment' => array( 'title' => $lang['strcomment'], 'field' => 'datcomment', ), ); $actions = array( 'properties' => array( 'title' => $lang['strproperties'], 'url' => "redirect.php?subject=database&{$misc->href}&", 'vars' => array('database' => 'datname'), ), 'drop' => array( 'title' => $lang['strdrop'], 'url' => "{$PHP_SELF}?action=confirm_drop&subject=database&{$misc->href}&", 'vars' => array('dropdatabase' => 'datname'), ), 'privileges' => array( 'title' => $lang['strprivileges'], 'url' => "privileges.php?subject=database&{$misc->href}&", 'vars' => array('database' => 'datname'), ) ); if ($data->hasAlterDatabase() ) { $actions['alter'] = array( 'title' => $lang['stralter'], 'url' => "{$PHP_SELF}?action=confirm_alter&subject=database&{$misc->href}&", 'vars' => array('alterdatabase' => 'datname') ); } if (!$data->hasTablespaces()) unset($columns['tablespace']); if (!$data->hasServerAdminFuncs()) unset($columns['dbsize']); if (!isset($data->privlist['database'])) unset($actions['privileges']); $misc->printTable($databases, $columns, $actions, $lang['strnodatabases']); echo "

href}\">{$lang['strcreatedatabase']}

\n"; } function doTree() { global $misc, $data, $lang; $databases = $data->getDatabases(); $reqvars = $misc->getRequestVars('database'); $attrs = array( 'text' => field('datname'), 'icon' => 'Database', 'toolTip'=> field('datcomment'), 'action' => url('redirect.php', $reqvars, array('database' => field('datname')) ), 'branch' => url('database.php', $reqvars, array( 'action' => 'tree', 'database' => field('datname') ) ), ); $misc->printTreeXML($databases, $attrs); exit; } if ($action == 'tree') doTree(); $misc->printHeader($lang['strdatabases']); $misc->printBody(); switch ($action) { case 'export': doExport(); break; case 'save_create': if (isset($_POST['cancel'])) doDefault(); else doSaveCreate(); break; case 'create': doCreate(); break; case 'drop': if (isset($_REQUEST['drop'])) doDrop(false); else doDefault(); break; case 'confirm_drop': doDrop(true); break; case 'alter': if (isset($_POST['oldname']) && isset($_POST['newname']) && !isset($_POST['cancel']) ) doAlter(false); else doDefault(); break; case 'confirm_alter': doAlter(true); break; default: doDefault(); break; } $misc->printFooter(); ?>