Replace mixed html and php with php

This commit is contained in:
Michal Čihař 2012-09-19 14:08:28 +02:00
parent b13d547e04
commit d5f7a90703

View File

@ -1,6 +1,7 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Table tracking page
*
* @package PhpMyAdmin
*/
@ -278,10 +279,12 @@ if (isset($_REQUEST['report_export']) && $_REQUEST['export_type'] == 'sqldump')
* Schema snapshot
*/
if (isset($_REQUEST['snapshot'])) {
?>
<h3><?php echo __('Structure snapshot');?> [<a href="tbl_tracking.php?<?php echo $url_query;?>"><?php echo __('Close');?></a>]</h3>
<?php
$data = PMA_Tracker::getTrackedData($_REQUEST['db'], $_REQUEST['table'], $_REQUEST['version']);
echo '<h3>' . __('Structure snapshot')
. ' [<a href="tbl_tracking.php?' . $url_query . '">' . __('Close')
. '</a>]</h3>';
$data = PMA_Tracker::getTrackedData(
$_REQUEST['db'], $_REQUEST['table'], $_REQUEST['version']
);
// Get first DROP TABLE and CREATE TABLE statements
$drop_create_statements = $data['ddlog'][0]['statement'];
@ -302,86 +305,80 @@ if (isset($_REQUEST['snapshot'])) {
$temp = unserialize($data['schema_snapshot']);
$columns = $temp['COLUMNS'];
$indexes = $temp['INDEXES'];
?>
<h3><?php echo __('Structure');?></h3>
<table id="tablestructure" class="data">
<thead>
<tr>
<th><?php echo __('Column'); ?></th>
<th><?php echo __('Type'); ?></th>
<th><?php echo __('Collation'); ?></th>
<th><?php echo __('Null'); ?></th>
<th><?php echo __('Default'); ?></th>
<th><?php echo __('Extra'); ?></th>
<th><?php echo __('Comment'); ?></th>
</tr>
</thead>
<tbody>
<?php
echo '<h3>' . __('Structure') . '</h3>';
echo '<table id="tablestructure" class="data">';
echo '<thead>';
echo '<tr>';
echo '<th>' . __('Column') . '</th>';
echo '<th>' . __('Type') . '</th>';
echo '<th>' . __('Collation') . '</th>';
echo '<th>' . __('Null') . '</th>';
echo '<th>' . __('Default') . '</th>';
echo '<th>' . __('Extra') . '</th>';
echo '<th>' . __('Comment') . '</th>';
echo '</tr>';
echo '</thead>';
echo '<tbody>';
$style = 'odd';
foreach ($columns as $field_index => $field) {
?>
<tr class="noclick <?php echo $style; ?>">
<?php
if ($field['Key'] == 'PRI') {
echo '<td><b><u>' . htmlspecialchars($field['Field']) . '</u></b></td>' . "\n";
echo '<tr class="noclick ' . $style . '">';
if ($field['Key'] == 'PRI') {
echo '<td><b><u>' . htmlspecialchars($field['Field']) . '</u></b></td>';
} else {
echo '<td><b>' . htmlspecialchars($field['Field']) . '</b></td>';
}
echo "\n";
echo '<td>' . htmlspecialchars($field['Type']) . '</td>';
echo '<td>' . htmlspecialchars($field['Collation']) . '</td>';
echo '<td>' . (($field['Null'] == 'YES') ? __('Yes') : __('No')) . '</td>';
echo '<td>';
if (isset($field['Default'])) {
$extracted_columnspec = PMA_Util::extractColumnSpec($field['Type']);
if ($extracted_columnspec['type'] == 'bit') {
// here, $field['Default'] contains something like b'010'
echo PMA_Util::convertBitDefaultValue($field['Default']);
} else {
echo '<td><b>' . htmlspecialchars($field['Field']) . '</b></td>' . "\n";
echo htmlspecialchars($field['Default']);
}
?>
<td><?php echo htmlspecialchars($field['Type']);?></td>
<td><?php echo htmlspecialchars($field['Collation']);?></td>
<td><?php echo (($field['Null'] == 'YES') ? __('Yes') : __('No')); ?></td>
<td><?php
if (isset($field['Default'])) {
$extracted_columnspec
= PMA_Util::extractColumnSpec($field['Type']);
if ($extracted_columnspec['type'] == 'bit') {
// here, $field['Default'] contains something like b'010'
echo PMA_Util::convertBitDefaultValue($field['Default']);
} else {
echo htmlspecialchars($field['Default']);
}
} else {
if ($field['Null'] == 'YES') {
echo '<i>NULL</i>';
} else {
if ($field['Null'] == 'YES') {
echo '<i>NULL</i>';
} else {
echo '<i>' . _pgettext('None for default', 'None') . '</i>';
}
} ?></td>
<td><?php echo htmlspecialchars($field['Extra']);?></td>
<td><?php echo htmlspecialchars($field['Comment']);?></td>
</tr>
<?php
if ($style == 'even') {
$style = 'odd';
} else {
$style = 'even';
echo '<i>' . _pgettext('None for default', 'None') . '</i>';
}
}
?>
</tbody>
</table>
}
echo '</td>';
echo '<td>' . htmlspecialchars($field['Extra']) . '</td>';
echo '<td>' . htmlspecialchars($field['Comment']) . '</td>';
echo '</tr>';
if ($style == 'even') {
$style = 'odd';
} else {
$style = 'even';
}
}
echo '</tbody>';
echo '</table>';
<?php
if (count($indexes) > 0) {
?>
<h3><?php echo __('Indexes');?></h3>
<table id="tablestructure_indexes" class="data">
<thead>
<tr>
<th><?php echo __('Keyname');?></th>
<th><?php echo __('Type');?></th>
<th><?php echo __('Unique');?></th>
<th><?php echo __('Packed');?></th>
<th><?php echo __('Column');?></th>
<th><?php echo __('Cardinality');?></th>
<th><?php echo __('Collation');?></th>
<th><?php echo __('Null');?></th>
<th><?php echo __('Comment');?></th>
</tr>
<tbody>
<?php
echo '<h3>' . __('Indexes') . '</h3>';
echo '<table id="tablestructure_indexes" class="data">';
echo '<thead>';
echo '<tr>';
echo '<th>' . __('Keyname') . '</th>';
echo '<th>' . __('Type') . '</th>';
echo '<th>' . __('Unique') . '</th>';
echo '<th>' . __('Packed') . '</th>';
echo '<th>' . __('Column') . '</th>';
echo '<th>' . __('Cardinality') . '</th>';
echo '<th>' . __('Collation') . '</th>';
echo '<th>' . __('Null') . '</th>';
echo '<th>' . __('Comment') . '</th>';
echo '</tr>';
echo '<tbody>';
$style = 'odd';
foreach ($indexes as $indexes_index => $index) {
if ($index['Non_unique'] == 0) {
@ -394,33 +391,29 @@ if (isset($_REQUEST['snapshot'])) {
} else {
$str_packed = __('No');
}
?>
<tr class="noclick <?php echo $style; ?>">
<td><b><?php echo htmlspecialchars($index['Key_name']);?></b></td>
<td><?php echo htmlspecialchars($index['Index_type']);?></td>
<td><?php echo $str_unique;?></td>
<td><?php echo $str_packed;?></td>
<td><?php echo htmlspecialchars($index['Column_name']);?></td>
<td><?php echo htmlspecialchars($index['Cardinality']);?></td>
<td><?php echo htmlspecialchars($index['Collation']);?></td>
<td><?php echo htmlspecialchars($index['Null']);?></td>
<td><?php echo htmlspecialchars($index['Comment']);?></td>
</tr>
<?php
echo '<tr class="noclick ' . $style . '">';
echo '<td><b>' . htmlspecialchars($index['Key_name']) . '</b></td>';
echo '<td>' . htmlspecialchars($index['Index_type']) . '</td>';
echo '<td>' . $str_unique . '</td>';
echo '<td>' . $str_packed . '</td>';
echo '<td>' . htmlspecialchars($index['Column_name']) . '</td>';
echo '<td>' . htmlspecialchars($index['Cardinality']) . '</td>';
echo '<td>' . htmlspecialchars($index['Collation']) . '</td>';
echo '<td>' . htmlspecialchars($index['Null']) . '</td>';
echo '<td>' . htmlspecialchars($index['Comment']) . '</td>';
echo '</tr>';
if ($style == 'even') {
$style = 'odd';
} else {
$style = 'even';
}
}
?>
</tbody>
</table>
<?php
echo '</tbody>';
echo '</table>';
} // endif
?>
<br /><hr /><br />
<?php
echo '<br /><hr /><br />';
}
// end of snapshot report
@ -477,14 +470,18 @@ if (isset($_REQUEST['report'])
}
if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
?>
<h3><?php echo __('Tracking report');?> [<a href="tbl_tracking.php?<?php echo $url_query;?>"><?php echo __('Close');?></a>]</h3>
echo '<h3>' . __('Tracking report')
. ' [<a href="tbl_tracking.php?' . $url_query . '">' . __('Close')
. '</a>]</h3>';
<small><?php echo __('Tracking statements') . ' ' . htmlspecialchars($data['tracking']); ?></small><br/>
<br/>
echo '<small>' . __('Tracking statements') . ' ' . htmlspecialchars($data['tracking']) . '</small><br/>';
echo '<br/>';
<form method="post" action="tbl_tracking.php<?php echo PMA_generate_common_url($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])); ?>">
<?php
echo '<form method="post" action="tbl_tracking.php'
. PMA_generate_common_url(
$url_params + array('report' => 'true', 'version' => $_REQUEST['version'])
)
. '">';
$str1 = '<select name="logtype">' .
'<option value="schema"' . ($selection_schema ? ' selected="selected"' : '') . '>' . __('Structure only') . '</option>' .
@ -517,19 +514,17 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
}
if ($selection_schema || $selection_both && count($data['ddlog']) > 0) {
?>
<table id="ddl_versions" class="data" width="100%">
<thead>
<tr>
<th width="18">#</th>
<th width="100"><?php echo __('Date');?></th>
<th width="60"><?php echo __('Username');?></th>
<th><?php echo __('Data definition statement');?></th>
<th><?php echo __('Delete');?></th>
</tr>
</thead>
<tbody>
<?php
echo '<table id="ddl_versions" class="data" width="100%">';
echo '<thead>';
echo '<tr>';
echo '<th width="18">#</th>';
echo '<th width="100">' . __('Date') . '</th>';
echo '<th width="60">' . __('Username') . '</th>';
echo '<th>' . __('Data definition statement') . '</th>';
echo '<th>' . __('Delete') . '</th>';
echo '</tr>';
echo '</thead>';
echo '<tbody>';
$style = 'odd';
foreach ($data['ddlog'] as $entry) {
@ -544,15 +539,18 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
&& $timestamp <= $filter_ts_to
&& (in_array('*', $filter_users) || in_array($entry['username'], $filter_users))
) {
?>
<tr class="noclick <?php echo $style; ?>">
<td><small><?php echo $i;?></small></td>
<td><small><?php echo htmlspecialchars($entry['date']);?></small></td>
<td><small><?php echo htmlspecialchars($entry['username']); ?></small></td>
<td><?php echo $statement; ?></td>
<td class="nowrap"><a href="tbl_tracking.php?<?php echo $url_query;?>&amp;report=true&amp;version=<?php echo $version['version'];?>&amp;delete_ddlog=<?php echo $i-1; ?>"><?php echo $drop_image_or_text; ?></a></td>
</tr>
<?php
echo '<tr class="noclick ' . $style . '">';
echo '<td><small>' . $i . '</small></td>';
echo '<td><small>' . htmlspecialchars($entry['date']) . '</small></td>';
echo '<td><small>' . htmlspecialchars($entry['username']) . '</small></td>';
echo '<td>' . $statement . '</td>';
echo '<td class="nowrap"><a href="tbl_tracking.php?'
. $url_query . '&amp;report=true&amp;version='
. $version['version'] . '&amp;delete_ddlog='
. ($i - 1) . '">' . $drop_image_or_text
. '</a></td>';
echo '</tr>';
if ($style == 'even') {
$style = 'odd';
} else {
@ -561,10 +559,8 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
$i++;
}
}
?>
</tbody>
</table>
<?php
echo '</tbody>';
echo '</table>';
} //endif
@ -576,19 +572,18 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
*/
if (($selection_data || $selection_both) && count($data['dmlog']) > 0) {
?>
<table id="dml_versions" class="data" width="100%">
<thead>
<tr>
<th width="18">#</th>
<th width="100"><?php echo __('Date');?></th>
<th width="60"><?php echo __('Username');?></th>
<th><?php echo __('Data manipulation statement');?></th>
<th><?php echo __('Delete');?></th>
</tr>
</thead>
<tbody>
<?php
echo '<table id="dml_versions" class="data" width="100%">';
echo '<thead>';
echo '<tr>';
echo '<th width="18">#</th>';
echo '<th width="100">' . __('Date') . '</th>';
echo '<th width="60">' . __('Username') . '</th>';
echo '<th>' . __('Data manipulation statement') . '</th>';
echo '<th>' . __('Delete') . '</th>';
echo '</tr>';
echo '</thead>';
echo '<tbody>';
$style = 'odd';
foreach ($data['dmlog'] as $entry) {
if (strlen($entry['statement']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
@ -602,15 +597,18 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
&& $timestamp <= $filter_ts_to
&& (in_array('*', $filter_users) || in_array($entry['username'], $filter_users))
) {
?>
<tr class="noclick <?php echo $style; ?>">
<td><small><?php echo $i; ?></small></td>
<td><small><?php echo htmlspecialchars($entry['date']); ?></small></td>
<td><small><?php echo htmlspecialchars($entry['username']); ?></small></td>
<td><?php echo $statement; ?></td>
<td class="nowrap"><a href="tbl_tracking.php?<?php echo $url_query;?>&amp;report=true&amp;version=<?php echo $version['version'];?>&amp;delete_dmlog=<?php echo $i-$ddlog_count; ?>"><?php echo $drop_image_or_text; ?></a></td>
</tr>
<?php
echo '<tr class="noclick ' . $style . '">';
echo '<td><small>' . $i . '</small></td>';
echo '<td><small>' . htmlspecialchars($entry['date']) . '</small></td>';
echo '<td><small>' . htmlspecialchars($entry['username']) . '</small></td>';
echo '<td>' . $statement . '</td>';
echo '<td class="nowrap"><a href="tbl_tracking.php?' . $url_query
. '&amp;report=true&amp;version=' . $version['version']
. '&amp;delete_dmlog=' . ($i - $ddlog_count) . '">'
. $drop_image_or_text
. '</a></td>';
echo '</tr>';
if ($style == 'even') {
$style = 'odd';
} else {
@ -619,15 +617,15 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
$i++;
}
}
?>
</tbody>
</table>
<?php
echo '</tbody>';
echo '</table>';
}
?>
</form>
<form method="post" action="tbl_tracking.php<?php echo PMA_generate_common_url($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])); ?>">
<?php
echo '</form>';
echo '<form method="post" action="tbl_tracking.php'
. PMA_generate_common_url(
$url_params + array('report' => 'true', 'version' => $_REQUEST['version'])
)
. '">';
printf(__('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">' .
@ -637,18 +635,23 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
'</select>';
$str_export2 = '<input type="submit" name="report_export" value="' . __('Go') .'" />';
?>
</form>
<form method="post" action="tbl_tracking.php<?php echo PMA_generate_common_url($url_params + array('report' => 'true', 'version' => $_REQUEST['version'])); ?>">
<input type="hidden" name="logtype" value="<?php echo htmlspecialchars($_REQUEST['logtype']);?>" />
<input type="hidden" name="date_from" value="<?php echo htmlspecialchars($_REQUEST['date_from']);?>" />
<input type="hidden" name="date_to" value="<?php echo htmlspecialchars($_REQUEST['date_to']);?>" />
<input type="hidden" name="users" value="<?php echo htmlspecialchars($_REQUEST['users']);?>" />
<?php
echo "<br/>" . sprintf(__('Export as %s'), $str_export1) . $str_export2 . "<br/>";
?>
</form>
<?php
echo '</form>';
echo '<form method="post" action="tbl_tracking.php'
. PMA_generate_common_url(
$url_params + array('report' => 'true', 'version' => $_REQUEST['version'])
)
. '">';
echo '<input type="hidden" name="logtype" value="'
. htmlspecialchars($_REQUEST['logtype']) . '" />';
echo '<input type="hidden" name="date_from" value="'
. htmlspecialchars($_REQUEST['date_from']) . '" />';
echo '<input type="hidden" name="date_to" value="'
. htmlspecialchars($_REQUEST['date_to']) . '" />';
echo '<input type="hidden" name="users" value="'
. htmlspecialchars($_REQUEST['users']) . '" />';
echo "<br/>" . sprintf(__('Export as %s'), $str_export1)
. $str_export2 . "<br/>";
echo '</form>';
echo "<br/><br/><hr/><br/>\n";
} // end of report
@ -666,10 +669,8 @@ $sql_query = " SELECT DISTINCT db_name, table_name FROM " .
$sql_result = PMA_queryAsControlUser($sql_query);
if (PMA_DBI_num_rows($sql_result) > 0) {
?>
<form method="post" action="tbl_tracking.php?<?php echo $url_query;?>">
<select name="table">
<?php
echo '<form method="post" action="tbl_tracking.php?' . $url_query . '">';
echo '<select name="table">';
while ($entries = PMA_DBI_fetch_array($sql_result)) {
if (PMA_Tracker::isTracked($entries['db_name'], $entries['table_name'])) {
$status = ' (' . __('active') . ')';
@ -683,15 +684,11 @@ if (PMA_DBI_num_rows($sql_result) > 0) {
}
echo '<option value="' . htmlspecialchars($entries['table_name']) . '"' . $s . '>' . htmlspecialchars($entries['db_name']) . ' . ' . htmlspecialchars($entries['table_name']) . $status . '</option>' . "\n";
}
?>
</select>
<input type="submit" name="show_versions_submit" value="<?php echo __('Show versions');?>" />
</form>
<?php
echo '</select>';
echo '<input type="submit" name="show_versions_submit" value="' . __('Show versions') . '" />';
echo '</form>';
}
?>
<br />
<?php
echo '<br />';
/*
* List versions of current table
@ -711,21 +708,20 @@ $maxversion = PMA_DBI_fetch_array($sql_result);
$last_version = $maxversion['version'];
if ($last_version > 0) {
?>
<table id="versions" class="data">
<thead>
<tr>
<th><?php echo __('Database');?></th>
<th><?php echo __('Table');?></th>
<th><?php echo __('Version');?></th>
<th><?php echo __('Created');?></th>
<th><?php echo __('Updated');?></th>
<th><?php echo __('Status');?></th>
<th><?php echo __('Show');?></th>
</tr>
</thead>
<tbody>
<?php
echo '<table id="versions" class="data">';
echo '<thead>';
echo '<tr>';
echo '<th>' . __('Database') . '</th>';
echo '<th>' . __('Table') . '</th>';
echo '<th>' . __('Version') . '</th>';
echo '<th>' . __('Created') . '</th>';
echo '<th>' . __('Updated') . '</th>';
echo '<th>' . __('Status') . '</th>';
echo '<th>' . __('Show') . '</th>';
echo '</tr>';
echo '</thead>';
echo '<tbody>';
$style = 'odd';
PMA_DBI_data_seek($sql_result, 0);
while ($version = PMA_DBI_fetch_array($sql_result)) {
@ -741,90 +737,106 @@ if ($last_version > 0) {
$tracking_active = false;
}
}
?>
<tr class="noclick <?php echo $style;?>">
<td><?php echo htmlspecialchars($version['db_name']);?></td>
<td><?php echo htmlspecialchars($version['table_name']);?></td>
<td><?php echo htmlspecialchars($version['version']);?></td>
<td><?php echo htmlspecialchars($version['date_created']);?></td>
<td><?php echo htmlspecialchars($version['date_updated']);?></td>
<td><?php echo $version_status;?></td>
<td> <a href="tbl_tracking.php<?php
echo PMA_generate_common_url(
$url_params + array('report' => 'true', 'version' => $version['version'])
);?>"><?php echo __('Tracking report');?></a>
| <a href="tbl_tracking.php<?php
echo PMA_generate_common_url(
$url_params + array('snapshot' => 'true', 'version' => $version['version'])
);?>"><?php echo __('Structure snapshot');?></a>
</td>
</tr>
<?php
echo '<tr class="noclick ' . $style . '">';
echo '<td>' . htmlspecialchars($version['db_name']) . '</td>';
echo '<td>' . htmlspecialchars($version['table_name']) . '</td>';
echo '<td>' . htmlspecialchars($version['version']) . '</td>';
echo '<td>' . htmlspecialchars($version['date_created']) . '</td>';
echo '<td>' . htmlspecialchars($version['date_updated']) . '</td>';
echo '<td>' . $version_status . '</td>';
echo '<td><a href="tbl_tracking.php';
echo PMA_generate_common_url(
$url_params + array('report' => 'true', 'version' => $version['version'])
);
echo '">' . __('Tracking report') . '</a>';
echo '| <a href="tbl_tracking.php';
echo PMA_generate_common_url(
$url_params + array('snapshot' => 'true', 'version' => $version['version'])
);
echo '">' . __('Structure snapshot') . '</a>';
echo '</td>';
echo '</tr>';
if ($style == 'even') {
$style = 'odd';
} else {
$style = 'even';
}
}
?>
</tbody>
</table>
<?php if ($tracking_active == true) {?>
<div id="div_deactivate_tracking">
<form method="post" action="tbl_tracking.php?<?php echo $url_query; ?>">
<fieldset>
<legend><?php printf(__('Deactivate tracking for %s'), htmlspecialchars($GLOBALS['db'] . '.' . $GLOBALS['table'])); ?></legend>
<input type="hidden" name="version" value="<?php echo $last_version; ?>" />
<input type="submit" name="submit_deactivate_now" value="<?php echo __('Deactivate now'); ?>" />
</fieldset>
</form>
</div>
<?php
echo '</tbody>';
echo '</table>';
if ($tracking_active == true) {
echo '<div id="div_deactivate_tracking">';
echo '<form method="post" action="tbl_tracking.php?' . $url_query . '">';
echo '<fieldset>';
echo '<legend>';
printf(
__('Deactivate tracking for %s'),
htmlspecialchars($GLOBALS['db'] . '.' . $GLOBALS['table'])
);
echo '</legend>';
echo '<input type="hidden" name="version" value="' . $last_version . '" />';
echo '<input type="submit" name="submit_deactivate_now" value="'
. __('Deactivate now') . '" />';
echo '</fieldset>';
echo '</form>';
echo '</div>';
}
?>
<?php if ($tracking_active == false) {?>
<div id="div_activate_tracking">
<form method="post" action="tbl_tracking.php?<?php echo $url_query; ?>">
<fieldset>
<legend><?php printf(__('Activate tracking for %s'), htmlspecialchars($GLOBALS['db'] . '.' . $GLOBALS['table'])); ?></legend>
<input type="hidden" name="version" value="<?php echo $last_version; ?>" />
<input type="submit" name="submit_activate_now" value="<?php echo __('Activate now'); ?>" />
</fieldset>
</form>
</div>
<?php
if ($tracking_active == false) {
echo '<div id="div_activate_tracking">';
echo '<form method="post" action="tbl_tracking.php?' . $url_query . '">';
echo '<fieldset>';
echo '<legend>';
printf(
__('Activate tracking for %s'),
htmlspecialchars($GLOBALS['db'] . '.' . $GLOBALS['table'])
);
echo '</legend>';
echo '<input type="hidden" name="version" value="' . $last_version . '" />';
echo '<input type="submit" name="submit_activate_now" value="' . __('Activate now') . '" />';
echo '</fieldset>';
echo '</form>';
echo '</div>';
}
}
?>
<div id="div_create_version">
<form method="post" action="tbl_tracking.php?<?php echo $url_query; ?>">
<?php echo PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']); ?>
<fieldset>
<legend><?php printf(__('Create version %1$s of %2$s'), ($last_version + 1), htmlspecialchars($GLOBALS['db'] . '.' . $GLOBALS['table'])); ?></legend>
echo '<div id="div_create_version">';
echo '<form method="post" action="tbl_tracking.php?' . $url_query . '">';
echo PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']);
echo '<fieldset>';
echo '<legend>';
printf(
__('Create version %1$s of %2$s'),
($last_version + 1),
htmlspecialchars($GLOBALS['db'] . '.' . $GLOBALS['table'])
);
echo '</legend>';
<input type="hidden" name="version" value="<?php echo ($last_version + 1); ?>" />
echo '<input type="hidden" name="version" value="' . ($last_version + 1) . '" />';
<p><?php echo __('Track these data definition statements:');?></p>
<input type="checkbox" name="alter_table" value="true" checked="checked" /> ALTER TABLE<br/>
<input type="checkbox" name="rename_table" value="true" checked="checked" /> RENAME TABLE<br/>
<input type="checkbox" name="create_table" value="true" checked="checked" /> CREATE TABLE<br/>
<input type="checkbox" name="drop_table" value="true" checked="checked" /> DROP TABLE<br/>
<br/>
<input type="checkbox" name="create_index" value="true" checked="checked" /> CREATE INDEX<br/>
<input type="checkbox" name="drop_index" value="true" checked="checked" /> DROP INDEX<br/>
<p><?php echo __('Track these data manipulation statements:');?></p>
<input type="checkbox" name="insert" value="true" checked="checked" /> INSERT<br/>
<input type="checkbox" name="update" value="true" checked="checked" /> UPDATE<br/>
<input type="checkbox" name="delete" value="true" checked="checked" /> DELETE<br/>
<input type="checkbox" name="truncate" value="true" checked="checked" /> TRUNCATE<br/>
echo '<p>' . __('Track these data definition statements:') . '</p>';
echo '<input type="checkbox" name="alter_table" value="true" checked="checked" /> ALTER TABLE<br/>';
echo '<input type="checkbox" name="rename_table" value="true" checked="checked" /> RENAME TABLE<br/>';
echo '<input type="checkbox" name="create_table" value="true" checked="checked" /> CREATE TABLE<br/>';
echo '<input type="checkbox" name="drop_table" value="true" checked="checked" /> DROP TABLE<br/>';
echo '<br/>';
echo '<input type="checkbox" name="create_index" value="true" checked="checked" /> CREATE INDEX<br/>';
echo '<input type="checkbox" name="drop_index" value="true" checked="checked" /> DROP INDEX<br/>';
echo '<p>' . __('Track these data manipulation statements:') . '</p>';
echo '<input type="checkbox" name="insert" value="true" checked="checked" /> INSERT<br/>';
echo '<input type="checkbox" name="update" value="true" checked="checked" /> UPDATE<br/>';
echo '<input type="checkbox" name="delete" value="true" checked="checked" /> DELETE<br/>';
echo '<input type="checkbox" name="truncate" value="true" checked="checked" /> TRUNCATE<br/>';
</fieldset>
<fieldset class="tblFooters">
<input type="submit" name="submit_create_version" value="<?php echo __('Create version'); ?>" />
</fieldset>
</form>
</div>
echo '</fieldset>';
echo '<fieldset class="tblFooters">';
echo '<input type="submit" name="submit_create_version" value="' . __('Create version') . '" />';
echo '</fieldset>';
echo '</form>';
echo '</div>';
<br class="clearfloat"/>
echo '<br class="clearfloat"/>';