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


PHP PMA_Util::getStartAndNumberOfRowsPanel方法代码示例

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


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

示例1: PMA_getHtmlForGisVisualization

/**
 * Function to generate HTML for the GIS visualization page
 *
 * @param array   $url_params            url parameters
 * @param array   $labelCandidates       list of candidates for the label
 * @param array   $spatialCandidates     list of candidates for the spatial column
 * @param array   $visualizationSettings visualization settings
 * @param String  $sql_query             the sql query
 * @param String  $visualization         HTML and js code for the visualization
 * @param boolean $svg_support           whether svg download format is supported
 * @param array   $data                  array of visualizing data
 *
 * @return string HTML code for the GIS visualization
 */
function PMA_getHtmlForGisVisualization($url_params, $labelCandidates, $spatialCandidates, $visualizationSettings, $sql_query, $visualization, $svg_support, $data)
{
    $html = '<div id="div_view_options">';
    $html .= '<fieldset>';
    $html .= '<legend>' . __('Display GIS Visualization') . '</legend>';
    $html .= '<div id="gis_div" style="position:relative;">';
    $html .= '<form method="post" action="tbl_gis_visualization.php">';
    $html .= PMA_URL_getHiddenInputs($url_params);
    $html .= PMA_getHtmlForSelect("labelColumn", $labelCandidates, $visualizationSettings);
    $html .= PMA_getHtmlForSelect("spatialColumn", $spatialCandidates, $visualizationSettings);
    $html .= '<input type="hidden" name="displayVisualization" value="redraw">';
    if (!$GLOBALS['PMA_Config']->isHttps()) {
        $isSelected = isset($visualizationSettings['choice']) ? true : false;
        $html .= PMA_getHtmlForUseOpenStreetMaps($isSelected);
    }
    $html .= PMA_Util::getStartAndNumberOfRowsPanel($sql_query);
    $html .= '</form>';
    $html .= '<div class="pma_quick_warp" style="width: 50px; position: absolute;' . ' right: 0; top: 0; cursor: pointer;">';
    $html .= '<div class="drop_list">';
    $html .= '<span class="drop_button" style="padding: 0; border: 0;">';
    $html .= PMA_Util::getImage('b_saveimage', __('Save'));
    $html .= '</span>';
    $url_params['sql_query'] = $sql_query;
    $url_params['saveToFile'] = 'download';
    $url = 'tbl_gis_visualization.php' . PMA_URL_getCommon($url_params);
    $html .= '<ul>';
    $html .= PMA_getHtmlForGisDownloadLink($url, 'png', 'PNG');
    $html .= PMA_getHtmlForGisDownloadLink($url, 'pdf', 'PDF');
    if ($svg_support) {
        $html .= PMA_getHtmlForGisDownloadLink($url, 'svg', 'SVG');
    }
    $html .= '</ul>';
    $html .= '</div></div>';
    $html .= '</div>';
    $html .= '<div style="clear:both;">&nbsp;</div>';
    $html .= '<div id="placeholder" style="width:';
    $html .= htmlspecialchars($visualizationSettings['width']) . 'px;height:';
    $html .= htmlspecialchars($visualizationSettings['height']) . 'px;">';
    $html .= $visualization;
    $html .= '</div>';
    $html .= '<div id="openlayersmap"></div>';
    $html .= '<input type="hidden" id="pmaThemeImage" value="';
    $html .= $GLOBALS['pmaThemeImage'] . '" />';
    $html .= '<script language="javascript" type="text/javascript">';
    $html .= 'function drawOpenLayers()';
    $html .= '{';
    if (!$GLOBALS['PMA_Config']->isHttps()) {
        $html .= PMA_GIS_visualizationResults($data, $visualizationSettings, 'ol');
    }
    $html .= '}';
    $html .= '</script>';
    $html .= '</fieldset>';
    $html .= '</div>';
    return $html;
}
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:69,代码来源:tbl_gis_visualization.lib.php

示例2: testPMAGetHtmlForTableChartDisplay

 /**
  * Tests for PMA_getHtmlForTableChartDisplay() method.
  *
  * @return void
  * @test
  */
 public function testPMAGetHtmlForTableChartDisplay()
 {
     $_SESSION[' PMA_token '] = "PMA_token";
     $_SESSION['tmpval']['pos'] = "pos";
     $_SESSION['tmpval']['max_rows'] = "all";
     $GLOBALS['cfg']['MaxRows'] = 10;
     $url_query = "url_query";
     $url_params = array("url" => "url_params");
     $keys = array("x1" => "value1", "x2" => "value2");
     $fields_meta = array("x1" => new Mock_Meta("type1"), "x2" => new Mock_Meta("type3"));
     $numeric_types = array("type1", "type2");
     $numeric_column_count = 2;
     $sql_query = "sql_query";
     $yaxis = null;
     $html = PMA_getHtmlForTableChartDisplay($url_query, $url_params, $keys, $fields_meta, $numeric_types, $numeric_column_count, $sql_query);
     //case 1: PMA_getHtmlForPmaTokenAndUrlQuery
     $this->assertContains(PMA_getHtmlForPmaTokenAndUrlQuery($url_query), $html);
     //case 2: PMA_getHtmlForPmaTokenAndUrlQuery
     $this->assertContains(PMA_URL_getHiddenInputs($url_params), $html);
     //case 3: options
     $this->assertContains(PMA_getHtmlForChartTypeOptions(), $html);
     $this->assertContains(PMA_getHtmlForStackedOption(), $html);
     //case 4: options
     $this->assertContains(__('Chart title'), $html);
     //case 5: options
     $this->assertContains(PMA_getHtmlForChartXAxisOptions($keys, $yaxis), $html);
     $this->assertContains(PMA_getHtmlForChartSeriesOptions($keys, $fields_meta, $numeric_types, $yaxis, $numeric_column_count), $html);
     //case 6: PMA_getHtmlForDateTimeCols
     $this->assertContains(PMA_getHtmlForDateTimeCols($keys, $fields_meta), $html);
     $this->assertContains(PMA_getHtmlForTableAxisLabelOptions($yaxis, $keys), $html);
     $this->assertContains(PMA_Util::getStartAndNumberOfRowsPanel($sql_query), $html);
     $this->assertContains(PMA_getHtmlForChartAreaDiv(), $html);
 }
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:39,代码来源:PMA_tbl_chart_test.php

示例3: PMA_getHtmlForTableChartDisplay

/**
 * Function to get html for displaying table chart
 *
 * @param string $url_query            url query
 * @param array  $url_params           url parameters
 * @param array  $keys                 keys
 * @param array  $fields_meta          fields meta
 * @param array  $numeric_types        numeric types
 * @param int    $numeric_column_count numeric column count
 * @param string $sql_query            sql query
 *
 * @return string
 */
function PMA_getHtmlForTableChartDisplay($url_query, $url_params, $keys, $fields_meta, $numeric_types, $numeric_column_count, $sql_query)
{
    // pma_token/url_query needed for chart export
    $htmlString = PMA_getHtmlForPmaTokenAndUrlQuery($url_query);
    $htmlString .= '<!-- Display Chart options -->' . '<div id="div_view_options">' . '<form method="post" id="tblchartform" action="tbl_chart.php" ' . 'class="ajax">' . PMA_URL_getHiddenInputs($url_params) . '<fieldset>' . '<legend>' . __('Display chart') . '</legend>' . '<div style="float:left; width:420px;">';
    $htmlString .= PMA_getHtmlForChartTypeOptions();
    $htmlString .= PMA_getHtmlForStackedOption();
    $htmlString .= '<input type="text" name="chartTitle" value="' . __('Chart title') . '">' . '</div>';
    $xaxis = null;
    $htmlString .= PMA_getHtmlForChartXAxisOptions($keys, $xaxis);
    $htmlString .= PMA_getHtmlForChartSeriesOptions($keys, $fields_meta, $numeric_types, $xaxis, $numeric_column_count);
    $htmlString .= PMA_getHtmlForDateTimeCols($keys, $fields_meta);
    $htmlString .= PMA_getHtmlForNumericCols($keys, $fields_meta, $numeric_types);
    $htmlString .= '</div>';
    $htmlString .= PMA_getHtmlForTableAxisLabelOptions($xaxis, $keys);
    $htmlString .= PMA_getHtmlForAlternativeDataFormat($keys, $fields_meta, $numeric_types, $xaxis);
    $htmlString .= PMA_Util::getStartAndNumberOfRowsPanel($sql_query);
    $htmlString .= PMA_getHtmlForChartAreaDiv();
    $htmlString .= '</fieldset>' . '</form>' . '</div>';
    return $htmlString;
}
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:34,代码来源:tbl_chart.lib.php


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