选择文件名文件大小最后修改时间操作
[📄] 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->printTabs('database','schemas'); $misc->printMsg($msg); // Check that the DB actually supports schemas if ($data->hasSchemas()) { $schemas = $data->getSchemas(); $columns = array( 'schema' => array( 'title' => $lang['strschema'], 'field' => 'nspname', ), 'owner' => array( 'title' => $lang['strowner'], 'field' => 'nspowner', ), 'actions' => array( 'title' => $lang['stractions'], ), 'comment' => array( 'title' => $lang['strcomment'], 'field' => 'nspcomment', ), ); $actions = array( 'properties' => array( 'title' => $lang['strproperties'], 'url' => "redirect.php?subject=schema&{$misc->href}&", 'vars' => array('schema' => 'nspname'), ), 'drop' => array( 'title' => $lang['strdrop'], 'url' => "{$PHP_SELF}?action=drop&{$misc->href}&", 'vars' => array('schema' => 'nspname'), ), 'privileges' => array( 'title' => $lang['strprivileges'], 'url' => "privileges.php?subject=schema&{$misc->href}&", 'vars' => array('schema' => 'nspname'), ), 'alter' => array( 'title' => $lang['stralter'], 'url' => "{$PHP_SELF}?action=alter&{$misc->href}&", 'vars' => array('schema' => 'nspname'), ), ); $misc->printTable($schemas, $columns, $actions, $lang['strnoschemas']); echo "

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

\n"; } else { // If the database does not support schemas... echo "

{$lang['strnoschemas']}

\n"; } } /** * Displays a screen where they can enter a new schema */ function doCreate($msg = '') { global $data, $misc; global $PHP_SELF, $lang; $server_info = $misc->getServerInfo(); if (!isset($_POST['formName'])) $_POST['formName'] = ''; if (!isset($_POST['formAuth'])) $_POST['formAuth'] = $server_info['username']; if (!isset($_POST['formSpc'])) $_POST['formSpc'] = ''; if (!isset($_POST['formComment'])) $_POST['formComment'] = ''; // Fetch all users from the database $users = $data->getUsers(); $misc->printTrail('database'); $misc->printTitle($lang['strcreateschema'],'pg.schema.create'); $misc->printMsg($msg); echo "
\n"; echo $misc->form; echo "\n"; echo "\t\n\t\t\n"; echo "\t\t\n\t\n"; // Owner echo "\t\n\t\t\n"; echo "\t\t\n\t\n"; echo "\t\n\t\t\n"; echo "\t\t\n\t\n"; echo "\t\n"; echo "
{$lang['strname']}_maxNameLen}\" value=\"", htmlspecialchars($_POST['formName']), "\" />
{$lang['strowner']}\n\t\t\t\n\t\t
{$lang['strcomment']}
\n"; echo "

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

\n"; echo "
\n"; } /** * Actually creates the new schema in the database */ function doSaveCreate() { global $data, $lang, $_reload_browser; // Check that they've given a name if ($_POST['formName'] == '') doCreate($lang['strschemaneedsname']); else { $status = $data->createSchema($_POST['formName'], $_POST['formAuth'], $_POST['formComment']); if ($status == 0) { $_reload_browser = true; doDefault($lang['strschemacreated']); } else doCreate($lang['strschemacreatedbad']); } } /** * Display a form to permit editing schema properies. * TODO: permit changing name, owner */ function doAlter($msg = '') { global $data, $misc,$PHP_SELF, $lang; $misc->printTrail('schema'); $misc->printTitle($lang['stralter'],'pg.schema.alter'); $misc->printMsg($msg); $schema = $data->getSchemaByName($_REQUEST['schema']); if ($schema->recordCount() > 0) { if (!isset($_POST['comment'])) $_POST['comment'] = $schema->f['nspcomment']; if (!isset($_POST['schema'])) $_POST['schema'] = $_REQUEST['schema']; if (!isset($_POST['name'])) $_POST['name'] = $_REQUEST['schema']; echo "
\n"; echo "\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; echo "\t\n"; echo "\t\t\n"; echo "\t\t\n"; echo "\t\n"; echo "
{$lang['strname']}"; echo "\t\t\t_maxNameLen}\" value=\"", htmlspecialchars($_POST['name']), "\" />\n"; echo "\t\t
{$lang['strcomment']}
\n"; echo "

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

\n"; echo "
\n"; } else { echo "

{$lang['strnodata']}

\n"; } } /** * Save the form submission containing changes to a schema */ function doSaveAlter($msg = '') { global $data, $misc,$PHP_SELF, $lang; $status = $data->updateSchema($_POST['schema'], $_POST['comment'], $_POST['name']); if ($status == 0) doDefault($lang['strschemaaltered']); else doAlter($lang['strschemaalteredbad']); } /** * Show confirmation of drop and perform actual drop */ function doDrop($confirm) { global $PHP_SELF, $data, $data, $misc; global $lang, $_reload_browser; if ($confirm) { $misc->printTrail('schema'); $misc->printTitle($lang['strdrop'],'pg.schema.drop'); echo "

", sprintf($lang['strconfdropschema'], $misc->printVal($_REQUEST['schema'])), "

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

\n"; } echo "\n"; echo "\n"; echo "
\n"; } else { $status = $data->dropSchema($_POST['schema'], isset($_POST['cascade'])); if ($status == 0) { $_reload_browser = true; doDefault($lang['strschemadropped']); } else doDefault($lang['strschemadroppedbad']); } } /** * Generate XML for the browser tree. */ function doTree() { global $misc, $data, $lang, $PHP_SELF, $slony; $schemas = $data->getSchemas(); $reqvars = $misc->getRequestVars('schema'); $attrs = array( 'text' => field('nspname'), 'icon' => 'Schema', 'toolTip'=> field('nspcomment'), 'action' => url('redirect.php', $reqvars, array( 'subject' => 'schema', 'schema' => field('nspname') ) ), 'branch' => url('schemas.php', $reqvars, array( 'action' => 'subtree', 'schema' => field('nspname') ) ), ); $misc->printTreeXML($schemas, $attrs); exit; } function doSubTree() { global $misc, $data, $lang; $tabs = $misc->getNavTabs('schema'); $items = $misc->adjustTabsForTree($tabs); $reqvars = $misc->getRequestVars('schema'); $attrs = array( 'text' => noEscape(field('title')), 'icon' => field('icon'), 'action' => url(field('url'), $reqvars, field('urlvars', array()) ), 'branch' => url(field('url'), $reqvars, field('urlvars'), array('action' => 'tree') ) ); $misc->printTreeXML($items, $attrs); exit; } if ($action == 'tree') doTree(); if ($action == 'subtree') doSubTree(); $misc->printHeader($lang['strschemas']); $misc->printBody(); if (isset($_POST['cancel'])) $action = ''; switch ($action) { case 'create': if (isset($_POST['create'])) doSaveCreate(); else doCreate(); break; case 'alter': if (isset($_POST['alter'])) doSaveAlter(); else doAlter(); break; case 'drop': if (isset($_POST['drop'])) doDrop(false); else doDrop(true); break; default: doDefault(); break; } $misc->printFooter(); ?>