' . $lang['L_TOOLS'] . ''; if (isset($_POST['dbdosubmit'])) { $newname=$_POST['newname']; $db_index=$_POST['db_index']; echo "
Db-Index:" . $_GET['db_index']; $db_action=$_POST['db_action']; $changed=false; $ausgabe=$out=""; switch ($db_action) { case "drop": MSD_DoSQL("DROP DATABASE `" . $databases['Name'][$db_index] . "`"); echo SQLOutput($out,'

' . $lang['L_DB'] . ' `' . $databases['Name'][$db_index] . '` wurde gelöscht.

'); $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]; 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]; DB_Copy($dbold,$newname); $changed=true; echo SQLOutput($out,'

' . sprintf($lang['L_SQL_DBCOPY'],$dbold,$newname) . '

'); break; case "structure": 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] . '`'; MSD_query($sqlc); echo $lang['L_DB'] . " `$newname` " . $lang['L_SQL_WASCREATED'] . ".
"; SetDefault(); include ( $config['files']['parameter'] ); echo ''; } } $db_action=$newname=""; $db_index=-1; for ($i=0; $i < count($databases['Name']); $i++) { if (isset($_POST['db_do_' . $i])) { $newname=$_POST['db_rename' . $i]; $db_index=$i; $db_action=$_POST['db_do_action_' . $i]; break; } } if ($db_action != "") { echo '
'; echo '
'; switch ($db_action) { case "drop": echo '' . sprintf($lang['L_ASKDBDELETE'],$databases['Name'][$i]) . '

'; echo ''; break; case "empty": echo '' . sprintf($lang['L_ASKDBEMPTY'],$databases['Name'][$i]) . '

'; echo ''; break; case "rename": echo '' . $lang['L_SQL_RENAMEDB'] . ' `' . $databases['Name'][$db_index] . '` ' . $lang['L_IN'] . ' `' . $newname . '`

'; echo ''; break; case "copy": echo '' . sprintf($lang['L_ASKDBCOPY'],$databases['Name'][$db_index],$newname) . '

'; if ($newname == "") echo '

' . $lang['L_SQL_NAMEDEST_MISSING'] . '

'; else { echo ''; } break; case "structure": echo '' . $lang['L_FM_ASKDBCOPY1'] . '`' . $databases['Name'][$db_index] . '`' . $lang['L_FM_ASKDBCOPY2'] . '`' . $newname . '`' . $lang['L_FM_ASKDBCOPY3'] . '

'; if ($newname == "") echo '

' . $lang['L_SQL_NAMEDEST_MISSING'] . '

'; else { echo ''; } break; case "rights": break; } echo '

'; } } echo '
'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
' . $lang['L_CREATE_DATABASE'] . '
Name:
' . $lang['L_DEFAULT_CHARSET'] . ':
' . $lang['L_COLLATION'] . '
'; echo '
'; echo ''; for ($i=0; $i < count($databases['Name']); $i++) { $cl=( $i % 2 ) ? "dbrow" : "dbrow1"; echo ( $i == $databases['db_selected_index'] ) ? '' : ''; echo ''; echo ''; } echo '
' . $lang['L_DBS'] . '' . $lang['L_SQL_ACTIONS'] . '
' . $databases['Name'][$i] . ''; echo '  '; echo "\n\n" . '  '; echo '  
';