Documentation TYPO3 par Ameos |
00001 <?php 00002 /* $Id: db_create.php,v 2.8 2004/04/17 03:06:53 rabus Exp $ */ 00003 // vim: expandtab sw=4 ts=4 sts=4: 00004 00005 00009 require_once('./libraries/grab_globals.lib.php'); 00010 $js_to_run = 'functions.js'; 00011 require_once('./header.inc.php'); 00012 require_once('./libraries/common.lib.php'); 00013 require_once('./libraries/mysql_charsets.lib.php'); 00014 00015 00016 PMA_checkParameters(array('db')); 00017 00021 $err_url = 'main.php?' . PMA_generate_common_url(); 00022 00026 $sql_query = 'CREATE DATABASE ' . PMA_backquote($db); 00027 if (!empty($db_collation) && PMA_MYSQL_INT_VERSION >= 40101) { 00028 list($db_charset) = explode('_', $db_collation); 00029 if (in_array($db_charset, $mysql_charsets) && in_array($db_collation, $mysql_collations[$db_charset])) { 00030 $sql_query .= ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation); 00031 } 00032 unset($db_charset, $db_collation); 00033 } 00034 $sql_query .= ';'; 00035 00036 $result = PMA_DBI_query($sql_query); 00037 00038 00042 $message = $strDatabase . ' ' . htmlspecialchars($db) . ' ' . $strHasBeenCreated; 00043 require_once('./' . $cfg['DefaultTabDatabase']); 00044 00045 ?>