本文整理汇总了PHP中PMA_getHtmlForDataDefinitionStatements函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_getHtmlForDataDefinitionStatements函数的具体用法?PHP PMA_getHtmlForDataDefinitionStatements怎么用?PHP PMA_getHtmlForDataDefinitionStatements使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_getHtmlForDataDefinitionStatements函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_getHtmlForTrackingReportExportForm1
/**
* Generate HTML for export form
*
* @param array $data data
* @param array $url_params url params
* @param boolean $selection_schema selection schema
* @param boolean $selection_data selection data
* @param boolean $selection_both selection both
* @param int $filter_ts_to filter time stamp from
* @param int $filter_ts_from filter time stamp tp
* @param array $filter_users filter users
* @param string $str1 HTML for logtype select
* @param string $str2 HTML for "from date"
* @param string $str3 HTML for "to date"
* @param string $str4 HTML for user
* @param string $str5 HTML for "list report"
* @param string $drop_image_or_text HTML for image or text
*
* @return string HTML for form
*/
function PMA_getHtmlForTrackingReportExportForm1($data, $url_params, $selection_schema, $selection_data, $selection_both, $filter_ts_to, $filter_ts_from, $filter_users, $str1, $str2, $str3, $str4, $str5, $drop_image_or_text)
{
$ddlog_count = 0;
$html = '<form method="post" action="tbl_tracking.php' . PMA_URL_getCommon($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])) . '">';
$html .= sprintf(__('Show %1$s with dates from %2$s to %3$s by user %4$s %5$s'), $str1, $str2, $str3, $str4, $str5);
if ($selection_schema || $selection_both && count($data['ddlog']) > 0) {
list($temp, $ddlog_count) = PMA_getHtmlForDataDefinitionStatements($data, $filter_users, $filter_ts_from, $filter_ts_to, $url_params, $drop_image_or_text);
$html .= $temp;
unset($temp);
}
//endif
/*
* Secondly, list tracked data manipulation statements
*/
if (($selection_data || $selection_both) && count($data['dmlog']) > 0) {
$html .= PMA_getHtmlForDataManipulationStatements($data, $filter_users, $filter_ts_from, $filter_ts_to, $url_params, $ddlog_count, $drop_image_or_text);
}
$html .= '</form>';
return $html;
}
示例2: testPMAGetHtmlForDataDefinitionStatements
/**
* Tests for PMA_getHtmlForDataDefinitionStatements() method.
*
* @return void
* @test
*/
public function testPMAGetHtmlForDataDefinitionStatements()
{
$_REQUEST['version'] = "10";
$data = array('tracking' => 'tracking', 'ddlog' => array(array('statement' => 'statement', 'date' => 'date', 'username' => 'username')), 'dmlog' => array('dmlog'));
$filter_users = array("*");
$filter_ts_to = 9999999999;
$filter_ts_from = 0;
$url_params = array();
$drop_image_or_text = "text";
list($html, $count) = PMA_getHtmlForDataDefinitionStatements($data, $filter_users, $filter_ts_from, $filter_ts_to, $url_params, $drop_image_or_text);
$this->assertContains(__('Date'), $html);
$this->assertContains(__('Username'), $html);
$this->assertContains(__('Data definition statement'), $html);
$this->assertContains(__('Action'), $html);
//PMA_getHtmlForDataDefinitionStatement
$this->assertContains(htmlspecialchars($data['ddlog'][0]['username']), $html);
$this->assertEquals(2, $count);
}
示例3: PMA_getHtmlForTrackingReport
/**
* Function to get html for tracking report and tracking report export
*
* @param string $url_query url query
* @param array $data data
* @param array $url_params url params
* @param boolean $selection_schema selection schema
* @param boolean $selection_data selection data
* @param boolean $selection_both selection both
* @param int $filter_ts_to filter time stamp from
* @param int $filter_ts_from filter time stamp tp
* @param array $filter_users filter users
*
* @return string
*/
function PMA_getHtmlForTrackingReport($url_query, $data, $url_params, $selection_schema, $selection_data, $selection_both, $filter_ts_to, $filter_ts_from, $filter_users)
{
$html = '<h3>' . __('Tracking report') . ' [<a href="tbl_tracking.php?' . $url_query . '">' . __('Close') . '</a>]</h3>';
$html .= '<small>' . __('Tracking statements') . ' ' . htmlspecialchars($data['tracking']) . '</small><br/>';
$html .= '<br/>';
$html .= '<form method="post" action="tbl_tracking.php' . PMA_URL_getCommon($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])) . '">';
$str1 = '<select name="logtype">' . '<option value="schema"' . ($selection_schema ? ' selected="selected"' : '') . '>' . __('Structure only') . '</option>' . '<option value="data"' . ($selection_data ? ' selected="selected"' : '') . '>' . __('Data only') . '</option>' . '<option value="schema_and_data"' . ($selection_both ? ' selected="selected"' : '') . '>' . __('Structure and data') . '</option>' . '</select>';
$str2 = '<input type="text" name="date_from" value="' . htmlspecialchars($_REQUEST['date_from']) . '" size="19" />';
$str3 = '<input type="text" name="date_to" value="' . htmlspecialchars($_REQUEST['date_to']) . '" size="19" />';
$str4 = '<input type="text" name="users" value="' . htmlspecialchars($_REQUEST['users']) . '" />';
$str5 = '<input type="hidden" name="list_report" value="1" />' . '<input type="submit" value="' . __('Go') . '" />';
$html .= sprintf(__('Show %1$s with dates from %2$s to %3$s by user %4$s %5$s'), $str1, $str2, $str3, $str4, $str5);
// Prepare delete link content here
$drop_image_or_text = '';
if (PMA_Util::showIcons('ActionsLinksMode')) {
$drop_image_or_text .= PMA_Util::getImage('b_drop.png', __('Delete tracking data row from report'));
}
if (PMA_Util::showText('ActionLinksMode')) {
$drop_image_or_text .= __('Delete');
}
/*
* First, list tracked data definition statements
*/
if (count($data['ddlog']) == 0 && count($data['dmlog']) == 0) {
$msg = PMA_Message::notice(__('No data'));
$msg->display();
}
if ($selection_schema || $selection_both && count($data['ddlog']) > 0) {
list($temp, $ddlog_count) = PMA_getHtmlForDataDefinitionStatements($data, $filter_users, $filter_ts_from, $filter_ts_to, $url_params, $drop_image_or_text);
$html .= $temp;
unset($temp);
}
//endif
/*
* Secondly, list tracked data manipulation statements
*/
if (($selection_data || $selection_both) && count($data['dmlog']) > 0) {
$html .= PMA_getHtmlForDataManipulationStatements($data, $filter_users, $filter_ts_from, $filter_ts_to, $url_params, $ddlog_count, $drop_image_or_text);
}
$html .= '</form>';
$html .= '<form method="post" action="tbl_tracking.php' . PMA_URL_getCommon($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])) . '">';
$html .= sprintf(__('Show %1$s with dates from %2$s to %3$s by user %4$s %5$s'), $str1, $str2, $str3, $str4, $str5);
$str_export1 = '<select name="export_type">' . '<option value="sqldumpfile">' . __('SQL dump (file download)') . '</option>' . '<option value="sqldump">' . __('SQL dump') . '</option>' . '<option value="execution" onclick="alert(\'' . PMA_escapeJsString(__('This option will replace your table and contained data.')) . '\')">' . __('SQL execution') . '</option>' . '</select>';
$str_export2 = '<input type="hidden" name="report_export" value="1" />' . '<input type="submit" value="' . __('Go') . '" />';
$html .= '</form>';
$html .= '<form class="disableAjax" method="post" action="tbl_tracking.php' . PMA_URL_getCommon($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])) . '">';
$html .= '<input type="hidden" name="logtype" value="' . htmlspecialchars($_REQUEST['logtype']) . '" />';
$html .= '<input type="hidden" name="date_from" value="' . htmlspecialchars($_REQUEST['date_from']) . '" />';
$html .= '<input type="hidden" name="date_to" value="' . htmlspecialchars($_REQUEST['date_to']) . '" />';
$html .= '<input type="hidden" name="users" value="' . htmlspecialchars($_REQUEST['users']) . '" />';
$html .= "<br/>" . sprintf(__('Export as %s'), $str_export1) . $str_export2 . "<br/>";
$html .= '</form>';
$html .= "<br/><br/><hr/><br/>\n";
return $html;
}