2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Shared code for server pages
8 declare(strict_types
=1);
12 if (! defined('PHPMYADMIN')) {
17 * Handles some variables that may have been sent by the calling script
18 * Note: this can be called also from the db panel to get the privileges of
19 * a db, in which case we want to keep displaying the tabs of
22 if (empty($viewing_mode)) {
27 * Set parameters for links
29 $GLOBALS['url_query'] = Url
::getCommon();
32 * Defines the urls to return to in case of error in a sql statement
34 $err_url = 'index.php' . $GLOBALS['url_query'];
37 * @global boolean Checks for superuser privileges
39 $GLOBALS['is_grantuser'] = $GLOBALS['dbi']->isUserType('grant');
40 $GLOBALS['is_createuser'] = $GLOBALS['dbi']->isUserType('create');
42 // now, select the mysql db
43 if ($GLOBALS['dbi']->isSuperuser()) {
44 $GLOBALS['dbi']->selectDb('mysql');