本文整理匯總了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);
}