本文整理汇总了PHP中PMA_getHtmlForAliasModalDialog函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_getHtmlForAliasModalDialog函数的具体用法?PHP PMA_getHtmlForAliasModalDialog怎么用?PHP PMA_getHtmlForAliasModalDialog使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_getHtmlForAliasModalDialog函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_getHtmlForExportOptions
/**
* Prints Html For Export Options
*
* @param String $export_type Selected Export Type
* @param String $db Selected DB
* @param String $table Selected Table
* @param String $multi_values Export selection
* @param String $num_tables number of tables
* @param ExportPlugin[] $export_list Export List
* @param String $unlim_num_rows Number of Rows
*
* @return string
*/
function PMA_getHtmlForExportOptions($export_type, $db, $table, $multi_values, $num_tables, $export_list, $unlim_num_rows)
{
global $cfg;
$html = PMA_getHtmlForExportOptionsMethod();
$html .= PMA_getHtmlForExportOptionsFormatDropdown($export_list);
$html .= PMA_getHtmlForExportOptionsSelection($export_type, $multi_values);
$tableLength = mb_strlen($table);
if ($tableLength && empty($num_tables) && !PMA_Table::isMerge($db, $table)) {
$html .= PMA_getHtmlForExportOptionsRows($db, $table, $unlim_num_rows);
}
if (isset($cfg['SaveDir']) && !empty($cfg['SaveDir'])) {
$html .= PMA_getHtmlForExportOptionsQuickExport();
}
$html .= PMA_getHtmlForAliasModalDialog($db, $table);
$html .= PMA_getHtmlForExportOptionsOutput($export_type);
$html .= PMA_getHtmlForExportOptionsFormat($export_list);
return $html;
}
示例2: testPMAGetHtmlForAliasModalDialog
/**
* Test for PMA_getHtmlForAliasModalDialog
*
* @return void
*/
public function testPMAGetHtmlForAliasModalDialog()
{
$columns_info = array('test\'_db' => array('test_<b>table' => array('co"l1' => array('COLUMN_NAME' => 'co"l1'), 'col<2' => array('COLUMN_NAME' => 'col<2'))));
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
$dbi->expects($this->any())->method('getColumnsFull')->will($this->returnValue($columns_info));
$GLOBALS['dbi'] = $dbi;
$html = PMA_getHtmlForAliasModalDialog();
$this->assertContains('<div id="alias_modal" class="hide" title="' . 'Rename exported databases/tables/columns">', $html);
$this->assertContains('test\'_db', $html);
$this->assertContains('test_<b>table', $html);
$this->assertContains('col<2', $html);
$this->assertContains('co"l1', $html);
$this->assertContains('<hr/>', $html);
$name_attr = 'aliases[test\'_db][tables][test_<b>table][alias]';
$id_attr = $GLOBALS['PMA_String']->substr(md5($name_attr), 0, 12);
$this->assertContains('<input type="text" value="" name="' . $name_attr . '" ' . 'id="' . $id_attr . '" placeholder="' . 'test_<b>table alias" class=""/>', $html);
}