3 // vim: expandtab sw=4 ts=4 sts=4:
6 * Gets some core libraries
8 require_once('./libraries/grab_globals.lib.php');
9 require_once('./libraries/common.lib.php');
12 * Handles some variables that may have been sent by the calling script
17 * Set parameters for links
19 $url_query = PMA_generate_common_url();
22 * Defines the urls to return to in case of error in a sql statement
24 $err_url = 'main.php' . $url_query;
27 * Displays the headers
29 require_once('./header.inc.php');
32 * Checks for superuser privileges
34 // We were checking privileges with 'USE mysql' but users with the global
35 // priv CREATE TEMPORARY TABLES or LOCK TABLES can do a 'USE mysql'
36 // (even if they cannot see the tables)
38 $is_superuser = PMA_DBI_try_query('SELECT COUNT(*) FROM mysql.user');
40 // now, select the mysql db
42 PMA_DBI_free_result($is_superuser);
43 PMA_DBI_select_db('mysql', $userlink);
46 $is_superuser = FALSE;
50 $binlogs = PMA_DBI_try_query('SHOW MASTER LOGS', NULL, PMA_DBI_QUERY_STORE
);
52 if (PMA_DBI_num_rows($binlogs) > 0) {
53 $binary_logs = array();
54 while ($row = PMA_DBI_fetch_array($binlogs)) {
55 $binary_logs[] = $row[0];
59 PMA_DBI_free_result($binlogs);