function createMysqlDb($db_name) { global $language; // Get a connection with the db if (!checkSqlConnection()) { return false; } $query = 'CREATE DATABASE ' . $db_name; // try to create new db if (!mysql_query($query, $GLOBALS['mysql_connection'])) { $GLOBALS['error'] = $language['mysql_no_create_db'] . '<br />' . $language['mysql_error'] . '<br />' . mysql_error($GLOBALS['mysql_connection']); return false; } else { setTmpConfig('db_name', $db_name); } return true; }
function getLanguage() { global $config, $language; $superCage = Inspekt::makeSuperCage(); // try to find the users language if we don't have one defined yet if (!isset($config['lang'])) { include_once 'include/select_lang.inc.php'; setTmpConfig('lang', $USER['lang']); loadTempConfig(); } // change default language if ($lang = $superCage->post->getMatched('lang_list', '/^[a-z0-9_-]+$/i')) { setTmpConfig('lang', $lang[0]); loadTempConfig(); } if ($language == '') { include 'lang/english.php'; $lang_en = $lang_install; $lang_en_versioncheck = $lang_versioncheck_php; if (isset($config['lang']) && file_exists('lang/' . $config['lang'] . '.php')) { // include this lang include 'lang/' . $config['lang'] . '.php'; } // provide fallback $language = array_merge($lang_en, $lang_install); $language['versioncheck'] = isset($lang_versioncheck_php) ? $lang_versioncheck_php : $lang_en_versioncheck; } return $language; }