Documentation TYPO3 par Ameos |
00001 <?php 00002 /* $Id: db_create.php,v 2.4 2003/12/11 23:16:22 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 (isset($db_charset) && isset($mysql_charsets) && in_array($db_charset, $mysql_charsets)) { 00028 $sql_query .= ' DEFAULT CHARACTER SET ' . $db_charset; 00029 } 00030 $sql_query .= ';'; 00031 00032 $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, FALSE, $err_url); 00033 00034 00038 $message = $strDatabase . ' ' . htmlspecialchars($db) . ' ' . $strHasBeenCreated; 00039 require_once('./' . $cfg['DefaultTabDatabase']); 00040 00041 ?>