' . $lang['L_TOOLS'] . ''; if (isset($_POST['dbdosubmit'])) { $newname=$_POST['newname']; $db_index=$_POST['db_index']; $db_action=$_POST['db_action']; $changed=false; $ausgabe=$out=""; switch ($db_action) { case "drop": if (MSD_DoSQL("DROP DATABASE `" . $databases['Name'][$db_index] . "`")) { echo SQLOutput($out,'
' . $lang['L_DB'] . ' `' . $databases['Name'][$db_index] . '` ' . $lang['L_SQL_DELETED'] . '
'); $changed=true; } break; case "empty": EmptyDB($databases['Name'][$db_index]); echo SQLOutput($out,'' . $lang['L_DB'] . ' `' . $databases['Name'][$db_index] . '` ' . $lang['L_SQL_WASEMPTIED'] . '.
'); break; case "rename": $dbold=$databases['Name'][$db_index]; if (DB_Copy($dbold,$newname,1)) { echo SQLOutput($out,'' . $lang['L_DB'] . ' `' . $dbold . '` ' . $lang['L_SQL_RENAMEDTO'] . ' `' . $newname . '`.
'); $changed=true; } break; case "copy": $dbold=$databases['Name'][$db_index]; if (DB_Copy($dbold,$newname)) { $changed=true; echo SQLOutput($out,'' . sprintf($lang['L_SQL_DBCOPY'],$dbold,$newname) . '
'); } break; case "structure": if (DB_Copy($databases['Name'][$db_index],$newname,0,0)) { $changed=true; echo SQLOutput($out,'' . sprintf($lang['L_SQL_DBSCOPY'],$databases['Name'][$db_index],$newname) . '
'); } break; case "rights": break; } if ($changed==true) { SetDefault(); include ( $config['files']['parameter'] ); echo ''; } } if (isset($_POST['dbwantaction'])) { if (isset($_POST['db_createnew'])) { $newname=trim($_POST['db_create']); if (!empty($newname)) { $sqlc="CREATE DATABASE `$newname`"; $col=( MSD_NEW_VERSION ) ? $_POST['db_collate'] : ""; if (isset($_POST['db_default_charset']) && intval(substr(MSD_NEW_VERSION,0,1)) > 3) { $db_default_charset_string=$config['mysql_possible_character_sets'][$_POST['db_default_charset']]; $db_default_charset=explode(' ',$db_default_charset_string); if (isset($db_default_charset[0])) $sqlc.=' DEFAULT CHARACTER SET `' . $db_default_charset[0] . '`'; } $db_default_collation=@explode('|',$col); if (isset($db_default_collation[1])) $sqlc.=' COLLATE `' . $db_default_collation[1] . '`'; if (MSD_query($sqlc)) { echo $lang['L_DB'] . " `$newname` " . $lang['L_SQL_WASCREATED'] . ".