2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays form for creating database (if user has privileges for that)
8 if (! defined('PHPMYADMIN')) {
15 require_once './libraries/check_user_privileges.lib.php';
17 if ($is_create_db_priv) {
18 // The user is allowed to create a db
19 $html .= '<form method="post" action="db_create.php"'
20 . ' id="create_database_form" class="ajax"><strong>';
21 $html .= '<label for="text_create_db">'
22 . PMA_Util
::getImage('b_newdb.png')
23 . " " . __('Create database')
25 . PMA_Util
::showMySQLDocu('CREATE_DATABASE');
26 $html .= '</strong><br />';
27 $html .= PMA_URL_getHiddenInputs('', '', 5);
28 $html .= '<input type="hidden" name="reload" value="1" />';
29 $html .= '<input type="text" name="new_db" value="' . $db_to_create
30 . '" maxlength="64" class="textfield" id="text_create_db" '
31 . 'required placeholder="' . __('Database name') . '"/>';
33 include_once './libraries/mysql_charsets.inc.php';
34 $html .= PMA_generateCharsetDropdownBox(
35 PMA_CSDROPDOWN_COLLATION
,
42 if (! empty($dbstats)) {
43 $html .= '<input type="hidden" name="dbstats" value="1" />';
46 $html .= '<input type="submit" value="' . __('Create') . '" id="buttonGo" />';
49 $html .= '<!-- db creation no privileges message -->';
50 $html .= '<strong>' . __('Create database:') . ' '
51 . PMA_Util
::showMySQLDocu('CREATE_DATABASE')
54 $html .= '<span class="noPrivileges">'
58 array('hspace' => 2, 'border' => 0, 'align' => 'middle')
60 . '' . __('No Privileges') . '</span>';
61 } // end create db form or message