本文整理汇总了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;
}
示例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;
}
示例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&ShowFieldTypesIn' . 'DataEditView=1&goto=sql.php&lang=en&token=token">' . 'Function</a>', $result);
// case 2
$result = PMA_showTypeOrFunction('function', $url_params, true);
$this->assertEquals('<th><a href="tbl_change.php?ShowFunctionFields=0&ShowFieldTypesIn' . 'DataEditView=1&goto=sql.php&lang=en&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&ShowFieldTypesIn' . 'DataEditView=1&goto=sql.php&lang=en&token=token">' . 'Type</a>', $result);
// case 4
$result = PMA_showTypeOrFunction('type', $url_params, true);
$this->assertEquals('<th><a href="tbl_change.php?ShowFunctionFields=1&ShowFieldTypesIn' . 'DataEditView=0&goto=sql.php&lang=en&token=token" title=' . '"Hide">Type</a></th>', $result);
}