2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Shared code for server pages
8 if (! defined('PHPMYADMIN')) {
13 * Handles some variables that may have been sent by the calling script
14 * Note: this can be called also from the db panel to get the privileges of
15 * a db, in which case we want to keep displaying the tabs of
18 if (empty($viewing_mode)) {
23 * Set parameters for links
25 $GLOBALS['url_query'] = PMA_URL_getCommon(array('db' => $db));
28 * Defines the urls to return to in case of error in a sql statement
30 $err_url = 'index.php' . $GLOBALS['url_query'];
33 * @global boolean Checks for superuser privileges
35 $GLOBALS['is_superuser'] = $GLOBALS['dbi']->isSuperuser();
36 $GLOBALS['is_grantuser'] = $GLOBALS['dbi']->isUserType('grant');
37 $GLOBALS['is_createuser'] = $GLOBALS['dbi']->isUserType('create');
39 // now, select the mysql db
40 if ($GLOBALS['is_superuser'] && ! PMA_DRIZZLE
) {
41 $GLOBALS['dbi']->selectDb('mysql', $GLOBALS['userlink']);
44 PMA_Util
::checkParameters(
45 array('is_superuser', 'url_query'), false
49 * shared functions for server page
51 require_once './libraries/server_common.lib.php';