/** * Index action * * @return void */ public function indexAction() { /** * Does the common work */ include_once 'libraries/server_common.inc.php'; $this->response->addHTML(PMA_getHtmlForSubPageHeader('collations')); $this->response->addHTML($this->_getHtmlForCharsets(Charsets::getMySQLCharsets(), Charsets::getMySQLCollations(), Charsets::getMySQLCharsetsDescriptions(), Charsets::getMySQLCollationsDefault())); }
/** * Index action * * @return void */ public function indexAction() { include_once 'libraries/check_user_privileges.lib.php'; if (isset($_REQUEST['drop_selected_dbs']) && $GLOBALS['is_ajax_request'] && ($GLOBALS['is_superuser'] || $GLOBALS['cfg']['AllowUserDropDatabase'])) { $this->dropDatabasesAction(); return; } include_once 'libraries/replication.inc.php'; include_once 'libraries/mysql_charsets.inc.php'; if (!empty($_POST['new_db']) && $GLOBALS['is_ajax_request']) { $this->createDatabaseAction(); return; } include_once 'libraries/server_common.inc.php'; $header = $this->response->getHeader(); $scripts = $header->getScripts(); $scripts->addFile('server_databases.js'); $this->_setSortDetails(); $this->_dbstats = empty($_REQUEST['dbstats']) ? false : true; $this->_pos = empty($_REQUEST['pos']) ? 0 : (int) $_REQUEST['pos']; /** * Displays the sub-page heading */ $header_type = $this->_dbstats ? "database_statistics" : "databases"; $this->response->addHTML(PMA_getHtmlForSubPageHeader($header_type)); /** * Displays For Create database. */ $html = ''; if ($GLOBALS['cfg']['ShowCreateDb']) { $html .= Template::get('server/databases/create')->render(); } $html .= Template::get('filter')->render(array('filterValue' => '')); /** * Gets the databases list */ if ($GLOBALS['server'] > 0) { $this->_databases = $this->dbi->getDatabasesFull(null, $this->_dbstats, null, $this->_sort_by, $this->_sort_order, $this->_pos, true); $this->_database_count = count($GLOBALS['dblist']->databases); } else { $this->_database_count = 0; } /** * Displays the page */ if ($this->_database_count > 0 && !empty($this->_databases)) { $html .= $this->_getHtmlForDatabases($replication_types); } else { $html .= __('No databases'); } $this->response->addHTML($html); }
/** * Index action * * @return void */ public function indexAction() { include 'libraries/server_common.inc.php'; $header = $this->response->getHeader(); $scripts = $header->getScripts(); $scripts->addFile('jquery/jquery.tablesorter.js'); $scripts->addFile('server_plugins.js'); /** * Displays the page */ $this->response->addHTML(PMA_getHtmlForSubPageHeader('plugins')); $this->response->addHTML($this->_getPluginsHtml()); }
/** * Index action * * @return void */ public function indexAction() { /** * Does the common work */ include_once 'libraries/server_common.inc.php'; /** * Includes the required charset library */ include_once 'libraries/mysql_charsets.inc.php'; $this->response->addHTML(PMA_getHtmlForSubPageHeader('collations')); $this->response->addHTML($this->_getHtmlForCharsets($GLOBALS['mysql_charsets'], $GLOBALS['mysql_collations'], $GLOBALS['mysql_charsets_descriptions'], $GLOBALS['mysql_default_collations'], $GLOBALS['mysql_collations_available'])); }
/** * Test for PMA_getHtmlForSubPageHeader * * @return void */ public function testPMAGetSubPageHeader() { //server_engines $html = PMA_getHtmlForSubPageHeader("engines"); $this->assertContains('<img src="themes/dot.gif" title="" alt="" class="icon ic_b_engine" />', $html); $this->assertContains('Storage Engines', $html); //server_databases $html = PMA_getHtmlForSubPageHeader("databases"); $this->assertContains('<img src="themes/dot.gif" title="" alt="" class="icon ic_s_db" />', $html); $this->assertContains('Databases', $html); //server_replication $html = PMA_getHtmlForSubPageHeader("replication"); $replication_img = '<img src="themes/dot.gif" title="" ' . 'alt="" class="icon ic_s_replication" />'; $this->assertContains($replication_img, $html); $this->assertContains('Replication', $html); }
/** * Index action * * @return void */ public function indexAction() { $request = Request::getInstance(); if ($request->isAjax() && isset($_REQUEST['type']) && $_REQUEST['type'] === 'getval') { $this->getValueAction(); return; } if ($request->isAjax() && isset($_REQUEST['type']) && $_REQUEST['type'] === 'setval') { $this->setValueAction(); return; } include 'libraries/server_common.inc.php'; $header = $this->response->getHeader(); $scripts = $header->getScripts(); $scripts->addFile('server_variables.js'); /** * Displays the sub-page heading */ $doc_link = Util::showMySQLDocu('server_system_variables'); $this->response->addHtml(PMA_getHtmlForSubPageHeader('variables', $doc_link)); /** * Sends the queries and buffers the results */ $serverVarsResult = $this->dbi->tryQuery('SHOW SESSION VARIABLES;'); if ($serverVarsResult !== false) { $serverVarsSession = array(); while ($arr = $this->dbi->fetchRow($serverVarsResult)) { $serverVarsSession[$arr[0]] = $arr[1]; } $this->dbi->freeResult($serverVarsResult); $serverVars = $this->dbi->fetchResult('SHOW GLOBAL VARIABLES;', 0, 1); /** * Link templates */ $this->response->addHtml($this->_getHtmlForLinkTemplates()); /** * Displays the page */ $this->response->addHtml($this->_getHtmlForServerVariables($serverVars, $serverVarsSession)); } else { /** * Display the error message */ $this->response->addHTML(Message::error(sprintf(__('Not enough privilege to view server variables and ' . 'settings. %s'), Util::showMySQLDocu('server-system-variables', false, 'sysvar_show_compatibility_56')))->getDisplay()); } }
/** * Index action * * @return void */ public function indexAction() { /** * Does the common work */ include_once 'libraries/server_common.inc.php'; $url_params = array(); if (!isset($_REQUEST['log']) || !array_key_exists($_REQUEST['log'], $this->binary_logs)) { $_REQUEST['log'] = ''; } else { $url_params['log'] = $_REQUEST['log']; } if (!empty($_REQUEST['dontlimitchars'])) { $url_params['dontlimitchars'] = 1; } $this->response->addHTML(PMA_getHtmlForSubPageHeader('binlog')); $this->response->addHTML($this->_getLogSelector($url_params)); $this->response->addHTML($this->_getLogInfo($url_params)); }
/** * Index action * * @return void */ public function indexAction() { /** * Does the common work */ require 'libraries/server_common.inc.php'; /** * Displays the sub-page heading */ $this->response->addHTML(PMA_getHtmlForSubPageHeader('engines')); /** * Did the user request information about a certain storage engine? */ if (empty($_REQUEST['engine']) || !StorageEngine::isValid($_REQUEST['engine'])) { $this->response->addHTML($this->_getHtmlForAllServerEngines()); } else { $engine = StorageEngine::getEngine($_REQUEST['engine']); $this->response->addHTML($this->_getHtmlForServerEngine($engine)); } }
$strPrivDescShutdown = __('Allows shutting down the server.'); $strPrivDescSuper = __('Allows connecting, even if maximum number of connections is reached; ' . 'required for most administrative operations like setting global variables ' . 'or killing threads of other users.'); $strPrivDescTrigger = __('Allows creating and dropping triggers.'); $strPrivDescUpdate = __('Allows changing data.'); $strPrivDescUsage = __('No privileges.'); $_add_user_error = false; /** * Get DB information: username, hostname, dbname, * tablename, db_and_table, dbname_is_wildcard */ list($username, $hostname, $dbname, $tablename, $db_and_table, $dbname_is_wildcard) = PMA_getDataForDBInfo(); /** * Checks if the user is allowed to do what he tries to... */ if (!$GLOBALS['is_superuser'] && !$GLOBALS['is_grantuser'] && !$GLOBALS['is_createuser']) { $response->addHTML(PMA_getHtmlForSubPageHeader('privileges', '', false)); $response->addHTML(PMA_Message::error(__('No Privileges'))->getDisplay()); exit; } /** * Checks if the user is using "Change Login Information / Copy User" dialog * only to update the password */ if (isset($_REQUEST['change_copy']) && $username == $_REQUEST['old_username'] && $hostname == $_REQUEST['old_hostname']) { $response->addHTML(PMA_Message::error(__('Username and hostname didn\'t change.'))->getDisplay()); $response->isSuccess(false); exit; } /** * Changes / copies a user, part I */
$response = PMA_Response::getInstance(); $header = $response->getHeader(); $scripts = $header->getScripts(); $scripts->addFile('jquery/jquery.tablesorter.js'); $scripts->addFile('server_plugins.js'); /** * Does the common work */ require 'libraries/server_common.inc.php'; require 'libraries/server_plugins.lib.php'; /** * Prepare plugin list */ $sql = "SELECT p.plugin_name, p.plugin_type, p.is_active, m.module_name,\n m.module_library, m.module_version, m.module_author,\n m.module_description, m.module_license\n FROM data_dictionary.plugins p\n JOIN data_dictionary.modules m USING (module_name)\n ORDER BY m.module_name, p.plugin_type, p.plugin_name"; $res = $GLOBALS['dbi']->query($sql); $plugins = array(); $modules = array(); while ($row = $GLOBALS['dbi']->fetchAssoc($res)) { $plugins[$row['plugin_type']][] = $row; $modules[$row['module_name']]['info'] = $row; $modules[$row['module_name']]['plugins'][$row['plugin_type']][] = $row; } $GLOBALS['dbi']->freeResult($res); // sort plugin list (modules are already sorted) ksort($plugins); /** * Displays the page */ $response->addHTML(PMA_getHtmlForSubPageHeader('plugins')); $response->addHTML(PMA_getPluginAndModuleInfo($plugins, $modules)); exit;
* @package PhpMyAdmin */ /** * requirements */ require_once 'libraries/common.inc.php'; /** * Does the common work */ require_once 'libraries/server_common.inc.php'; require_once 'libraries/server_bin_log.lib.php'; /** * array binary log files */ $binary_logs = PMA_DRIZZLE ? null : $GLOBALS['dbi']->fetchResult('SHOW MASTER LOGS', 'Log_name', null, null, PMA_DatabaseInterface::QUERY_STORE); if (!isset($_REQUEST['log']) || !array_key_exists($_REQUEST['log'], $binary_logs)) { $_REQUEST['log'] = ''; } else { $url_params['log'] = $_REQUEST['log']; } if (!empty($_REQUEST['dontlimitchars'])) { $url_params['dontlimitchars'] = 1; } $response = PMA_Response::getInstance(); $response->addHTML(PMA_getHtmlForSubPageHeader('binlog')); $response->addHTML(PMA_getLogSelector($binary_logs, $url_params)); $response->addHTML(PMA_getLogInfo($url_params)); exit; ?> >>>>>>> b875702c9c06ab5012e52ff4337439b03918f453
if (isset($_REQUEST['type'])) { if ($_REQUEST['type'] === 'getval') { PMA_getAjaxReturnForGetVal($variable_doc_links); } else { if ($_REQUEST['type'] === 'setval') { PMA_getAjaxReturnForSetVal($variable_doc_links); } } exit; } } /** * Displays the sub-page heading */ $doc_link = PMA_Util::showMySQLDocu('server_system_variables'); $response->addHtml(PMA_getHtmlForSubPageHeader('variables', $doc_link)); /** * Sends the queries and buffers the results */ $serverVarsResult = $GLOBALS['dbi']->tryQuery('SHOW SESSION VARIABLES;'); if ($serverVarsResult !== false) { $serverVarsSession = array(); while ($arr = $GLOBALS['dbi']->fetchRow($serverVarsResult)) { $serverVarsSession[$arr[0]] = $arr[1]; } $GLOBALS['dbi']->freeResult($serverVarsResult); $serverVars = $GLOBALS['dbi']->fetchResult('SHOW GLOBAL VARIABLES;', 0, 1); /** * Link templates */ $response->addHtml(PMA_getHtmlForLinkTemplates());
/** * Drops multiple databases */ // workaround for IE behavior (it returns some coordinates based on where // the mouse was on the Drop image): if (isset($_REQUEST['drop_selected_dbs_x'])) { $_REQUEST['drop_selected_dbs'] = true; } if ((isset($_REQUEST['drop_selected_dbs']) || isset($_REQUEST['query_type'])) && ($is_superuser || $cfg['AllowUserDropDatabase'])) { PMA_dropMultiDatabases(); } /** * Displays the sub-page heading */ $header_type = $dbstats ? "database_statistics" : "databases"; $response->addHTML(PMA_getHtmlForSubPageHeader($header_type)); /** * Displays For Create database. */ $html = ''; if ($cfg['ShowCreateDb']) { $html .= '<ul><li id="li_create_database" class="no_bullets">' . "\n"; include 'libraries/display_create_database.lib.php'; $html .= ' </li>' . "\n"; $html .= '</ul>' . "\n"; } /** * Gets the databases list */ if ($server > 0) { $databases = $GLOBALS['dbi']->getDatabasesFull(null, $dbstats, null, $sort_by, $sort_order, $pos, true);
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Server collations page * * @package PhpMyAdmin */ /** * requirements */ require_once 'libraries/common.inc.php'; /** * Does the common work */ require_once 'libraries/server_common.inc.php'; require_once 'libraries/server_collations.lib.php'; /** * Includes the required charset library */ require_once 'libraries/mysql_charsets.inc.php'; $response = PMA_Response::getInstance(); $response->addHTML(PMA_getHtmlForSubPageHeader('collations')); $response->addHTML(PMA_getHtmlForCharsets($mysql_charsets, $mysql_collations, $mysql_charsets_descriptions, $mysql_default_collations, $mysql_collations_available));
exit; } // change $GLOBALS['url_params'] with $_REQUEST['url_params'] // only if it is an array if (isset($_REQUEST['url_params']) && is_array($_REQUEST['url_params'])) { $GLOBALS['url_params'] = $_REQUEST['url_params']; } /** * Handling control requests */ PMA_handleControlRequest(); /** * start output */ $response->addHTML('<div id="replication">'); $response->addHTML(PMA_getHtmlForSubPageHeader('replication')); // Display error messages $response->addHTML(PMA_getHtmlForErrorMessage()); if ($GLOBALS['replication_info']['master']['status']) { $response->addHTML(PMA_getHtmlForMasterReplication()); } elseif (!isset($_REQUEST['mr_configure']) && !isset($_REQUEST['repl_clear_scr'])) { $response->addHTML(PMA_getHtmlForNotServerReplication()); } if (isset($_REQUEST['mr_configure'])) { // Render the 'Master configuration' section $response->addHTML(PMA_getHtmlForMasterConfiguration()); exit; } $response->addHTML('</div>'); if (!isset($_REQUEST['repl_clear_scr'])) { // Render the 'Slave configuration' section
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * display list of server engines and additional information about them * * @package PhpMyAdmin */ /** * requirements */ require_once 'libraries/common.inc.php'; /** * Does the common work */ require 'libraries/server_common.inc.php'; require 'libraries/StorageEngine.class.php'; require 'libraries/server_engines.lib.php'; /** * Displays the sub-page heading */ $response = PMA_Response::getInstance(); $response->addHTML(PMA_getHtmlForSubPageHeader('engines')); /** * start output */ $response->addHTML(PMA_getHtmlForServerEngines()); exit;