home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / phpMyAdmin / libraries / display_create_database.lib.php < prev    next >
Encoding:
PHP Script  |  2008-06-23  |  1.7 KB  |  44 lines

  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)
  5.  *
  6.  * @version $Id: display_create_database.lib.php 11326 2008-06-17 21:32:48Z lem9 $
  7.  */
  8. if (! defined('PHPMYADMIN')) {
  9.     exit;
  10. }
  11.  
  12. /**
  13.  *
  14.  */
  15. require_once './libraries/check_user_privileges.lib.php';
  16.  
  17. if ($is_create_db_priv) {
  18.     // The user is allowed to create a db
  19.     ?>
  20.         <form method="post" action="db_create.php"><b>
  21.             <?php echo '<label for="text_create_db">' . $strCreateNewDatabase . '</label> ' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></b><br />
  22.             <?php echo PMA_generate_common_hidden_inputs('', '', 5); ?>
  23.             <input type="hidden" name="reload" value="1" />
  24.             <input type="text" name="db" value="<?php echo $db_to_create; ?>" maxlength="64" class="textfield" id="text_create_db"/>
  25.             <?php
  26.     if (PMA_MYSQL_INT_VERSION >= 40101) {
  27.         require_once './libraries/mysql_charsets.lib.php';
  28.         echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', null, null, TRUE, 5);
  29.     }
  30.             ?>
  31.             <input type="submit" value="<?php echo $strCreate; ?>" id="buttonGo" />
  32.         </form>
  33.     <?php
  34. } else {
  35.     ?>
  36.     <!-- db creation no privileges message -->
  37.         <b><?php echo $strCreateNewDatabase . ': ' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></b><br />
  38.         <?php
  39.               echo '<span class="noPrivileges">'
  40.                  . ($cfg['ErrorIconic'] ? '<img src="' . $pmaThemeImage . 's_error2.png" width="11" height="11" hspace="2" border="0" align="middle" />' : '')
  41.                  . '' . $strNoPrivileges .'</span>';
  42. } // end create db form or message
  43. ?>
  44.