当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_buildHtmlForDb函数代码示例

本文整理汇总了PHP中PMA_buildHtmlForDb函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_buildHtmlForDb函数的具体用法?PHP PMA_buildHtmlForDb怎么用?PHP PMA_buildHtmlForDb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PMA_buildHtmlForDb函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testBuildHtmlForDb

 /**
  * Test for PMA_buildHtmlForDb
  *
  * @param array   $current           Current
  * @param boolean $is_superuser      Is superuser
  * @param string  $url_query         URL query
  * @param array   $column_order      Column order
  * @param array   $replication_types Replication types
  * @param array   $replication_info  Replication info
  * @param array   $tags              Tags
  *
  * @return void
  * @dataProvider providerForTestBuildHtmlForDb
  *
  * @group medium
  */
 public function testBuildHtmlForDb($current, $is_superuser, $url_query, $column_order, $replication_types, $replication_info, $html_segments)
 {
     $result = PMA_buildHtmlForDb($current, $is_superuser, $url_query, $column_order, $replication_types, $replication_info);
     $this->assertEquals($column_order, $result[0]);
     foreach ($html_segments as $html_segment) {
         $this->assertContains($html_segment, $result[1]);
     }
 }
开发者ID:elenacaseyroby,项目名称:MetaphoricalFruit,代码行数:24,代码来源:PMA_build_html_for_db_test.php

示例2: testBuildHtmlForDb

 /**
  * Test for PMA_buildHtmlForDb
  *
  * @param array   $current           Current
  * @param boolean $is_superuser      Is superuser
  * @param string  $url_query         URL query
  * @param array   $column_order      Column order
  * @param array   $replication_types Replication types
  * @param array   $replication_info  Replication info
  * @param array   $tags              Tags
  *
  * @return void
  * @dataProvider providerForTestBuildHtmlForDb
  *
  * @group medium
  */
 public function testBuildHtmlForDb($current, $is_superuser, $url_query, $column_order, $replication_types, $replication_info, $tags)
 {
     $result = PMA_buildHtmlForDb($current, $is_superuser, $url_query, $column_order, $replication_types, $replication_info);
     $this->assertEquals($column_order, $result[0]);
     foreach ($tags as $value) {
         $this->assertTag($value, $result[1]);
     }
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:24,代码来源:PMA_build_html_for_db_test.php

示例3: PMA_getColumnOrder

         */
        $db_url_params['db'] = $_POST['new_db'];
        $is_superuser = $GLOBALS['dbi']->isSuperuser();
        $column_order = PMA_getColumnOrder();
        $url_query = PMA_URL_getCommon(array('db' => $_POST['new_db']));
        /**
         * String that will contain the output HTML
         * @name    $new_db_string
         */
        $new_db_string = '<tr>';
        if (empty($db_collation_for_ajax)) {
            $db_collation_for_ajax = PMA_getServerCollation();
        }
        // $dbstats comes from the create table dialog
        if (!empty($dbstats)) {
            $current = array('SCHEMA_NAME' => $_POST['new_db'], 'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax, 'SCHEMA_TABLES' => '0', 'SCHEMA_TABLE_ROWS' => '0', 'SCHEMA_DATA_LENGTH' => '0', 'SCHEMA_MAX_DATA_LENGTH' => '0', 'SCHEMA_INDEX_LENGTH' => '0', 'SCHEMA_LENGTH' => '0', 'SCHEMA_DATA_FREE' => '0');
        } else {
            $current = array('SCHEMA_NAME' => $_POST['new_db'], 'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax);
        }
        list($column_order, $generated_html) = PMA_buildHtmlForDb($current, $is_superuser, $url_query, $column_order, $replication_types, $GLOBALS['replication_info']);
        $new_db_string .= $generated_html;
        $new_db_string .= '</tr>';
        $response = PMA\libraries\Response::getInstance();
        $response->addJSON('message', $message);
        $response->addJSON('new_db_string', $new_db_string);
        $response->addJSON('sql_query', PMA\libraries\Util::getMessage(null, $sql_query, 'success'));
        $response->addJSON('url_query', PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . $url_query . '&amp;db=' . urlencode($current['SCHEMA_NAME']));
    } else {
        include_once '' . $cfg['DefaultTabDatabase'];
    }
}
开发者ID:netroby,项目名称:phpmyadmin,代码行数:31,代码来源:db_create.php

示例4: PMA_getHtmlAndColumnOrderForDatabaseList

/**
 * Returns the html for Database List and Column order
 *
 * @param array  $databases         GBI return databases
 * @param bool   $is_superuser      User status
 * @param Array  $url_query         Url query
 * @param string $column_order      column order
 * @param string $replication_types replication types
 * @param string $replication_info  replication info
 *
 * @return Array
 */
function PMA_getHtmlAndColumnOrderForDatabaseList($databases, $is_superuser, $url_query, $column_order, $replication_types, $replication_info)
{
    $odd_row = true;
    $html = '<tbody>' . "\n";
    foreach ($databases as $current) {
        $tr_class = $odd_row ? 'odd' : 'even';
        if ($GLOBALS['dbi']->isSystemSchema($current['SCHEMA_NAME'], true)) {
            $tr_class .= ' noclick';
        }
        $html .= '<tr class="' . $tr_class . '">' . "\n";
        $odd_row = !$odd_row;
        list($column_order, $generated_html) = PMA_buildHtmlForDb($current, $is_superuser, $url_query, $column_order, $replication_types, $replication_info);
        $html .= $generated_html;
        $html .= '</tr>' . "\n";
    }
    // end foreach ($databases as $key => $current)
    unset($current, $odd_row);
    $html .= '</tbody>';
    return array($html, $column_order);
}
开发者ID:yszar,项目名称:linuxwp,代码行数:32,代码来源:server_databases.lib.php

示例5: elseif

     } elseif ($type == "slave") {
         $name = __('Slave replication');
     }
     if (${"server_{$type}_status"}) {
         echo '    <th>' . $name . '</th>' . "\n";
     }
 }
 if ($is_superuser) {
     echo '    <th>' . ($cfg['PropertiesIconic'] ? '' : __('Action')) . "\n" . '    </th>' . "\n";
 }
 echo '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n";
 $odd_row = true;
 foreach ($databases as $current) {
     echo '<tr class="' . ($odd_row ? 'odd' : 'even') . '">' . "\n";
     $odd_row = !$odd_row;
     list($column_order, $generated_html) = PMA_buildHtmlForDb($current, $is_superuser, isset($checkall) ? $checkall : '', $url_query, $column_order, $replication_types, $replication_info);
     echo $generated_html;
     echo '</tr>' . "\n";
 }
 // end foreach ($databases as $key => $current)
 unset($current, $odd_row);
 echo '<tr id="db_summary_row">' . "\n";
 if ($is_superuser || $cfg['AllowUserDropDatabase']) {
     echo '    <th></th>' . "\n";
 }
 echo '    <th>' . __('Total') . ': <span id="databases_count">' . $databases_count . '</span></th>' . "\n";
 foreach ($column_order as $stat_name => $stat) {
     if (array_key_exists($stat_name, $first_database)) {
         if ($stat['format'] === 'byte') {
             list($value, $unit) = PMA_formatByteDown($stat['footer'], 3, 1);
         } elseif ($stat['format'] === 'number') {
开发者ID:hackdracko,项目名称:envasadoras,代码行数:31,代码来源:server_databases.php

示例6: testBuildHtmlForDb

 /**
  * Test for PMA_buildHtmlForDb
  *
  * @param array   $current
  * @param boolean $is_superuser
  * @param string  $checkall
  * @param string  $url_query
  * @param array   $column_order
  * @param array   $replication_types
  * @param array   $replication_info
  * @param string  $output
  *
  * @return void
  * @dataProvider providerForTestBuildHtmlForDb
  *
  * @group medium
  */
 public function testBuildHtmlForDb($current, $is_superuser, $checkall,
     $url_query, $column_order, $replication_types, $replication_info, $output
 ) {
     $this->assertEquals(
         array($column_order, $output),
         PMA_buildHtmlForDb(
             $current, $is_superuser, $checkall, $url_query,
             $column_order, $replication_types, $replication_info
         )
     );
 }
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:28,代码来源:PMA_build_html_for_db_test.php

示例7: testPMA_buildHtmlForDb

    /**
     * Test for PMA_buildHtmlForDb
     *
     * @param array   $current
     * @param boolean $is_superuser
     * @param string  $checkall
     * @param string  $url_query
     * @param array   $column_order
     * @param array   $replication_types
     * @param array   $replication_info
     * @param $output
     *
     * @dataProvider providerForTestPMA_buildHtmlForDb
     *
     * @group medium
     */
    public function testPMA_buildHtmlForDb($current, $is_superuser, $checkall, $url_query,$column_order, $replication_types, $replication_info, $output){

        if (! function_exists('PMA_is_system_schema')) {
            function PMA_is_system_schema()
            {
                return false;
            }
        }
        if (! function_exists('p')) {
            function p()
            {
                return;
            }
        }
        if (! defined('PMA_DRIZZLE')) {
            define('PMA_DRIZZLE', false);
        }

        $GLOBALS['cfg']['PropertiesIconic'] = true;
        $_SESSION['PMA_Theme'] = new PMA_Theme();
        $GLOBALS['pmaThemeImage'] = '';

        $this->assertEquals(
            PMA_buildHtmlForDb($current, $is_superuser, $checkall, $url_query,
                $column_order, $replication_types, $replication_info),
            $output
        );
    }
开发者ID:rajatsinghal,项目名称:phpmyadmin,代码行数:44,代码来源:PMA_build_html_for_db_test.php


注:本文中的PMA_buildHtmlForDb函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。