\n"; echo "\n"; echo "\t\n"; echo "\t
".$clang->gT("Create Database")."
$setfont\n"; // In Step2 fill the database with data if (returnglobal('createdbstep2')==$clang->gT("Populate Database")) { if ($databasetype=='mysql') {@$connect->Execute("ALTER DATABASE `$dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;");} //Set the collation also for manually created DBs if (modify_database(dirname(__FILE__).'/create-'.$databasetype.'.sql')) { echo sprintf($clang->gT("Database `%s` has been successfully populated."),$dbname)."

\n"; echo ""; exit; } else { echo $modifyoutput; echo"Error"; } } if (!$dbname) { echo "
$setfont".$clang->gT("Error")."
\n"; echo $clang->gT("Database Information not provided. This script must be run from admin.php only."); echo "

\n"; echo ""; exit; } if (!$database_exists) //Database named in config-defaults.php does not exist { // TODO SQL: Portable to other databases?? switch ($databasetype) { case 'mysql': $createDb=$connect->Execute("CREATE DATABASE `$dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci"); break; case 'odbc_mssql': case 'mssql': $createDb=$connect->Execute("CREATE DATABASE [$dbname];"); break; default: $createDb=$connect->Execute("CREATE DATABASE $dbname"); } if ($createDb) //Database has been successfully created { $connect->database = $dbname; $connect->Execute("USE DATABASE `$dbname`"); echo "
$setfont\n"; echo $clang->gT("Database has been created.")."

\n"; echo $clang->gT("Please click below to populate the database")."

\n"; echo "
"; echo "
"; } else { echo "$setfont".$clang->gT("Error")."
\n"; echo $clang->gT("Could not create database")." ($dbname)
\n"; echo $connect->ErrorMsg(); echo "

\n"; echo ""; } } echo "
\n"; ?>