3 // vim: expandtab sw=4 ts=4 sts=4:
6 * Gets some core libraries
8 if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) {
9 include('./libraries/grab_globals.lib.php3');
11 if (!defined('PMA_COMMON_LIB_INCLUDED')) {
12 include('./libraries/common.lib.php3');
14 if (!defined('PMA_BOOKMARK_LIB_INCLUDED')) {
15 include('./libraries/bookmark.lib.php3');
20 * Defines the urls to return to in case of error in a sql statement
22 $err_url_0 = 'main.php3?' . PMA_generate_common_url();
23 $err_url = $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db);
27 * Ensures the database exists (else move to the "parent" script) and displays
30 if (!isset($is_db) ||
!$is_db) {
31 // Not a valid db name -> back to the welcome page
33 $is_db = @PMA_mysql_select_db
($db);
35 if (empty($db) ||
!$is_db) {
36 header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?' . PMA_generate_common_url('', '', '&') . (isset($message) ?
'&message=' . urlencode($message) : '') . '&reload=1');
39 } // end if (ensures db exists)
41 if (!isset($message)) {
42 $js_to_run = 'functions.js';
43 include('./header.inc.php3');
44 // Reloads the navigation frame via JavaScript if required
45 if (isset($reload) && $reload) {
48 <script type
="text/javascript" language
="javascript1.2">
50 window
.parent
.frames
['nav'].location
.replace('./left.php3?<?php echo PMA_generate_common_url($db, '', '&'); ?>');
57 PMA_showMessage($message);
61 * Set parameters for links
63 $url_query = PMA_generate_common_url($db);