[ Index ] |
|
Code source de phpMyAdmin 2.10.3 |
1 <?php 2 /* $Id: db_common.inc.php 9602 2006-10-25 12:25:01Z nijel $ */ 3 // vim: expandtab sw=4 ts=4 sts=4: 4 5 /** 6 * Gets some core libraries 7 */ 8 require_once ('./libraries/common.lib.php'); 9 require_once ('./libraries/bookmark.lib.php'); 10 11 PMA_checkParameters(array('db')); 12 13 $is_show_stats = $cfg['ShowStats']; 14 15 if ( PMA_MYSQL_INT_VERSION >= 50002 && $db == 'information_schema' ) { 16 $is_show_stats = false; 17 $db_is_information_schema = true; 18 } else { 19 $db_is_information_schema = false; 20 } 21 22 /** 23 * Defines the urls to return to in case of error in a sql statement 24 */ 25 $err_url_0 = 'main.php?' . PMA_generate_common_url(); 26 $err_url = $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db); 27 28 29 /** 30 * Ensures the database exists (else move to the "parent" script) and displays 31 * headers 32 */ 33 if (!isset($is_db) || !$is_db) { 34 // Not a valid db name -> back to the welcome page 35 if (isset($db) && strlen($db)) { 36 $is_db = PMA_DBI_select_db($db); 37 } 38 if (!isset($db) || !strlen($db) || !$is_db) { 39 PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . 'main.php?' . PMA_generate_common_url('', '', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); 40 exit; 41 } 42 } // end if (ensures db exists) 43 44 /** 45 * Changes database charset if requested by the user 46 */ 47 if (isset($submitcollation) && !empty($db_collation) && PMA_MYSQL_INT_VERSION >= 40101) { 48 list($db_charset) = explode('_', $db_collation); 49 $sql_query = 'ALTER DATABASE ' . PMA_backquote($db) . ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation); 50 $result = PMA_DBI_query($sql_query); 51 $message = $strSuccess; 52 unset($db_charset, $db_collation); 53 } 54 55 $js_to_run = 'functions.js'; 56 require_once ('./libraries/header.inc.php'); 57 58 /** 59 * Set parameters for links 60 */ 61 $url_query = PMA_generate_common_url($db); 62 63 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 15:18:20 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |