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


PHP PMA_Index::getHtmlForIndexes方法代码示例

本文整理汇总了PHP中PMA_Index::getHtmlForIndexes方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Index::getHtmlForIndexes方法的具体用法?PHP PMA_Index::getHtmlForIndexes怎么用?PHP PMA_Index::getHtmlForIndexes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMA_Index的用法示例。


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

示例1: PMA_getHtmlForDisplayIndexes

/**
 * Get HTML for display indexes
 *
 * @return string $html_output
 */
function PMA_getHtmlForDisplayIndexes()
{
    $html_output = '<div id="index_div" class="ajax';
    if ($GLOBALS['cfg']['InitialSlidersState'] != 'disabled') {
        $html_output .= ' print_ignore';
    }
    $html_output .= '" >';
    $html_output .= PMA_Util::getDivForSliderEffect('indexes', __('Indexes'));
    $html_output .= PMA_Index::getHtmlForIndexes($GLOBALS['table'], $GLOBALS['db']);
    $html_output .= '<fieldset class="tblFooters print_ignore" style="text-align: ' . 'left;"><form action="tbl_indexes.php" method="post">';
    $html_output .= PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
    $html_output .= sprintf(__('Create an index on &nbsp;%s&nbsp;columns'), '<input type="number" name="added_fields" value="1" ' . 'min="1" required="required" />');
    $html_output .= '<input type="hidden" name="create_index" value="1" />' . '<input class="add_index ajax"' . ' type="submit" value="' . __('Go') . '" />';
    $html_output .= '</form>' . '</fieldset>' . '</div>' . '</div>';
    return $html_output;
}
开发者ID:FuhrerMalkovich,项目名称:Blogpost,代码行数:21,代码来源:index.lib.php

示例2:

$response->addHTML('<div id="structure-action-links">');
if ($tbl_is_view) {
    $response->addHTML(PMA_getHtmlForEditView($url_params));
}
$response->addHTML(PMA_getHtmlForOptionalActionLinks($url_query, $tbl_is_view, $db_is_system_schema));
$response->addHTML('</div>');
if (!$tbl_is_view && !$db_is_system_schema) {
    $response->addHTML('<br />');
    $response->addHTML(PMA_getHtmlForAddColumn($columns_list));
}
/**
 * Displays indexes
 */
if (!$tbl_is_view && !$db_is_system_schema && 'ARCHIVE' != $tbl_storage_engine) {
    //return the list of index
    $response->addJSON('indexes_list', PMA_Index::getHtmlForIndexes($GLOBALS['table'], $GLOBALS['db']));
    $response->addHTML(PMA_getHtmlForDisplayIndexes());
}
/**
 * Displays Space usage and row statistics
 */
// BEGIN - Calc Table Space
// Get valid statistics whatever is the table type
if ($cfg['ShowStats']) {
    //get table stats in HTML format
    $tablestats = PMA_getHtmlForDisplayTableStats($showtable, $table_info_num_rows, $tbl_is_view, $db_is_system_schema, $tbl_storage_engine, $url_query, $tbl_collation);
    //returning the response in JSON format to be used by Ajax
    $response->addJSON('tableStat', $tablestats);
    $response->addHTML($tablestats);
}
// END - Calc Table Space
开发者ID:hewenhao2008,项目名称:phpmyadmin,代码行数:31,代码来源:display_structure.inc.php

示例3: htmlspecialchars

            echo '</td>' . "\n";
        }
        echo '    <td>';
        if (isset($comments[$column_name])) {
            echo htmlspecialchars($comments[$column_name]);
        }
        echo '</td>' . "\n";
        if ($cfgRelation['mimework']) {
            $mime_map = PMA_getMIME($db, $table, true);
            echo '    <td>';
            if (isset($mime_map[$column_name])) {
                echo htmlspecialchars(str_replace('_', '/', $mime_map[$column_name]['mimetype']));
            }
            echo '</td>' . "\n";
        }
        echo '</tr>';
    }
    // end foreach
    $count++;
    echo '</table>';
    // display indexes information
    if (count(PMA_Index::getFromTable($table, $db)) > 0) {
        echo PMA_Index::getHtmlForIndexes($table, $db, true);
    }
    echo '</div>';
}
//ends main while
/**
 * Displays the footer
 */
echo PMA_Util::getButton();
开发者ID:FuhrerMalkovich,项目名称:Blogpost,代码行数:31,代码来源:db_datadict.php

示例4: PMA_executeTheQuery

/**
 * Function to handle all aspects relating to executing the query
 *
 * @param array   $analyzed_sql_results   analyzed sql results
 * @param String  $full_sql_query         full sql query
 * @param boolean $is_gotofile            whether to go to a file
 * @param String  $db                     current database
 * @param String  $table                  current table
 * @param boolean $find_real_end          whether to find the real end
 * @param String  $sql_query_for_bookmark sql query to be stored as bookmark
 * @param array   $extra_data             extra data
 *
 * @return mixed
 */
function PMA_executeTheQuery($analyzed_sql_results, $full_sql_query, $is_gotofile, $db, $table, $find_real_end, $sql_query_for_bookmark, $extra_data)
{
    $response = PMA_Response::getInstance();
    $response->getHeader()->getMenu()->setTable($table);
    // Only if we ask to see the php code
    if (isset($GLOBALS['show_as_php'])) {
        $result = null;
        $num_rows = 0;
        $unlim_num_rows = 0;
    } else {
        // If we don't ask to see the php code
        if (isset($_SESSION['profiling']) && PMA_Util::profilingSupported()) {
            $GLOBALS['dbi']->query('SET PROFILING=1;');
        }
        $result = PMA_executeQueryAndStoreResults($full_sql_query);
        // Displays an error message if required and stop parsing the script
        $error = $GLOBALS['dbi']->getError();
        if ($error) {
            PMA_handleQueryExecuteError($is_gotofile, $error, $full_sql_query);
        }
        // If there are no errors and bookmarklabel was given,
        // store the query as a bookmark
        if (!empty($_POST['bkm_label']) && !empty($sql_query_for_bookmark)) {
            $cfgBookmark = PMA_Bookmark_getParams();
            PMA_storeTheQueryAsBookmark($db, $cfgBookmark['user'], $sql_query_for_bookmark, $_POST['bkm_label'], isset($_POST['bkm_replace']) ? $_POST['bkm_replace'] : null);
        }
        // end store bookmarks
        // Gets the number of rows affected/returned
        // (This must be done immediately after the query because
        // mysql_affected_rows() reports about the last query done)
        $num_rows = PMA_getNumberOfRowsAffectedOrChanged($analyzed_sql_results['is_affected'], $result);
        // Grabs the profiling results
        if (isset($_SESSION['profiling']) && PMA_Util::profilingSupported()) {
            $profiling_results = $GLOBALS['dbi']->fetchResult('SHOW PROFILE;');
        }
        $justBrowsing = PMA_isJustBrowsing($analyzed_sql_results, isset($find_real_end) ? $find_real_end : null);
        $unlim_num_rows = PMA_countQueryResults($num_rows, $justBrowsing, $db, $table, $analyzed_sql_results);
        PMA_cleanupRelations(isset($db) ? $db : '', isset($table) ? $table : '', isset($_REQUEST['dropped_column']) ? $_REQUEST['dropped_column'] : null, isset($_REQUEST['purge']) ? $_REQUEST['purge'] : null);
        if (isset($_REQUEST['dropped_column']) && mb_strlen($db) && mb_strlen($table)) {
            // to refresh the list of indexes (Ajax mode)
            $extra_data['indexes_list'] = PMA_Index::getHtmlForIndexes($table, $db);
        }
    }
    return array($result, $num_rows, $unlim_num_rows, isset($profiling_results) ? $profiling_results : null, $extra_data);
}
开发者ID:mi-squared,项目名称:openemr,代码行数:59,代码来源:sql.lib.php

示例5: elseif

 * and moves back to "tbl_sql.php"
 */
if (isset($_REQUEST['do_save_data'])) {
    $error = false;
    $sql_query = $GLOBALS['dbi']->getTable($db, $table)->getSqlQueryForIndexCreateOrEdit($index, $error);
    // If there is a request for SQL previewing.
    if (isset($_REQUEST['preview_sql'])) {
        PMA_Response::getInstance()->addJSON('sql_data', PMA\Template::get('preview_sql')->render(array('query_data' => $sql_query)));
    } elseif (!$error) {
        $GLOBALS['dbi']->query($sql_query);
        if ($GLOBALS['is_ajax_request'] == true) {
            $message = PMA_Message::success(__('Table %1$s has been altered successfully.'));
            $message->addParam($table);
            $response = PMA_Response::getInstance();
            $response->addJSON('message', PMA_Util::getMessage($message, $sql_query, 'success'));
            $response->addJSON('index_table', PMA_Index::getHtmlForIndexes($table, $db));
        } else {
            include 'tbl_structure.php';
        }
    } else {
        $response = PMA_Response::getInstance();
        $response->isSuccess(false);
        $response->addJSON('message', $error);
    }
    exit;
}
// end builds the new index
/**
 * Display the form to edit/create an index
 */
require_once 'libraries/tbl_info.inc.php';
开发者ID:hewenhao2008,项目名称:phpmyadmin,代码行数:31,代码来源:tbl_indexes.php


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