diff options
author | ninadsp <ninadsp16289@gmail.com> | 2010-08-03 21:58:31 +0400 |
---|---|---|
committer | ninadsp <ninadsp16289@gmail.com> | 2010-08-03 21:58:31 +0400 |
commit | b99bad8cdd6430e2dc7b4a45b28b758044bed700 (patch) | |
tree | 42e6846a96e9c1f151ce4aad7f7386840f437477 /db_create.php | |
parent | ab16573b34a4a2cc80f3a4a99420aed5300610f5 (diff) |
Almost completed appending of newly created database to the database table. Still need to get db statistics
Diffstat (limited to 'db_create.php')
-rwxr-xr-x | db_create.php | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/db_create.php b/db_create.php index debf68aeaf..db4f090acd 100755 --- a/db_create.php +++ b/db_create.php @@ -54,7 +54,45 @@ if (! $result) { $GLOBALS['db'] = $new_db; if($GLOBALS['is_ajax_request'] == true) { - PMA_ajaxResponse($message, true); + + $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query, 'success'); + + //Construct the html for the new database, so that it can be appended to the list of databases on server_databases.php + + $db_url_params['db'] = $new_db; + + $is_superuser = PMA_isSuperuser(); + + $new_db_string = '<tr>'; + + if ($is_superuser || $cfg['AllowUserDropDatabase']) { + $new_db_string .= '<td class="tool">'; + $new_db_string .= '<input type="checkbox" title="'. $new_db .'" value="' . $new_db . '" name="selected_dbsp[]" />'; + $new_db_string .='</td>'; + } + + $new_db_string .= '<td class="name">'; + $new_db_string .= '<a target="_parent" title="Jump to database" href="index.php' . PMA_generate_common_url($db_url_params) . '">'; + $new_db_string .= $new_db . '</a>'; + $new_db_string .= '</td>'; + + if($is_superuser) { + + $db_url_params['checkprivs'] = $new_db; + + $new_db_string .= '<td class="tool">'; + $new_db_string .= '<a title="Check privileges for database" href="server_privileges.php' . PMA_generate_common_url($db_url_params) . '">'; + $new_db_string .= ($cfg['PropertiesIconic'] + ? '<img class="icon" src="' . $pmaThemeImage . 's_rights.png" width="16" height="16" alt=" ' . __('Check Privileges') . '" /> ' + : __('Check Privileges')) . '</a>'; + $new_db_string .= '</td>'; + } + + $new_db_string .= '</tr>'; + + $extra_data['new_db_string'] = $new_db_string; + + PMA_ajaxResponse($message, true, $extra_data); } require_once './libraries/header.inc.php'; |