Initial commit
This commit is contained in:
@ -0,0 +1,93 @@
|
||||
<tbody id="tbl_summary_row">
|
||||
<tr>
|
||||
<th class="print_ignore"></th>
|
||||
<th class="tbl_num nowrap">
|
||||
<?php
|
||||
printf(_ngettext('%s table', '%s tables', $num_tables),
|
||||
PMA\libraries\Util::formatNumber($num_tables, 0)); ?>
|
||||
</th>
|
||||
<?php if ($server_slave_status): ?>
|
||||
<th> <?= __('Replication'); ?> </th>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$sum_colspan = ($db_is_system_schema ? 4 : 7);
|
||||
if ($GLOBALS['cfg']['NumFavoriteTables'] == 0) {
|
||||
$sum_colspan--;
|
||||
} ?>
|
||||
<th colspan="<?= $sum_colspan; ?>" class="print_ignore" ><?= __('Sum'); ?></th>
|
||||
<?php
|
||||
$row_count_sum = PMA\libraries\Util::formatNumber($sum_entries, 0);
|
||||
// If a table shows approximate rows count, display update-all-real-count anchor.
|
||||
$row_sum_url = array();
|
||||
if (isset($approx_rows)) {
|
||||
$row_sum_url = array(
|
||||
'ajax_request' => true,
|
||||
'db' => $GLOBALS['db'],
|
||||
'real_row_count' => 'true',
|
||||
'real_row_count_all' => 'true'
|
||||
);
|
||||
}
|
||||
$cell_text = ($approx_rows)
|
||||
? '<a href="db_structure.php' . PMA_URL_getCommon($row_sum_url)
|
||||
. '" class="ajax row_count_sum">' . '~' . $row_count_sum . '</a>'
|
||||
: $row_count_sum;
|
||||
?>
|
||||
<th class="value tbl_rows"><?= $cell_text; ?></th>
|
||||
<?php if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)): ?>
|
||||
<?php
|
||||
// MySQL <= 5.5.2
|
||||
$default_engine = $GLOBALS['dbi']->fetchValue(
|
||||
"SELECT @@storage_engine;"
|
||||
);
|
||||
if (empty($default_engine)) {
|
||||
// MySQL >= 5.5.3
|
||||
$default_engine = $GLOBALS['dbi']->fetchValue(
|
||||
"SELECT @@default_storage_engine;"
|
||||
);
|
||||
}
|
||||
?>
|
||||
<th class="center">
|
||||
<dfn title="<?php printf(__('%s is the default storage engine on this MySQL server.'),
|
||||
$default_engine); ?>"><?= $default_engine; ?></dfn>
|
||||
</th>
|
||||
<th>
|
||||
<?php if (! empty($db_collation)): ?>
|
||||
<dfn title="<?= PMA_getCollationDescr($db_collation) , ' (' , __('Default') , ')'; ?>">
|
||||
<?= $db_collation; ?>
|
||||
</dfn>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($is_show_stats): ?>
|
||||
<?php
|
||||
list($sum_formatted, $unit) = PMA\libraries\Util::formatByteDown(
|
||||
$sum_size, 3, 1
|
||||
);
|
||||
list($overhead_formatted, $overhead_unit)
|
||||
= PMA\libraries\Util::formatByteDown($overhead_size, 3, 1);
|
||||
?>
|
||||
<th class="value tbl_size"><?= $sum_formatted , ' ' , $unit; ?></th>
|
||||
<th class="value tbl_overhead"><?= $overhead_formatted , ' ' , $overhead_unit; ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
|
||||
<th></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureCreation']): ?>
|
||||
<th class="value tbl_creation">
|
||||
<?= ($create_time_all
|
||||
? PMA\libraries\Util::localisedDate(strtotime($create_time_all))
|
||||
: '-'); ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']): ?>
|
||||
<th class="value tbl_last_update"><?= ($update_time_all
|
||||
? PMA\libraries\Util::localisedDate(strtotime($update_time_all))
|
||||
: '-'); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureLastCheck']): ?>
|
||||
<th class="value tbl_last_check"><?= ($check_time_all
|
||||
? PMA\libraries\Util::localisedDate(strtotime($check_time_all))
|
||||
: '-');?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</tbody>
|
3
#pma/templates/database/structure/browse_table.phtml
Normal file
3
#pma/templates/database/structure/browse_table.phtml
Normal file
@ -0,0 +1,3 @@
|
||||
<a href="sql.php<?= $tbl_url_query; ?>&pos=0">
|
||||
<?= $title; ?>
|
||||
</a>
|
@ -0,0 +1,3 @@
|
||||
<a href="sql.php<?= $tbl_url_query; ?>&pos=0" title="<?= $title; ?>">
|
||||
<?= $truename; ?>
|
||||
</a>
|
42
#pma/templates/database/structure/check_all_tables.phtml
Normal file
42
#pma/templates/database/structure/check_all_tables.phtml
Normal file
@ -0,0 +1,42 @@
|
||||
<div class="clearfloat print_ignore">
|
||||
<img class="selectallarrow" src="<?= $pmaThemeImage , 'arrow_' , $text_dir , '.png'; ?>" width="38" height="22" alt="<?php __('With selected:'); ?>" />
|
||||
<input type="checkbox" id="tablesForm_checkall" class="checkall_box" title="<?= __('Check all'); ?>" />
|
||||
<label for="tablesForm_checkall"><?= __('Check all'); ?></label>
|
||||
<?php if ($overhead_check != ''): ?>
|
||||
/ <a href="#" onclick="unMarkAllRows('tablesForm'); <?= $overhead_check; ?> return false;"><?= __('Check tables having overhead'); ?></a>
|
||||
<?php endif; ?>
|
||||
<select name="submit_mult" style="margin: 0 3em 0 3em;">
|
||||
<option value="<?= __('With selected:'); ?>" selected="selected"><?= __('With selected:'); ?></option>
|
||||
<option value="copy_tbl"><?= __('Copy table')?></option>
|
||||
<option value="show_create" ><?= __('Show create'); ?></option>
|
||||
<option value="export" ><?= __('Export'); ?></option>
|
||||
<?php if (!$db_is_system_schema
|
||||
&& !$GLOBALS['cfg']['DisableMultiTableMaintenance']): ?>
|
||||
<optgroup label="<?= __('Delete data or table'); ?>">
|
||||
<option value="empty_tbl" ><?= __('Empty'); ?></option>
|
||||
<option value="drop_tbl" ><?= __('Drop'); ?></option>
|
||||
</optgroup>
|
||||
<optgroup label="<?= __('Table maintenance'); ?>">
|
||||
<option value="analyze_tbl" ><?= __('Analyze table'); ?></option>
|
||||
<option value="check_tbl" ><?= __('Check table'); ?></option>
|
||||
<option value="checksum_tbl" ><?= __('Checksum table'); ?></option>
|
||||
<option value="optimize_tbl" ><?= __('Optimize table'); ?></option>
|
||||
<option value="repair_tbl" ><?= __('Repair table'); ?></option>
|
||||
</optgroup>
|
||||
<optgroup label="<?= __('Prefix'); ?>">
|
||||
<option value="add_prefix_tbl" ><?= __('Add prefix to table'); ?></option>
|
||||
<option value="replace_prefix_tbl" ><?= __('Replace table prefix'); ?></option>
|
||||
<option value="copy_tbl_change_prefix" ><?= __('Copy table with prefix'); ?></option>
|
||||
</optgroup>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($GLOBALS['cfgRelation']['centralcolumnswork'])
|
||||
&& $GLOBALS['cfgRelation']['centralcolumnswork']): ?>
|
||||
<optgroup label="<?= __('Central columns'); ?>">
|
||||
<option value="sync_unique_columns_central_list" ><?= __('Add columns to central list'); ?></option>
|
||||
<option value="delete_unique_columns_central_list" ><?= __('Remove columns from central list'); ?></option>
|
||||
<option value="make_consistent_with_central_list" ><?= __('Make consistent with central list'); ?></option>
|
||||
</optgroup>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
<?= implode("\n", $hidden_fields); ?>
|
||||
</div>
|
3
#pma/templates/database/structure/empty_table.phtml
Normal file
3
#pma/templates/database/structure/empty_table.phtml
Normal file
@ -0,0 +1,3 @@
|
||||
<a class="truncate_table_anchor ajax" href="sql.php<?= $tbl_url_query; ?>&sql_query=<?= $sql_query; ?>&message_to_show=<?= $message_to_show; ?>">
|
||||
<?= $title; ?>
|
||||
</a>
|
15
#pma/templates/database/structure/favorite_anchor.phtml
Normal file
15
#pma/templates/database/structure/favorite_anchor.phtml
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
// Check if current table is already in favorite list.
|
||||
$fav_params = array('db' => $db,
|
||||
'ajax_request' => true,
|
||||
'favorite_table' => $current_table['TABLE_NAME'],
|
||||
(($already_favorite ? 'remove' : 'add') . '_favorite') => true
|
||||
);
|
||||
?>
|
||||
<a id="<?= md5($current_table['TABLE_NAME']); ?>_favorite_anchor"
|
||||
class="ajax favorite_table_anchor"
|
||||
href="<?= 'db_structure.php' , PMA_URL_getCommon($fav_params); ?>"
|
||||
title="<?= $already_favorite ? __("Remove from Favorites") : __("Add to Favorites"); ?>"
|
||||
data-favtargets="<?= md5($db . "." . $current_table['TABLE_NAME']); ?>" >
|
||||
<?= !$already_favorite ? $titles['NoFavorite'] : $titles['Favorite']; ?>
|
||||
</a>
|
@ -0,0 +1,7 @@
|
||||
<p class="print_ignore">
|
||||
<a href="#" id="printView">
|
||||
<?= PMA\libraries\Util::getIcon('b_print.png', __('Print'), true); ?>
|
||||
</a>
|
||||
<a href="db_datadict.php<?= $url_query; ?>" target="print_view">
|
||||
<?= PMA\libraries\Util::getIcon('b_tblanalyse.png', __('Data dictionary'), true); ?></a>
|
||||
</p>
|
3
#pma/templates/database/structure/search_table.phtml
Normal file
3
#pma/templates/database/structure/search_table.phtml
Normal file
@ -0,0 +1,3 @@
|
||||
<a href="tbl_select.php<?= $tbl_url_query; ?>">
|
||||
<?= $title; ?>
|
||||
</a>
|
35
#pma/templates/database/structure/show_create.phtml
Normal file
35
#pma/templates/database/structure/show_create.phtml
Normal file
@ -0,0 +1,35 @@
|
||||
<div class="show_create_results">
|
||||
<h2><?= __('Showing create queries'); ?></h2>
|
||||
<?php
|
||||
$views = array();
|
||||
$tables = array();
|
||||
foreach ($db_objects as $object) {
|
||||
if ($GLOBALS['dbi']->getTable($db, $object)->isView()) {
|
||||
$views [] = $object;
|
||||
} else {
|
||||
$tables [] = $object;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php if (! empty($tables)): ?>
|
||||
<?= PMA\libraries\Template::get('database/structure/show_create_row')->render(
|
||||
array(
|
||||
'db' => $db,
|
||||
'title' => __('Tables'),
|
||||
'raw_title' => 'Table',
|
||||
'db_objects' => $tables
|
||||
)
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (! empty($views)): ?>
|
||||
<?= PMA\libraries\Template::get('database/structure/show_create_row')->render(
|
||||
array(
|
||||
'db' => $db,
|
||||
'title' => __('Views'),
|
||||
'raw_title' => 'View',
|
||||
'db_objects' => $views
|
||||
)
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
22
#pma/templates/database/structure/show_create_row.phtml
Normal file
22
#pma/templates/database/structure/show_create_row.phtml
Normal file
@ -0,0 +1,22 @@
|
||||
<fieldset>
|
||||
<legend><?= $title; ?></legend>
|
||||
<table class="show_create">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $raw_title; ?></th>
|
||||
<th>Create <?= $raw_title; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $odd = true; ?>
|
||||
<?php foreach ($db_objects as $object): ?>
|
||||
<?php $row_class = ($odd) ? 'odd' : 'even'; ?>
|
||||
<tr class="<?= $row_class; ?>">
|
||||
<td><strong><?= PMA_mimeDefaultFunction($object); ?></strong></td>
|
||||
<td><?= PMA_mimeDefaultFunction($GLOBALS['dbi']->getTable($db, $object)->showCreate()); ?></td>
|
||||
</tr>
|
||||
<?php $odd = ! $odd; ?>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
70
#pma/templates/database/structure/sortable_header.phtml
Normal file
70
#pma/templates/database/structure/sortable_header.phtml
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
$requested_sort = 'table';
|
||||
$requested_sort_order = $future_sort_order = $initial_sort_order;
|
||||
// If the user requested a sort
|
||||
if (isset($_REQUEST['sort'])) {
|
||||
$requested_sort = $_REQUEST['sort'];
|
||||
if (isset($_REQUEST['sort_order'])) {
|
||||
$requested_sort_order = $_REQUEST['sort_order'];
|
||||
}
|
||||
}
|
||||
$order_img = '';
|
||||
$order_link_params = array();
|
||||
$order_link_params['title'] = __('Sort');
|
||||
// If this column was requested to be sorted.
|
||||
if ($requested_sort == $sort) {
|
||||
if ($requested_sort_order == 'ASC') {
|
||||
$future_sort_order = 'DESC';
|
||||
// current sort order is ASC
|
||||
$order_img = ' ' . PMA\libraries\Util::getImage(
|
||||
's_asc.png',
|
||||
__('Ascending'),
|
||||
array('class' => 'sort_arrow', 'title' => '')
|
||||
);
|
||||
$order_img .= ' ' . PMA\libraries\Util::getImage(
|
||||
's_desc.png',
|
||||
__('Descending'),
|
||||
array('class' => 'sort_arrow hide', 'title' => '')
|
||||
);
|
||||
// but on mouse over, show the reverse order (DESC)
|
||||
$order_link_params['onmouseover'] = "$('.sort_arrow').toggle();";
|
||||
// on mouse out, show current sort order (ASC)
|
||||
$order_link_params['onmouseout'] = "$('.sort_arrow').toggle();";
|
||||
} else {
|
||||
$future_sort_order = 'ASC';
|
||||
// current sort order is DESC
|
||||
$order_img = ' ' . PMA\libraries\Util::getImage(
|
||||
's_asc.png',
|
||||
__('Ascending'),
|
||||
array('class' => 'sort_arrow hide', 'title' => '')
|
||||
);
|
||||
$order_img .= ' ' . PMA\libraries\Util::getImage(
|
||||
's_desc.png',
|
||||
__('Descending'),
|
||||
array('class' => 'sort_arrow', 'title' => '')
|
||||
);
|
||||
// but on mouse over, show the reverse order (ASC)
|
||||
$order_link_params['onmouseover'] = "$('.sort_arrow').toggle();";
|
||||
// on mouse out, show current sort order (DESC)
|
||||
$order_link_params['onmouseout'] = "$('.sort_arrow').toggle();";
|
||||
}
|
||||
}
|
||||
$_url_params = array(
|
||||
'db' => $_REQUEST['db'],
|
||||
'pos' => 0, // We set the position back to 0 every time they sort.
|
||||
'sort' => $sort,
|
||||
'sort_order' => $future_sort_order,
|
||||
);
|
||||
|
||||
if (PMA_isValid($_REQUEST['tbl_type'], array('view', 'table'))) {
|
||||
$_url_params['tbl_type'] = $_REQUEST['tbl_type'];
|
||||
}
|
||||
if (! empty($_REQUEST['tbl_group'])) {
|
||||
$_url_params['tbl_group'] = $_REQUEST['tbl_group'];
|
||||
}
|
||||
|
||||
$url = 'db_structure.php' . PMA_URL_getCommon($_url_params);
|
||||
|
||||
echo PMA\libraries\Util::linkOrButton(
|
||||
$url, $title . $order_img, $order_link_params
|
||||
);
|
187
#pma/templates/database/structure/structure_table_row.phtml
Normal file
187
#pma/templates/database/structure/structure_table_row.phtml
Normal file
@ -0,0 +1,187 @@
|
||||
<tr class="<?= ($odd_row ? 'odd' : 'even') , ($table_is_view ? ' is_view' : '') ?>"
|
||||
id="row_tbl_<?= $curr; ?>">
|
||||
<td class="center print_ignore">
|
||||
<input type="checkbox"
|
||||
name="selected_tbl[]"
|
||||
class="checkall"
|
||||
value="<?= htmlspecialchars($current_table['TABLE_NAME']); ?>"
|
||||
id="checkbox_tbl_<?= $curr; ?>" />
|
||||
</td>
|
||||
<th>
|
||||
<?= $browse_table_label , $tracking_icon; ?>
|
||||
</th>
|
||||
<?php if ($server_slave_status): ?>
|
||||
<td class="center">
|
||||
<?= ($ignored ? PMA\libraries\Util::getImage('s_cancel.png', __('Not replicated')) : ''); ?>
|
||||
<?= ($do ? PMA\libraries\Util::getImage('s_success.png', __('Replicated')) : ''); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
//Favorite table anchor.
|
||||
?>
|
||||
<?php if ($GLOBALS['cfg']['NumFavoriteTables'] > 0): ?>
|
||||
<td class="center print_ignore">
|
||||
<?= PMA\libraries\Template::get('database/structure/favorite_anchor')->render(
|
||||
array(
|
||||
'db' => $db,
|
||||
'current_table' => $current_table,
|
||||
'titles' => $titles,
|
||||
'already_favorite' => $already_favorite
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<td class="center print_ignore">
|
||||
<?= $browse_table; ?>
|
||||
</td>
|
||||
<td class="center print_ignore">
|
||||
<a href="tbl_structure.php<?= $tbl_url_query; ?>">
|
||||
<?= $titles['Structure']; ?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="center print_ignore">
|
||||
<?= $search_table; ?>
|
||||
</td>
|
||||
|
||||
<?php if (!$db_is_system_schema): ?>
|
||||
<td class="insert_table center print_ignore">
|
||||
<a href="tbl_change.php<?= $tbl_url_query; ?>"><?= $titles['Insert']; ?></a>
|
||||
</td>
|
||||
<td class="center print_ignore"><?= $empty_table; ?></td>
|
||||
<td class="center print_ignore">
|
||||
<a class="ajax drop_table_anchor <?= ($table_is_view || $current_table['ENGINE'] == null) ? ' view' : '' ?>"
|
||||
href="sql.php<?= $tbl_url_query; ?>&reload=1&purge=1&sql_query=<?= urlencode($drop_query); ?>&message_to_show=<?= urlencode($drop_message); ?>" >
|
||||
<?= $titles['Drop']; ?>
|
||||
</a>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($current_table['TABLE_ROWS']) &&
|
||||
($current_table['ENGINE'] != null || $table_is_view)): ?>
|
||||
|
||||
<?php
|
||||
// Get the row count.
|
||||
$row_count = PMA\libraries\Util::formatNumber($current_table['TABLE_ROWS'], 0);
|
||||
|
||||
// Content to be appended into 'tbl_rows' cell.
|
||||
// If row count is approximate, display it as an anchor to get real count.
|
||||
?>
|
||||
<td class="value tbl_rows"
|
||||
data-table="<?= htmlspecialchars($current_table['TABLE_NAME']); ?>">
|
||||
<?php if ($approx_rows): ?>
|
||||
<a href="db_structure.php<?= PMA_URL_getCommon(
|
||||
array(
|
||||
'ajax_request' => true,
|
||||
'db' => $GLOBALS['db'],
|
||||
'table' => $current_table['TABLE_NAME'],
|
||||
'real_row_count' => 'true'
|
||||
)
|
||||
); ?>" class="ajax real_row_count">
|
||||
<bdi>
|
||||
~<?= $row_count; ?>
|
||||
</bdi>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<?= $row_count; ?>
|
||||
<?php endif; ?>
|
||||
<?= $show_superscript; ?>
|
||||
</td>
|
||||
|
||||
<?php if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)): ?>
|
||||
<td class="nowrap">
|
||||
<?php if (!empty($current_table['ENGINE'])): ?>
|
||||
<?= $current_table['ENGINE']; ?>
|
||||
<?php elseif ($table_is_view): ?>
|
||||
<?= __('View'); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php if (mb_strlen($collation)): ?>
|
||||
<td class="nowrap">
|
||||
<?= $collation; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($is_show_stats): ?>
|
||||
<td class="value tbl_size">
|
||||
<a href="tbl_structure.php<?= $tbl_url_query ?>#showusage">
|
||||
<span><?= $formatted_size; ?></span>
|
||||
<span class="unit"><?= $unit; ?></span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="value tbl_overhead">
|
||||
<?= $overhead; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
|
||||
<?php $comment = $current_table['Comment']; ?>
|
||||
<td>
|
||||
<?php if (mb_strlen($comment) > $GLOBALS['cfg']['LimitChars']): ?>
|
||||
<abbr title="<?= htmlspecialchars($comment); ?>">
|
||||
<?= htmlspecialchars(
|
||||
mb_substr(
|
||||
$comment, 0, $GLOBALS['cfg']['LimitChars']
|
||||
)
|
||||
); ?>
|
||||
...
|
||||
</abbr>
|
||||
<?php else: ?>
|
||||
<?= htmlspecialchars($comment); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureCreation']): ?>
|
||||
<td class="value tbl_creation">
|
||||
<?= $create_time ? PMA\libraries\Util::localisedDate(strtotime($create_time)) : '-'; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']): ?>
|
||||
<td class="value tbl_last_update">
|
||||
<?= $update_time ? PMA\libraries\Util::localisedDate(strtotime($update_time)) : '-'; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureLastCheck']): ?>
|
||||
<td class="value tbl_last_check">
|
||||
<?= $check_time ? PMA\libraries\Util::localisedDate(strtotime($check_time)) : '-'; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php elseif ($table_is_view): ?>
|
||||
|
||||
<td class="value tbl_rows">-</td>
|
||||
<td class="nowrap">
|
||||
<?= __('View'); ?>
|
||||
</td>
|
||||
<td class="nowrap">---</td>
|
||||
<?php if ($is_show_stats): ?>
|
||||
<td class="value tbl_size">-</td>
|
||||
<td class="value tbl_overhead">-</td>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
|
||||
<td></td>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureCreation']): ?>
|
||||
<td class="value tbl_creation">-</td>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']): ?>
|
||||
<td class="value tbl_last_update">-</td>
|
||||
<?php endif; ?>
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureLastCheck']): ?>
|
||||
<td class="value tbl_last_check">-</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<td colspan="<?= $colspan_for_structure - ($db_is_system_schema ? 6 : 9); ?>"
|
||||
class="center">
|
||||
<?= __('in use'); ?>
|
||||
</td>
|
||||
|
||||
<?php endif; ?>
|
||||
</tr>
|
126
#pma/templates/database/structure/table_header.phtml
Normal file
126
#pma/templates/database/structure/table_header.phtml
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
$cnt = 0; // Let's count the columns...
|
||||
|
||||
if ($db_is_system_schema) {
|
||||
$action_colspan = 3;
|
||||
} else {
|
||||
$action_colspan = 6;
|
||||
}
|
||||
if ($GLOBALS['cfg']['NumFavoriteTables'] > 0) {
|
||||
$action_colspan++;
|
||||
}
|
||||
?>
|
||||
<form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
|
||||
<?= PMA_URL_getHiddenInputs($db); ?>
|
||||
<table class="data">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="print_ignore"></th>
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Table'),
|
||||
'sort' => 'table',
|
||||
'initial_sort_order' => 'ASC'
|
||||
)
|
||||
); ?></th>
|
||||
<?php if ($replication): ?>
|
||||
<th><?= __('Replication'); ?></th>
|
||||
<?php endif; ?>
|
||||
<th colspan="<?= $action_colspan; ?>" class="print_ignore">
|
||||
<?= __('Action'); ?>
|
||||
</th>
|
||||
<!-- larger values are more interesting so default sort order is DESC-->
|
||||
<th>
|
||||
<?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Rows'),
|
||||
'sort' => 'records',
|
||||
'initial_sort_order' => 'DESC'
|
||||
)
|
||||
); ?>
|
||||
<?= PMA\libraries\Util::showHint(PMA_sanitize(
|
||||
__('May be approximate. Click on the number to get the exact'
|
||||
. ' count. See [doc@faq3-11]FAQ 3.11[/doc].'))); ?>
|
||||
</th>
|
||||
<?php if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)): ?>
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Type'),
|
||||
'sort' => 'type',
|
||||
'initial_sort_order' => 'ASC'
|
||||
)
|
||||
); $cnt++; ?></th>
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Collation'),
|
||||
'sort' => 'collation',
|
||||
'initial_sort_order' => 'ASC'
|
||||
)
|
||||
); $cnt++; ?></th>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['is_show_stats']): ?>
|
||||
<!-- larger values are more interesting so default sort order is DESC -->
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Size'),
|
||||
'sort' => 'size',
|
||||
'initial_sort_order' => 'DESC'
|
||||
)
|
||||
); $cnt++; ?></th>
|
||||
<!-- larger values are more interesting so default sort order is DESC -->
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Overhead'),
|
||||
'sort' => 'overhead',
|
||||
'initial_sort_order' => 'DESC'
|
||||
)
|
||||
); $cnt++; ?></th>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Comment'),
|
||||
'sort' => 'comment',
|
||||
'initial_sort_order' => 'ASC'
|
||||
)
|
||||
); $cnt++; ?></th>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureCreation']): ?>
|
||||
<!-- newer values are more interesting so default sort order is DESC -->
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Creation'),
|
||||
'sort' => 'creation',
|
||||
'initial_sort_order' => 'DESC'
|
||||
)
|
||||
); $cnt++; ?></th>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']): ?>
|
||||
<!-- newer values are more interesting so default sort order is DESC -->
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Last update'),
|
||||
'sort' => 'last_update',
|
||||
'initial_sort_order' => 'DESC'
|
||||
)
|
||||
); $cnt++; ?></th>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($GLOBALS['cfg']['ShowDbStructureLastCheck']): ?>
|
||||
<!-- newer values are more interesting so default sort order is DESC -->
|
||||
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
|
||||
array(
|
||||
'title' => __('Last check'),
|
||||
'sort' => 'last_check',
|
||||
'initial_sort_order' => 'DESC'
|
||||
)
|
||||
); $cnt++; ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $GLOBALS['colspan_for_structure'] = $cnt + $action_colspan + 3; ?>
|
11
#pma/templates/database/structure/tracking_icon.phtml
Normal file
11
#pma/templates/database/structure/tracking_icon.phtml
Normal file
@ -0,0 +1,11 @@
|
||||
<a href="tbl_tracking.php<?= $url_query; ?>&table=<?= $truename; ?>">
|
||||
<?php if ($is_tracked): ?>
|
||||
<?= PMA\libraries\Util::getImage(
|
||||
'eye.png', __('Tracking is active.')
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?= PMA\libraries\Util::getImage(
|
||||
'eye_grey.png', __('Tracking is not active.')
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
Reference in New Issue
Block a user