コード例 #1
0
    /**
     * Test for PMA_getHtmlForDatabaseComment
     *
     * @return void
     */
    public function testGetHtmlForDatabaseComment()
    {

        $this->assertRegExp(
            '/.*db_operations.php(.|[\n])*Database comment.*name="comment"([\n]|.)*/m',
            PMA_getHtmlForDatabaseComment("pma")
        );
    }
コード例 #2
0
$sub_part = '_structure';
list($tables, $num_tables, $total_num_tables, $sub_part, $is_show_stats, $db_is_system_schema, $tooltip_truename, $tooltip_aliasname, $pos) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
echo "\n";
if (isset($message)) {
    echo PMA\libraries\Util::getMessage($message, $sql_query);
    unset($message);
}
$_REQUEST['db_collation'] = PMA_getDbCollation($GLOBALS['db']);
$is_information_schema = $GLOBALS['dbi']->isSystemSchema($GLOBALS['db']);
$response->addHTML('<div id="boxContainer" data-box-width="300">');
if (!$is_information_schema) {
    if ($cfgRelation['commwork']) {
        /**
         * database comment
         */
        $response->addHTML(PMA_getHtmlForDatabaseComment($GLOBALS['db']));
    }
    $response->addHTML('<div class="operations_half_width">');
    $response->addHTML(PMA_getHtmlForCreateTable($db));
    $response->addHTML('</div>');
    /**
     * rename database
     */
    if ($GLOBALS['db'] != 'mysql') {
        $response->addHTML(PMA_getHtmlForRenameDatabase($GLOBALS['db']));
    }
    // Drop link if allowed
    // Don't even try to drop information_schema.
    // You won't be able to. Believe me. You won't.
    // Don't allow to easily drop mysql database, RFE #1327514.
    if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) && !$db_is_system_schema && $GLOBALS['db'] != 'mysql') {
コード例 #3
0
$sub_part = '_structure';
require 'libraries/db_info.inc.php';
echo "\n";
if (isset($message)) {
    echo PMA_Util::getMessage($message, $sql_query);
    unset($message);
}
$_REQUEST['db_collation'] = PMA_getDbCollation($db);
$is_information_schema = $GLOBALS['dbi']->isSystemSchema($db);
$response->addHTML('<div id="boxContainer" data-box-width="300">');
if (!$is_information_schema) {
    if ($cfgRelation['commwork']) {
        /**
         * database comment
         */
        $response->addHTML(PMA_getHtmlForDatabaseComment($db));
    }
    $response->addHTML('<div class="operations_half_width">');
    ob_start();
    include 'libraries/display_create_table.lib.php';
    $content = ob_get_contents();
    ob_end_clean();
    $response->addHTML($content);
    $response->addHTML('</div>');
    /**
     * rename database
     */
    if ($db != 'mysql') {
        $response->addHTML(PMA_getHtmlForRenameDatabase($db));
    }
    // Drop link if allowed