Dieser Commit ist enthalten in:
Ursprung
2b21070b1a
Commit
f7a7c71f86
1583 geänderte Dateien mit 454759 neuen und 0 gelöschten Zeilen
85
application/views/scripts/sql/tables/button-bar.phtml
Normale Datei
85
application/views/scripts/sql/tables/button-bar.phtml
Normale Datei
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
$prefix = null;
|
||||
$optimizeTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'optimize.tables'));
|
||||
$analyzeTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'analyze.tables'));
|
||||
$checkTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'check.tables'));
|
||||
$repairTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'repair.tables'));
|
||||
$emptyTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'empty.tables'));
|
||||
$deleteTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'delete.tables'));
|
||||
$createTableUrl = $this->url(array('controller' => 'sql', 'action' => 'create.table'));
|
||||
?>
|
||||
<tr class="thead">
|
||||
<th colspan="15">
|
||||
<div class="buttonBar">
|
||||
<ul class="Formbutton">
|
||||
<li>
|
||||
<button class="Formbutton"
|
||||
type="submit"
|
||||
onclick="changeFormAction('.tablesForm', '<?php echo $createTableUrl; ?>');">
|
||||
<?php
|
||||
echo $this->getIcon('Tabledata', '' ,16);
|
||||
echo $this->lang->L_NEWTABLE;
|
||||
?>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="Formbutton" disabled="disabled"
|
||||
id="buttonOptimize"
|
||||
type="submit"
|
||||
onclick="changeFormAction('.tablesForm', '<?php echo $optimizeTablesUrl; ?>');">
|
||||
<?php echo$this->getIcon('Ok', '', 16);?>
|
||||
<?php echo $this->lang->L_OPTIMIZE;?>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="Formbutton" disabled="disabled"
|
||||
id="buttonAnalyze"
|
||||
type="submit"
|
||||
onclick="changeFormAction('.tablesForm', '<?php echo $analyzeTablesUrl; ?>');">
|
||||
<?php echo$this->getIcon('Ok', '', 16);?>
|
||||
<?php echo $this->lang->L_ANALYZE;?>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="Formbutton" disabled="disabled"
|
||||
id="buttonCheck"
|
||||
type="submit"
|
||||
onclick="changeFormAction('.tablesForm', '<?php echo $checkTablesUrl; ?>');">
|
||||
<?php echo$this->getIcon('Ok', '', 16);?>
|
||||
<?php echo $this->lang->L_CHECK;?>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="Formbutton" disabled="disabled"
|
||||
id="buttonRepair"
|
||||
type="submit"
|
||||
onclick="changeFormAction('.tablesForm', '<?php echo $repairTablesUrl; ?>');">
|
||||
<?php echo$this->getIcon('Ok', '', 16);?>
|
||||
<?php echo $this->lang->L_REPAIR;?>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="Formbutton" disabled="disabled"
|
||||
id="buttonTruncate"
|
||||
type="submit"
|
||||
onclick="changeFormAction('.tablesForm', '<?php echo $emptyTablesUrl; ?>');">
|
||||
<?php echo$this->getIcon('delete', '');?>
|
||||
<?php echo $this->lang->L_EMPTY;?>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="Formbutton" disabled="disabled"
|
||||
id="buttonDelete"
|
||||
type="submit"
|
||||
onclick="changeFormAction('.tablesForm', '<?php echo $deleteTablesUrl; ?>');">
|
||||
<?php echo$this->getIcon('delete', '');?>
|
||||
<?php echo $this->lang->L_DELETE;?>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
8
application/views/scripts/sql/tables/create-table.phtml
Normale Datei
8
application/views/scripts/sql/tables/create-table.phtml
Normale Datei
|
|
@ -0,0 +1,8 @@
|
|||
<div id="content">
|
||||
<h2><?php echo $this->lang->L_SQL_CREATETABLE;?></h2>
|
||||
|
||||
<br /><br />
|
||||
|
||||
Hello (MySQLDumper-) World!
|
||||
|
||||
</div>
|
||||
47
application/views/scripts/sql/tables/show-table-data.phtml
Normale Datei
47
application/views/scripts/sql/tables/show-table-data.phtml
Normale Datei
|
|
@ -0,0 +1,47 @@
|
|||
<div id="content">
|
||||
<h2><?php echo $this->lang->L_RECORDS_OF_TABLE;?> `<?php echo $this->database;?>`.`<?php echo $this->table;?>`</h2>
|
||||
<?php echo $this->sqlHeadNavi();
|
||||
if (isset($this->noTables)) { ?>
|
||||
<p class="error"><?php echo $this->lang->L_INFO_DBEMPTY;?></p>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<table class="bdr" summary="show table data">
|
||||
<tr class="thead">
|
||||
<th>#</th>
|
||||
<?php foreach($this->columns as $row => $value) { ?>
|
||||
<th><?php echo $row?></th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php
|
||||
$i = $this->offset+1;
|
||||
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
|
||||
foreach($this->data as $data) {
|
||||
?>
|
||||
<tr class="nowrap <?php echo $cycleHelper->next()?>">
|
||||
<td class="small right"><?php echo $i; ?>.</td>
|
||||
<?php
|
||||
foreach($data as $val) { ?>
|
||||
<td class="small<?php if(is_numeric($val)) echo " right";?>">
|
||||
<?php
|
||||
if ($val !== null) {
|
||||
echo $this->out($val);
|
||||
} else {
|
||||
echo $this->out($val, true, 'i');
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
};
|
||||
if (empty($this->data) && !isset($this->noTables)) {
|
||||
echo '<tr><td class="error" colspan="' . (sizeof($this->columns)+1) . '">'
|
||||
. $this->lang->L_NO_ENTRIES . '</td></tr>';
|
||||
} ?>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
265
application/views/scripts/sql/tables/show-tables.phtml
Normale Datei
265
application/views/scripts/sql/tables/show-tables.phtml
Normale Datei
|
|
@ -0,0 +1,265 @@
|
|||
<div id="content">
|
||||
<h2><?php echo $this->lang->L_SQL_TABLESOFDB;?> `<?php echo $this->config->get('dynamic.dbActual');?>`
|
||||
</h2>
|
||||
<?php
|
||||
echo $this->sqlHeadNavi();
|
||||
if (!isset($this->selectedTables)) {
|
||||
$this->selectedTables = array();
|
||||
}
|
||||
|
||||
if (!empty($this->actionResult)) {
|
||||
$i = 1;
|
||||
?>
|
||||
<h4><?php echo $this->action;?>:</h4>
|
||||
|
||||
<table class="bdr" summary="Action result">
|
||||
<tr class="thead nowrap">
|
||||
<th class="right">#</th>
|
||||
<th class="left"><?php echo $this->lang->L_TABLE;?></th>
|
||||
<th class="left"><?php echo $this->lang->L_ACTION;?></th>
|
||||
<th class="left"><?php echo $this->lang->L_MESSAGE_TYPE;?></th>
|
||||
<th colspan="2" class="left"><?php echo $this->lang->L_MESSAGE;?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
|
||||
foreach ($this->actionResult as $data) {
|
||||
if (!isset($data['code'])) {
|
||||
//success, operation done, show result
|
||||
?>
|
||||
<tr class="<?php echo $cycleHelper->next();?> nowrap">
|
||||
<td class="small right"><?php echo $this->numberFormat($i);?>.</td>
|
||||
<td class="small"><?php echo $data['Table'];?></td>
|
||||
<td class="small"><?php echo $data['Op'];?></td>
|
||||
<td class="small"><?php echo $data['Msg_type'];?></td>
|
||||
<td class="small"><?php echo $data['Msg_text'];?></td>
|
||||
<td class="small right">
|
||||
<?php
|
||||
if ($data['Msg_type'] !== 'Error') {
|
||||
echo $this->getIcon('Ok', '', 16);
|
||||
} else {
|
||||
echo $this->getIcon('Attention', '', 16);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } else {
|
||||
// an MySQL error occured
|
||||
?>
|
||||
<tr class="<?php echo $cycleHelper->next();?> nowrap">
|
||||
<td class="small right"><?php echo $this->numberFormat($i);?>.</td>
|
||||
<td class="small"><?php echo $data['Table'];?></td>
|
||||
<td class="small"><?php echo $this->action;?></td>
|
||||
<td class="small"><?php echo $this->lang->L_ERROR;?></td>
|
||||
<td class="small">(<?php echo $data['code'] . ') '. $data['message'];?></td>
|
||||
<td class="small right"><?php echo $this->getIcon('Attention', '', 16);?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br />
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($this->tables->getTotalItemCount() >= 1) {
|
||||
?>
|
||||
<div>
|
||||
<?php echo $this->paginationControl($this->tables,
|
||||
'Sliding',
|
||||
'sql/paginator.phtml',
|
||||
array(1));
|
||||
?>
|
||||
<br />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
<form method="post" action="../" class="tablesForm">
|
||||
|
||||
<table class="bdr" summary="Table lists all tables of the database">
|
||||
<?php
|
||||
echo $this->partial('/sql/tables/button-bar.phtml',
|
||||
array('lang' => $this->lang));
|
||||
echo $this->partial('/sql/tables/table-header.phtml',
|
||||
array('lang' => $this->lang));
|
||||
$i = $this->startEntry;
|
||||
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
|
||||
$imgTableData = $this->getIcon('Tabledata', '' ,16);
|
||||
foreach ($this->tables as $data):
|
||||
$tableName = $data['TABLE_NAME'];
|
||||
$tableNameOut = $this->out($tableName);
|
||||
?>
|
||||
<tr class="nowrap <?php echo $cycleHelper->next()?>">
|
||||
<td class="small center">
|
||||
<a href="<?php echo $this->url(array('controller'=>'sql','action'=>'show.table.data',
|
||||
'tableName'=> base64_encode($tableName)));?>"
|
||||
class="tooltip" title="<?php echo $this->lang->L_TITLE_SHOW_DATA . ': ' . $tableNameOut;?>">
|
||||
<?php echo $imgTableData;?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="small right center">
|
||||
<input type="checkbox"
|
||||
class="tableCheckbox checkbox"
|
||||
name="tables[]"
|
||||
id="<?php echo $tableNameOut;?>"
|
||||
value="<?php echo $tableNameOut;?>"
|
||||
<?php
|
||||
if (in_array($tableName, $this->selectedTables)) {
|
||||
echo ' checked="checked"';
|
||||
}
|
||||
?>
|
||||
/>
|
||||
</td>
|
||||
|
||||
<td class="small right"><?php echo $i; ?>.</td>
|
||||
<td class="small">
|
||||
<label for="<?php echo $tableNameOut;?>" class="block tooltip"
|
||||
title="<?php echo $this->lang->L_SELECT . ': ' . $tableNameOut;?>">
|
||||
<?php echo $tableNameOut;?>
|
||||
</label>
|
||||
</td>
|
||||
<td class="small right">
|
||||
<?php
|
||||
if ($data['TABLE_ROWS'] > 0) {
|
||||
echo $this->numberFormat($data['TABLE_ROWS']);
|
||||
} elseif ($data['TABLE_ROWS'] === null) {
|
||||
echo '<i>NULL</i>';
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="small right">
|
||||
<?php
|
||||
if ($data['TABLE_TYPE'] == 'BASE TABLE') {
|
||||
echo $this->byteOutput($data['DATA_LENGTH'] + $data['INDEX_LENGTH']);
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="small right">
|
||||
<?php
|
||||
if ($data['INDEX_LENGTH'] > 0) {
|
||||
echo $this->byteOutput($data['INDEX_LENGTH']);
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="small right">
|
||||
<?php
|
||||
if ($data['AUTO_INCREMENT'] > 0) {
|
||||
echo $this->numberFormat($data['AUTO_INCREMENT']);
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="small right">
|
||||
<?php
|
||||
if ($this->isTableOptimizable($data['ENGINE'])) {
|
||||
if ($data['DATA_FREE'] == 0) {
|
||||
echo '-';
|
||||
} else {
|
||||
if ($data['ENGINE'] == 'InnoDB') {
|
||||
echo '-';
|
||||
} else {
|
||||
echo $this->byteOutput($data['DATA_FREE']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="small">
|
||||
<?php
|
||||
if ($data['CREATE_TIME'] != '') {
|
||||
echo$data['CREATE_TIME'];
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="small">
|
||||
<?php
|
||||
if ($data['UPDATE_TIME'] != '') {
|
||||
echo $data['UPDATE_TIME'];
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="small"><?php echo$data['TABLE_TYPE'];?></td>
|
||||
<td class="small"><?php echo$data['ENGINE'];?></td>
|
||||
<td class="small">
|
||||
<?php
|
||||
if ($data['TABLE_COLLATION'] != '') {
|
||||
echo $data['TABLE_COLLATION'];
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="small">
|
||||
<?php
|
||||
if ($data['TABLE_COMMENT'] != '') {
|
||||
echo $this->escape($data['TABLE_COMMENT']);
|
||||
} else {
|
||||
echo '-';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$i++;
|
||||
endforeach;
|
||||
if ($this->tables->getTotalItemCount() <= 0) { ?>
|
||||
<tr><td colspan="12" class="error"><?php echo $this->lang->L_INFO_DBEMPTY;?></td></tr>
|
||||
<?php }
|
||||
echo $this->partial('/sql/tables/table-header.phtml',
|
||||
array('lang' => $this->lang));
|
||||
?>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if ($this->tables->getTotalItemCount() >= 1) {
|
||||
?>
|
||||
<div id="pagination" style="margin-top: 15px;">
|
||||
<?php echo $this->paginationControl($this->tables,
|
||||
'Sliding',
|
||||
'sql/paginator.phtml',
|
||||
array(1));
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
$this->jQuery()->onLoadCaptureStart();
|
||||
?>
|
||||
$('.tableCheckbox').change(function() {
|
||||
checkButtonState();
|
||||
});
|
||||
<?php
|
||||
$this->jQuery()->onLoadCaptureEnd();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function checkButtonState() {
|
||||
var objs = ['#buttonOptimize', '#buttonAnalyze', '#buttonCheck',
|
||||
'#buttonRepair', '#buttonTruncate', '#buttonDelete'];
|
||||
if ($('.tableCheckbox:checked').size() > 0) {
|
||||
objs_enable(objs);
|
||||
} else {
|
||||
objs_disable(objs);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
41
application/views/scripts/sql/tables/table-header.phtml
Normale Datei
41
application/views/scripts/sql/tables/table-header.phtml
Normale Datei
|
|
@ -0,0 +1,41 @@
|
|||
<tr class="thead">
|
||||
<th> </th>
|
||||
<th class="toggle">
|
||||
<div class="toggleBar" >
|
||||
<img src="<?php echo $this->getIconSrc('plus', '');?>"
|
||||
class="pointer tooltip"
|
||||
title="<?php echo $this->lang->L_SELECT_ALL;?>"
|
||||
alt="<?php echo $this->lang->L_SELECT_ALL;?>"
|
||||
onclick="checkAll($('[type=checkbox]'));"/>
|
||||
<img src="<?php echo $this->getIconSrc('minus', '');?>"
|
||||
class="pointer tooltip"
|
||||
title="<?php echo $this->lang->L_DESELECT_ALL;?>"
|
||||
alt="<?php echo $this->lang->L_DESELECT_ALL;?>"
|
||||
onclick="unCheckAll($('[type=checkbox]'));"/>
|
||||
</div>
|
||||
</th>
|
||||
<th class="center">#</th>
|
||||
<th>
|
||||
<span class="explain tooltip" title="<?php echo $this->lang->L_TABLENAME_EXPLAIN;?>"><?php echo $this->lang->L_TABLENAME;?></span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="explain tooltip" title="<?php echo $this->lang->L_NR_OF_RECORDS;?>"><?php echo $this->lang->L_INFO_RECORDS;?></span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="explain tooltip" title="<?php echo $this->lang->L_DATASIZE;?>"><?php echo $this->lang->L_INFO_SIZE;?></span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="explain tooltip" title="<?php echo $this->lang->L_INDEX_SIZE;?>"><?php echo $this->lang->L_TITLE_INDEX;?></span>
|
||||
</th>
|
||||
<th class="nowrap">
|
||||
<span class="explain tooltip" title="<?php echo $this->lang->L_NEXT_AUTO_INCREMENT;?>"><?php echo $this->lang->L_NEXT_AUTO_INCREMENT_SHORT;?></span>
|
||||
</th>
|
||||
<th><?php echo $this->lang->L_OVERHEAD;?></th>
|
||||
<th><?php echo $this->lang->L_CREATED;?></th>
|
||||
<th><?php echo $this->lang->L_INFO_LASTUPDATE;?></th>
|
||||
<th><?php echo $this->lang->L_TABLE_TYPE;?></th>
|
||||
<th><?php echo $this->lang->L_ENGINE;?></th>
|
||||
<th><?php echo $this->lang->L_COLLATION;?></th>
|
||||
<th><?php echo $this->lang->L_COMMENT;?></th>
|
||||
</tr>
|
||||
|
||||
Laden …
Tabelle hinzufügen
Einen Link hinzufügen
In neuem Issue referenzieren