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


PHP PMA_getHTMLforGisDataTypes函数代码示例

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


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

示例1: PMA_getValueColumn

/**
 * Get the HTML elements for value column in insert form
 * (here, "column" is used in the sense of HTML column in HTML table)
 *
 * @param array   $column                description of column in given table
 * @param string  $backup_field          hidden input field
 * @param string  $column_name_appendix  the name attribute
 * @param string  $onChangeClause        onchange clause for fields
 * @param integer $tabindex              tab index
 * @param integer $tabindex_for_value    offset for the values tabindex
 * @param integer $idindex               id index
 * @param string  $data                  description of the column field
 * @param string  $special_chars         special characters
 * @param array   $foreignData           data about the foreign keys
 * @param boolean $odd_row               whether row is odd
 * @param array   $paramTableDbArray     array containing $table and $db
 * @param integer $rownumber             the row number
 * @param array   $titles                An HTML IMG tag for a particular icon from
 *                                       a theme, which may be an actual file or
 *                                       an icon from a sprite
 * @param string  $text_dir              text direction
 * @param string  $special_chars_encoded replaced char if the string starts
 *                                       with a \r\n pair (0x0d0a) add an extra \n
 * @param string  $vkey                  [multi_edit]['row_id']
 * @param boolean $is_upload             is upload or not
 * @param integer $biggest_max_file_size 0 integer
 * @param string  $default_char_editing  default char editing mode which is stored
 *                                       in the config.inc.php script
 * @param array   $no_support_types      list of datatypes that are not (yet)
 *                                       handled by PMA
 * @param array   $gis_data_types        list of GIS data types
 * @param array   $extracted_columnspec  associative array containing type,
 *                                       spec_in_brackets and possibly
 *                                       enum_set_values (another array)
 *
 * @return string an html snippet
 */
function PMA_getValueColumn($column, $backup_field, $column_name_appendix, $onChangeClause, $tabindex, $tabindex_for_value, $idindex, $data, $special_chars, $foreignData, $odd_row, $paramTableDbArray, $rownumber, $titles, $text_dir, $special_chars_encoded, $vkey, $is_upload, $biggest_max_file_size, $default_char_editing, $no_support_types, $gis_data_types, $extracted_columnspec)
{
    // HTML5 data-* attribute data-type
    $data_type = $GLOBALS['PMA_Types']->getTypeClass($column['True_Type']);
    $html_output = '';
    if ($foreignData['foreign_link'] == true) {
        $html_output .= PMA_getForeignLink($column, $backup_field, $column_name_appendix, $onChangeClause, $tabindex, $tabindex_for_value, $idindex, $data, $paramTableDbArray, $rownumber, $titles);
    } elseif (is_array($foreignData['disp_row'])) {
        $html_output .= PMA_dispRowForeignData($backup_field, $column_name_appendix, $onChangeClause, $tabindex, $tabindex_for_value, $idindex, $data, $foreignData);
    } elseif ($GLOBALS['cfg']['LongtextDoubleTextarea'] && mb_strstr($column['pma_type'], 'longtext')) {
        $html_output = '&nbsp;</td>';
        $html_output .= '</tr>';
        $html_output .= '<tr class="' . ($odd_row ? 'odd' : 'even') . '">' . '<td colspan="5" class="right">';
        $html_output .= PMA_getTextarea($column, $backup_field, $column_name_appendix, $onChangeClause, $tabindex, $tabindex_for_value, $idindex, $text_dir, $special_chars_encoded, $data_type);
    } elseif (mb_strstr($column['pma_type'], 'text')) {
        $html_output .= PMA_getTextarea($column, $backup_field, $column_name_appendix, $onChangeClause, $tabindex, $tabindex_for_value, $idindex, $text_dir, $special_chars_encoded, $data_type);
        $html_output .= "\n";
        if (mb_strlen($special_chars) > 32000) {
            $html_output .= "</td>\n";
            $html_output .= '<td>' . __('Because of its length,<br /> this column might not be editable.');
        }
    } elseif ($column['pma_type'] == 'enum') {
        $html_output .= PMA_getPmaTypeEnum($column, $backup_field, $column_name_appendix, $extracted_columnspec, $onChangeClause, $tabindex, $tabindex_for_value, $idindex, $data);
    } elseif ($column['pma_type'] == 'set') {
        $html_output .= PMA_getPmaTypeSet($column, $extracted_columnspec, $backup_field, $column_name_appendix, $onChangeClause, $tabindex, $tabindex_for_value, $idindex, $data);
    } elseif ($column['is_binary'] || $column['is_blob']) {
        $html_output .= PMA_getBinaryAndBlobColumn($column, $data, $special_chars, $biggest_max_file_size, $backup_field, $column_name_appendix, $onChangeClause, $tabindex, $tabindex_for_value, $idindex, $text_dir, $special_chars_encoded, $vkey, $is_upload);
    } elseif (!in_array($column['pma_type'], $no_support_types)) {
        $html_output .= PMA_getValueColumnForOtherDatatypes($column, $default_char_editing, $backup_field, $column_name_appendix, $onChangeClause, $tabindex, $special_chars, $tabindex_for_value, $idindex, $text_dir, $special_chars_encoded, $data, $extracted_columnspec);
    }
    if (in_array($column['pma_type'], $gis_data_types)) {
        $html_output .= PMA_getHTMLforGisDataTypes();
    }
    return $html_output;
}
开发者ID:hewenhao2008,项目名称:phpmyadmin,代码行数:72,代码来源:insert_edit.lib.php

示例2: testGetHTMLforGisDataTypes

 /**
  * Test for PMA_getHTMLforGisDataTypes
  *
  * @return void
  */
 public function testGetHTMLforGisDataTypes()
 {
     $GLOBALS['cfg']['ActionLinksMode'] = 'icons';
     $GLOBALS['cfg']['LinkLengthLimit'] = 2;
     $this->assertContains('<a href="#" target="_blank"><span class="nowrap"><img src="themes/dot.' . 'gif" title="Edit/Insert" alt="Edit/Insert" class="icon ic_b_edit" />' . '</span></a>', PMA_getHTMLforGisDataTypes());
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:11,代码来源:PMA_insert_edit_test.php


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