當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PMA_showTypeOrFunction函數代碼示例

本文整理匯總了PHP中PMA_showTypeOrFunction函數的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_showTypeOrFunction函數的具體用法?PHP PMA_showTypeOrFunction怎麽用?PHP PMA_showTypeOrFunction使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了PMA_showTypeOrFunction函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: PMA_getHtmlForInsertEditFormHeader

}
//Insert/Edit form
//If table has blob fields we have to disable ajax.
$html_output .= PMA_getHtmlForInsertEditFormHeader($has_blob_field, $is_upload);
$html_output .= URL::getHiddenInputs($_form_params);
$titles['Browse'] = Util::getIcon('b_browse.png', __('Browse foreign values'));
// user can toggle the display of Function column and column types
// (currently does not work for multi-edits)
if (!$cfg['ShowFunctionFields'] || !$cfg['ShowFieldTypesInDataEditView']) {
    $html_output .= __('Show');
}
if (!$cfg['ShowFunctionFields']) {
    $html_output .= PMA_showTypeOrFunction('function', $url_params, false);
}
if (!$cfg['ShowFieldTypesInDataEditView']) {
    $html_output .= PMA_showTypeOrFunction('type', $url_params, false);
}
$GLOBALS['plugin_scripts'] = array();
foreach ($rows as $row_id => $current_row) {
    if (empty($current_row)) {
        $current_row = array();
    }
    $jsvkey = $row_id;
    $vkey = '[multi_edit][' . $jsvkey . ']';
    $current_result = isset($result) && is_array($result) && isset($result[$row_id]) ? $result[$row_id] : $result;
    $repopulate = array();
    $checked = true;
    if (isset($unsaved_values[$row_id])) {
        $repopulate = $unsaved_values[$row_id];
        $checked = false;
    }
開發者ID:poush,項目名稱:phpmyadmin,代碼行數:31,代碼來源:tbl_change.php

示例2: PMA_getHeadAndFootOfInsertRowTable

/**
 * Get table head and table foot for insert row table
 *
 * @param array $url_params url parameters
 *
 * @return string           an html snippet
 */
function PMA_getHeadAndFootOfInsertRowTable($url_params)
{
    $html_output = '<table class="insertRowTable topmargin">' . '<thead>' . '<tr>' . '<th>' . __('Column') . '</th>';
    if ($GLOBALS['cfg']['ShowFieldTypesInDataEditView']) {
        $html_output .= PMA_showTypeOrFunction('type', $url_params, true);
    }
    if ($GLOBALS['cfg']['ShowFunctionFields']) {
        $html_output .= PMA_showTypeOrFunction('function', $url_params, true);
    }
    $html_output .= '<th>' . __('Null') . '</th>' . '<th>' . __('Value') . '</th>' . '</tr>' . '</thead>' . ' <tfoot>' . '<tr>' . '<th colspan="5" class="tblFooters right">' . '<input type="submit" value="' . __('Go') . '" />' . '</th>' . '</tr>' . '</tfoot>';
    return $html_output;
}
開發者ID:hewenhao2008,項目名稱:phpmyadmin,代碼行數:19,代碼來源:insert_edit.lib.php

示例3: testShowTypeOrFunction

 /**
  * Test for PMA_showTypeOrFunction
  *
  * @return void
  */
 public function testShowTypeOrFunction()
 {
     $GLOBALS['cfg']['ShowFieldTypesInDataEditView'] = true;
     $GLOBALS['cfg']['ServerDefault'] = 1;
     $url_params = array('ShowFunctionFields' => 2);
     $result = PMA_showTypeOrFunction('function', $url_params, false);
     $this->assertEquals(' : <a href="tbl_change.php?ShowFunctionFields=1&amp;ShowFieldTypesIn' . 'DataEditView=1&amp;goto=sql.php&amp;lang=en&amp;token=token">' . 'Function</a>', $result);
     // case 2
     $result = PMA_showTypeOrFunction('function', $url_params, true);
     $this->assertEquals('<th><a href="tbl_change.php?ShowFunctionFields=0&amp;ShowFieldTypesIn' . 'DataEditView=1&amp;goto=sql.php&amp;lang=en&amp;token=token" title=' . '"Hide">Function</a></th>', $result);
     // case 3
     $result = PMA_showTypeOrFunction('type', $url_params, false);
     $this->assertEquals(' : <a href="tbl_change.php?ShowFunctionFields=1&amp;ShowFieldTypesIn' . 'DataEditView=1&amp;goto=sql.php&amp;lang=en&amp;token=token">' . 'Type</a>', $result);
     // case 4
     $result = PMA_showTypeOrFunction('type', $url_params, true);
     $this->assertEquals('<th><a href="tbl_change.php?ShowFunctionFields=1&amp;ShowFieldTypesIn' . 'DataEditView=0&amp;goto=sql.php&amp;lang=en&amp;token=token" title=' . '"Hide">Type</a></th>', $result);
 }
開發者ID:RimeOfficial,項目名稱:phpMyAdmin,代碼行數:22,代碼來源:PMA_insert_edit_test.php


注:本文中的PMA_showTypeOrFunction函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。