Latest meaningful use changes
[openemr.git] / phpmyadmin / libraries / display_create_database.lib.php
blobce240a01ccb9225d9e5ccc006e793a3fb554972d
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Displays form for creating database (if user has privileges for that)
6 * @package PhpMyAdmin
7 */
8 if (! defined('PHPMYADMIN')) {
9 exit;
12 /**
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')
24 . '</label>&nbsp;'
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,
36 'db_collation',
37 null,
38 null,
39 true
42 if (! empty($dbstats)) {
43 $html .= '<input type="hidden" name="dbstats" value="1" />';
46 $html .= '<input type="submit" value="' . __('Create') . '" id="buttonGo" />';
47 $html .= '</form>';
48 } else {
49 $html .= '<!-- db creation no privileges message -->';
50 $html .= '<strong>' . __('Create database:') . '&nbsp;'
51 . PMA_Util::showMySQLDocu('CREATE_DATABASE')
52 . '</strong><br />';
54 $html .= '<span class="noPrivileges">'
55 . PMA_Util::getImage(
56 's_error2.png',
57 '',
58 array('hspace' => 2, 'border' => 0, 'align' => 'middle')
60 . '' . __('No Privileges') . '</span>';
61 } // end create db form or message