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


PHP PMA_getColumnOrder函数代码示例

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


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

示例1: PMA_getHtmlForDatabase

/**
 * Returns the html for Database List
 *
 * @param Array  $databases         GBI return databases
 * @param int    $databases_count   database count
 * @param int    $pos               display pos
 * @param Array  $dbstats           database status
 * @param string $sort_by           sort by string
 * @param string $sort_order        sort order string
 * @param bool   $is_superuser      User status
 * @param Array  $cfg               configuration
 * @param string $replication_types replication types
 * @param string $replication_info  replication info
 * @param string $url_query         url query
 *
 * @return string
 */
function PMA_getHtmlForDatabase($databases, $databases_count, $pos, $dbstats, $sort_by, $sort_order, $is_superuser, $cfg, $replication_types, $replication_info, $url_query)
{
    $html = '<div id="tableslistcontainer">';
    reset($databases);
    $first_database = current($databases);
    // table col order
    $column_order = PMA_getColumnOrder();
    $_url_params = array('pos' => $pos, 'dbstats' => $dbstats, 'sort_by' => $sort_by, 'sort_order' => $sort_order);
    $html .= PMA_Util::getListNavigator($databases_count, $pos, $_url_params, 'server_databases.php', 'frame_content', $GLOBALS['cfg']['MaxDbList']);
    $_url_params['pos'] = $pos;
    $html .= '<form class="ajax" action="server_databases.php" ';
    $html .= 'method="post" name="dbStatsForm" id="dbStatsForm">' . "\n";
    $html .= PMA_URL_getHiddenInputs($_url_params);
    $_url_params['sort_by'] = 'SCHEMA_NAME';
    $_url_params['sort_order'] = $sort_by == 'SCHEMA_NAME' && $sort_order == 'asc' ? 'desc' : 'asc';
    $html .= '<table id="tabledatabases" class="data">' . "\n" . '<thead>' . "\n" . '<tr>' . "\n";
    $html .= PMA_getHtmlForColumnOrderWithSort($is_superuser, $cfg['AllowUserDropDatabase'], $_url_params, $sort_by, $sort_order, $column_order, $first_database);
    $html .= PMA_getHtmlForReplicationType($is_superuser, $replication_types, $cfg['ActionLinksMode']);
    $html .= '</tr>' . "\n" . '</thead>' . "\n";
    list($output, $column_order) = PMA_getHtmlAndColumnOrderForDatabaseList($databases, $is_superuser, $url_query, $column_order, $replication_types, $replication_info);
    $html .= $output;
    unset($output);
    $html .= PMA_getHtmlForTableFooter($cfg['AllowUserDropDatabase'], $is_superuser, $databases_count, $column_order, $replication_types, $first_database);
    $html .= '</table>' . "\n";
    $html .= PMA_getHtmlForTableFooterButtons($cfg['AllowUserDropDatabase'], $is_superuser, $sort_by, $sort_order, $dbstats);
    if (empty($dbstats)) {
        //we should put notice above database list
        $html = PMA_getHtmlForNoticeEnableStatistics($url_query, $html);
    }
    $html .= '</form>';
    $html .= '</div>';
    return $html;
}
开发者ID:yszar,项目名称:linuxwp,代码行数:50,代码来源:server_databases.lib.php

示例2: testPMA_getColumnOrder

    /**
     * Test for PMA_getColumnOrder
     */
    public function testPMA_getColumnOrder(){

        if (! function_exists('PMA_getServerCollation')) {
            function PMA_getServerCollation()
            {
                return 'footer';
            }
        }

        $this->assertEquals(
            PMA_getColumnOrder(),
            array(
                'DEFAULT_COLLATION_NAME' => array(
                    'disp_name' => __('Collation'),
                    'description_function' => 'PMA_getCollationDescr',
                    'format'    => 'string',
                    'footer'    => 'footer'
                ),
                'SCHEMA_TABLES' => array(
                    'disp_name' => __('Tables'),
                    'format'    => 'number',
                    'footer'    => 0
                ),
                'SCHEMA_TABLE_ROWS' => array(
                    'disp_name' => __('Rows'),
                    'format'    => 'number',
                    'footer'    => 0
                ),
                'SCHEMA_DATA_LENGTH' => array(
                    'disp_name' => __('Data'),
                    'format'    => 'byte',
                    'footer'    => 0
                ),
                'SCHEMA_INDEX_LENGTH' => array(
                    'disp_name' => __('Indexes'),
                    'format'    => 'byte',
                    'footer'    => 0
                ),
                'SCHEMA_LENGTH' => array(
                    'disp_name' => __('Total'),
                    'format'    => 'byte',
                    'footer'    => 0
                ),
                'SCHEMA_DATA_FREE' => array(
                    'disp_name' => __('Overhead'),
                    'format'    => 'byte',
                    'footer'    => 0
                )
            )
        );
    }
开发者ID:rajatsinghal,项目名称:phpmyadmin,代码行数:54,代码来源:PMA_build_html_for_db_test.php

示例3: PMA_getColumnOrder

 /**
  * If in an Ajax request, build the output and send it
  */
 if ($GLOBALS['is_ajax_request'] == true) {
     //Construct the html for the new database, so that it can be appended to
     // the list of databases on server_databases.php
     /**
      * Build the array to be passed to {@link PMA_URL_getCommon}
      * to generate the links
      *
      * @global array $GLOBALS['db_url_params']
      * @name $db_url_params
      */
     $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);
     }
开发者ID:netroby,项目名称:phpmyadmin,代码行数:31,代码来源:db_create.php

示例4: providerForTestBuildHtmlForDb

 /**
  * Data for testBuildHtmlForDb
  *
  * @return array data for testBuildHtmlForDb test case
  */
 public function providerForTestBuildHtmlForDb()
 {
     return array(array(array('SCHEMA_NAME' => 'pma'), true, 'target=main.php', PMA_getColumnOrder(), array('SCHEMA_NAME' => 'pma'), array('pma' => array('status' => 'true', 'Ignore_DB' => array('pma' => 'pma'))), array('<td class="tool">', '<input type="checkbox" name="selected_dbs[]" class="checkall" title="pma" value="pma"')), array(array('SCHEMA_NAME' => 'INFORMATION_SCHEMA'), true, 'target=main.php', PMA_getColumnOrder(), array('SCHEMA_NAME' => 'INFORMATION_SCHEMA'), array('INFORMATION_SCHEMA' => array('status' => 'false', 'Ignore_DB' => array('INFORMATION_SCHEMA' => 'INFORMATION_SCHEMA'))), array('<input type="checkbox" name="selected_dbs[]" class="checkall" title="INFORMATION_SCHEMA" value="INFORMATION_SCHEMA" disabled="disabled"')));
 }
开发者ID:elenacaseyroby,项目名称:MetaphoricalFruit,代码行数:9,代码来源:PMA_build_html_for_db_test.php

示例5: providerForTestBuildHtmlForDb

 /**
  * Data for testBuildHtmlForDb
  *
  * @return array data for testBuildHtmlForDb test case
  */
 public function providerForTestBuildHtmlForDb()
 {
     return array(array(array('SCHEMA_NAME' => 'pma'), true, 'target=main.php', PMA_getColumnOrder(), array('SCHEMA_NAME' => 'pma'), array('pma' => array('status' => 'true', 'Ignore_DB' => array('pma' => 'pma'))), array(array('tag' => 'td', 'attributes' => array('class' => 'tool'), 'child' => array('tag' => 'input', 'attributes' => array('type' => 'checkbox', 'name' => 'selected_dbs[]', 'value' => 'pma'))), array('tag' => 'td', 'attributes' => array('class' => 'name'), 'child' => array('tag' => 'a', 'attributes' => array('title' => 'Jump to database'), 'content' => 'pma')), array('tag' => 'td', 'attributes' => array('class' => 'tool'), 'descendant' => array('tag' => 'img', 'attributes' => array('title' => 'Not replicated'))), array('tag' => 'td', 'attributes' => array('class' => 'tool'), 'child' => array('tag' => 'a', 'child' => array('tag' => 'span', 'child' => array('tag' => 'img', 'attributes' => array('title' => 'Check Privileges'))))))), array(array('SCHEMA_NAME' => 'sakila'), true, 'target=main.php', PMA_getColumnOrder(), array('SCHEMA_NAME' => 'sakila'), array('sakila' => array('status' => 'true', 'Ignore_DB' => array('pma' => 'pma'), 'Do_DB' => array('sakila' => 'sakila'))), array(array('tag' => 'td', 'attributes' => array('class' => 'tool'), 'child' => array('tag' => 'input', 'attributes' => array('type' => 'checkbox', 'name' => 'selected_dbs[]', 'value' => 'sakila'))), array('tag' => 'td', 'attributes' => array('class' => 'tool'), 'descendant' => array('tag' => 'img', 'attributes' => array('title' => 'Replicated'))))), array(array('SCHEMA_NAME' => 'INFORMATION_SCHEMA'), true, 'target=main.php', PMA_getColumnOrder(), array('SCHEMA_NAME' => 'INFORMATION_SCHEMA'), array('INFORMATION_SCHEMA' => array('status' => 'false', 'Ignore_DB' => array('INFORMATION_SCHEMA' => 'INFORMATION_SCHEMA'))), array(array('tag' => 'td', 'attributes' => array('class' => 'tool'), 'child' => array('tag' => 'input', 'attributes' => array('type' => 'checkbox', 'name' => 'selected_dbs[]', 'value' => 'INFORMATION_SCHEMA', 'disabled' => 'disabled'))))));
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:9,代码来源:PMA_build_html_for_db_test.php

示例6: providerForTestBuildHtmlForDb

 /**
  * Data for testBuildHtmlForDb
  *
  * @return array data for testBuildHtmlForDb test case
  */
 public function providerForTestBuildHtmlForDb()
 {
     return array(
         array(
             array('SCHEMA_NAME' => 'pma'),
             true,
             '',
             'target=main.php',
             PMA_getColumnOrder(),
             array(
                 'SCHEMA_NAME' => 'pma',
             ),
             array(
                 'pma' => array(
                     'status' => 'true',
                     'Ignore_DB' => array(
                                     'pma' => 'pma'
                                    ),
                 )
             ),
             '<td class="tool"><input type="checkbox" name="selected_dbs[]" class="checkall" title="pma" value="pma" /></td><td class="name">        <a onclick="if (window.parent.openDb &amp;&amp; window.parent.openDb(\'pma\')) return false;" href="index.php?target=main.php&amp;db=pma" title="Jump to database" target="_parent"> pma</a></td><td class="tool" style="text-align: center;"><span class="nowrap"><img src="theme/s_cancel.png" title="Not replicated" alt="Not replicated" /></span></td><td class="tool"><a onclick="if (window.parent.setDb) window.parent.setDb(\'`pma`\');" href="server_privileges.php?target=main.php&amp;checkprivs=pma" title="Check privileges for database &quot;pma&quot;."> <span class="nowrap"><img src="theme/s_rights.png" title="Check Privileges" alt="Check Privileges" /></span></a></td>'
         )
     );
 }
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:29,代码来源:PMA_build_html_for_db_test.php


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