1
0
Fork 0
Dieser Commit ist enthalten in:
DSB 2011-06-10 21:55:32 +00:00
Ursprung 2b21070b1a
Commit f7a7c71f86
1583 geänderte Dateien mit 454759 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,89 @@
<?php
$formUrl = $this->url(array('controller'=>'sql','action'=>'create.database'));
?>
<div id="content">
<h2><?php echo $this->lang->L_CREATE_DATABASE;?></h2>
<?php echo $this->sqlHeadNavi(); ?>
<h4><?php echo $this->lang->L_CREATE_DATABASE;?>:</h4>
<form method="post" action="<?php echo $formUrl;?>">
<table class="bdr" summary="create new database">
<tr class="row-odd">
<td><?php echo $this->lang->L_DB_NAME; ?>:</td>
<td><input type="text" class="text" id="dbName" name="newDbInfo[dbName]" value="<?php echo (isset($this->dbCreated) && !$this->dbCreated) ? $this->out($this->newDbInfo['dbName']) : ''; ?>"/></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_DEFAULT_CHARSET;?>:</td>
<td><select class="select" id="dbCharset" name="newDbInfo[dbCharset]"><?php foreach ($this->charsets as $charset) { ?>
<option value="<?php echo $this->out($charset); ?>"<?php echo ($charset == $this->newDbInfo['dbCharset']) ? ' selected="selected"' : ''; ?>><?php echo $this->out($charset); ?></option>
<?php } ?></select></td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_DEFAULT_COLLATION_NAME;?>:</td>
<td><select class="select" id="dbCollation" name="newDbInfo[dbCollation]"><?php foreach ($this->collations[$this->newDbInfo['dbCharset']] as $collation) { ?>
<option value="<?php echo $this->out($collation); ?>"<?php echo ($collation == $this->newDbInfo['dbCollation']) ? ' selected="selected"' : ''; ?>><?php echo $this->out($collation); ?></option>
<?php } ?></select></td>
</tr>
<tr class="row-even">
<td>&nbsp;</td>
<td class="buttonBar">
<button type="submit" class="Formbutton"><?php echo $this->getIcon('Database', '', 16); echo $this->lang->L_CREATE_DATABASE; ?></button>
</td>
</tr>
</table>
</form>
</div>
<?php $this->jQuery()->onLoadCaptureStart(); ?>
var dbCollations = <?php echo json_encode($this->collations); ?>;
var dbDefaultCollations = <?php echo json_encode($this->defaultCollations); ?>;
$('#dbCharset').bind('change', function() {
var newOpts = '';
var curCharset = $(this).val();
$(dbCollations[curCharset]).each(function(id, v) {
var selected = '';
if (v == dbDefaultCollations[curCharset]) {
selected = ' selected="selected"';
}
newOpts += '<option value="' + v +'"' + selected + '>' + v + '</option>';
$('#dbCollation').html(newOpts);
});
});
$(document).ready(function() {
$('#dbName').focus();
});
<?php
$this->jQuery()->onLoadCaptureEnd();
if (isset($this->dbCreated)) {
if ($this->dbCreated) {
$this->popUpMessage()->addMessage(
'dialogDbCreation',
'L_CREATE_DATABASE',
array('L_DATABASE_CREATED_SUCCESS', $this->newDbInfo['dbName']),
array(
'modal' => 'true',
'autoOpen' => 'true',
'buttons' => array(
'L_OK' => 'function(){$(this).dialog("close"); }',
)
)
);
} else {
$this->popUpMessage()->addMessage(
'dialogDbCreation',
'L_CREATE_DATABASE',
array(
'L_DATABASE_CREATED_FAILED',
'<span class="error">(' . $this->errorInfo['code'] . ') '
. $this->errorInfo['message'] .'</span>'
),
array(
'modal' => 'true',
'autoOpen' => 'true',
'buttons' => array(
'L_OK' => 'function(){$(this).dialog("close"); }',
)
)
);
}
}
?>

Datei anzeigen

@ -0,0 +1,44 @@
<tr class="thead">
<th>&nbsp;</th>
<th>
<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('.dbCheckbox');checkButtonState();"/>
<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('.dbCheckbox');checkButtonState();"/>
</th>
<th>#</th>
<th><?php echo $this->lang->L_DB_NAME;?></th>
<th>
<span class="tooltip explain"
title="<?php echo $this->lang->L_MYSQL_TABLES_EXPLAIN;?>">
<?php echo $this->lang->L_TABLES;?>
</span>
</th>
<th>
<span class="tooltip explain"
title="<?php echo $this->lang->L_DATASIZE_INFO;?>">
<?php echo $this->lang->L_DATASIZE;?>
</span>
</th>
<th>
<span class="tooltip explain"
title="<?php echo $this->lang->L_MYSQL_VIEWS_EXPLAIN;?>">
<?php echo $this->lang->L_MYSQL_VIEWS;?>
</span>
</th>
<th>
<span class="tooltip explain"
title="<?php echo $this->lang->L_MYSQL_ROUTINES_EXPLAIN;?>">
<?php echo $this->lang->L_MYSQL_ROUTINES;?>
</span>
</th>
<th><?php echo $this->lang->L_DEFAULT_CHARACTER_SET_NAME;?></th>
<th><?php echo $this->lang->L_DEFAULT_COLLATION_NAME;?></th>
</tr>

Datei anzeigen

@ -0,0 +1,212 @@
<?php
$systemDatabases = $this->config->get('config.systemDatabases');
$formUrl = $this->url(array('controller'=>'sql','action'=>'index'));
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
?>
<div id="content">
<h2><?php echo $this->lang->L_DATABASES_OF_USER;?> '<?php echo $this->config->get('config.dbuser.user').'\'@\''.$this->config->get('config.dbuser.host');?>'</h2>
<?php echo $this->sqlHeadNavi(); ?>
<?php
if (isset($this->actionResults)) {
?>
<h4><?php echo $this->lang->L_ACTION . ' - ' . $this->lang->getTranslator()->translate($this->executedAction); ?>:</h4>
<table class="bdr" summary="Table shows formatted result of action">
<tr class="thead nowrap">
<td class="right">#</td>
<th class="left"><?php echo $this->lang->L_DB; ?></th>
<th class="small"><?php echo $this->lang->L_QUERY; ?></th>
<th colspan="2" class="left"><?php echo $this->lang->L_SQL_OUTPUT; ?></th>
</tr>
<?php
$row = 0;
foreach ($this->actionResults as $dbName => $dbResults) {
foreach ($dbResults as $dbResult) {
$row++;
if ($dbResult['result']) {
?>
<tr class="nowrap <?php echo $cycleHelper->next();?>">
<td class="small right"><?php echo $row; ?>.</td>
<td class="small"><?php echo $dbName; ?></td>
<td class="small"><?php echo $dbResult['query']; ?></td>
<td class="small right"><?php echo $this->getIcon('Ok', '', 16); ?></td>
</tr>
<?php
} else {
?>
<tr class="error">
<td class="right"><?php echo $row; ?>.</td>
<td class="small"><?php echo $dbName; ?></td>
<td><?php echo $dbResult['query']; ?></td>
<td class="error"><?php echo $dbResult['errorInfo']['code'] . ': ' . $dbResult['errorInfo']['message']; ?></td>
<td class="right"><?php echo $this->getIcon('Attention', '', 16); ?></td>
</tr>
<?php
}
}
}
if (isset($this->actionResults) && empty($this->actionResults)) {
?>
<tr class="nowrap <?php echo $cycleHelper->next();?>">
<td colspan="4">
<?php echo $this->lang->L_NOTHING_TO_DO; ?>
</td>
</tr>
<?php
}
?>
</table><br/>
<?php
}
?>
<form method="post" action="<?php echo $formUrl;?>" class="dbForm" id="dbForm">
<table class="bdr" summary="Table lists all databases">
<tr class="thead">
<th colspan="10">
<button class="Formbutton" type="button" onclick="window.location.href='<?php echo $this->url(array('controller' => 'sql', 'action' => 'create.database')); ?>';">
<?php
echo $this->getIcon('Database', '', 16);
echo $this->lang->L_CREATE_DATABASE;
?>
</button>
<button id="buttonTruncate" disabled="disabled" class="Formbutton" type="button"
onclick="if (!hasCheckedElements('.dbCheckbox')) return false;$('#confirmTruncateDb').dialog('open');">
<?php
echo $this->getIcon('DeleteTables', '', 16);
echo $this->lang->L_SQL_EMPTYDB;
?>
</button>
<button id="buttonDrop" disabled="disabled" class="Formbutton" type="button"
onclick="if (!hasCheckedElements('.dbCheckbox')) return false;$('#confirmDropDb').dialog('open');">
<?php
echo $this->getIcon('DeleteDatabase', '', 16);
echo $this->lang->L_DELETE_DATABASE;
?>
</button>
</th>
</tr>
<?php
echo $this->partial('sql/databases/database-header.phtml',
array('lang' => $this->lang));
$i=1;
$iconShowTable = $this->getIcon('Tables', '', 16);
foreach($this->dbInfos as $dbName => $data):
$dbNameEncoded = base64_encode($dbName);
$viewUrl = $this->url(array(
'controller'=>'sql',
'action'=>'show.tables',
'database'=> $dbNameEncoded)
);
?>
<tr class="nowrap
<?php
if ($dbName == $this->config->get('dynamic.dbActual')) {
echo 'row-highlight';
} else {
echo $this->cycle(array('row-even', 'row-odd'))->next();
}
?>">
<td class="small right">
<a href="<?php echo $this->url(array('controller' => 'sql', 'action' => 'show.tables', 'dbName' => $dbNameEncoded)); ?>"
title="<?php echo $this->lang->L_SHOW_TABLES . ': ' . $dbName;?>" class="tooltip">
<?php echo $iconShowTable; ?>
</a>
</td>
<td class="small right">
<?php
if (!in_array($dbName, $systemDatabases)) {
?>
<input id="<?php echo $this->out($dbName);?>" type="checkbox" name="dbNames[]" class="dbCheckbox checkbox" value="<?php echo $dbNameEncoded; ?>"/>
<?php } else { ?>
&nbsp;
<?php } ?>
</td>
<td class="small right"><?php echo $i;?>.</td>
<td class="small">
<?php
if (!in_array($dbName, $systemDatabases)) {
?>
<label class="block tooltip" for="<?php echo $this->out($dbName);?>" title="<?php echo $this->lang->L_SELECT . ': ' . $this->out($dbName);?>">
<?php echo $dbName;?>
</label>
<?php } else {
echo $dbName;
}
?>
</td>
<td class="small right">
<?php echo $this->numberFormat($data['tables']);?>
</td>
<td class="small right">
<?php echo $this->byteOutput($data['size']);?>
</td>
<td class="small right">
<?php echo $this->numberFormat($data['views']);?>
</td>
<td class="small right">
<?php echo $this->numberFormat($data['routines']);?>
</td>
<td class="small">
<?php echo $data['DEFAULT_CHARACTER_SET_NAME'];?>
</td>
<td class="small">
<?php echo $data['DEFAULT_COLLATION_NAME'];?>
</td>
</tr>
<?php
$i++;
endforeach;
echo $this->partial('sql/databases/database-header.phtml',
array('lang' => $this->lang));
?>
</table>
</form>
</div>
<?php
$dropDatabaseUrl = $this->url(array('controller' => 'sql', 'action' => 'drop.database'));
$this->popUpMessage()->addMessage(
'confirmDropDb',
'L_DELETE_DATABASE',
'L_CONFIRM_DROP_DATABASES',
array(
'modal' => true,
'autoOpen' => false,
'buttons' => array(
'L_YES' => "function() { changeFormAction('.dbForm', '" . $dropDatabaseUrl . "');$('#dbForm').submit();}",
'L_CANCEL' => 'function(){$(this).dialog("close"); return false;}',
)
)
);
$truncateDatabaseUrl = $this->url(array('controller' => 'sql', 'action' => 'truncate.database'));
$this->popUpMessage()->addMessage(
'confirmTruncateDb',
'L_TRUNCATE_DATABASE',
'L_CONFIRM_TRUNCATE_DATABASES',
array(
'modal' => true,
'autoOpen' => false,
'buttons' => array(
'L_YES' => "function() { changeFormAction('.dbForm', '" . $truncateDatabaseUrl . "');$('#dbForm').submit();}",
'L_CANCEL' => 'function(){$(this).dialog("close"); return false;}',
)
)
);
$this->jQuery()->onLoadCaptureStart();
?>
$('.dbCheckbox').change(function() {
checkButtonState();
});
<?php
$this->jQuery()->onLoadCaptureEnd();
?>
<script type="text/javascript">
function checkButtonState() {
var objs = ['#buttonTruncate', '#buttonDrop'];
if ($('.dbCheckbox:checked').size() > 0) {
objs_enable(objs);
} else {
objs_disable(objs);
}
}
</script>

Datei anzeigen

@ -0,0 +1,51 @@
<?php
if ($this->pageCount) {
if($this->current>1) { ?>
<a href="<?php echo $this->url(array('offset'=>$this->first)) ?>"
accesskey="f" class="Formbutton"><?php echo $this->getIcon('First', '', 16);?>
</a>
<?php
} else { ?>
<button class="Formbutton" disabled="disabled"><?php echo $this->getIcon('FirstDisabled', '', 16);?></button>
<?php
}
if($this->previous != null) { ?>
<a href="<?php echo $this->url(array('offset'=>$this->previous)) ?>"
accesskey="c" class="Formbutton">
<?php echo $this->getIcon('Back', '', 16);?>
</a>
<?php
} else { ?>
<button class="Formbutton" disabled="disabled"><?php echo $this->getIcon('BackDisabled', '', 16);?></button>
<?php
}
?>
<select>
<?php for($i=1; $i <= $this->pageCount; $i++) { ?>
<option <?php if ($i == $this->current) echo 'selected="selected"'; ?>><?php echo $i; ?></option>
<?php } ?>
</select>
<?php
if($this->next != null) { ?>
<a href="<?php echo $this->url(array('offset'=>$this->next)) ?>"
accesskey="v" class="Formbutton"><?php echo $this->getIcon('Forward', '', 16);?>
</a>
<?php
} else { ?>
<button class="Formbutton"><?php echo $this->getIcon('ForwardDisabled', '', 16);?></button>
<?php
}
if ($this->current<$this->last) { ?>
<a href="<?php echo $this->url(array('offset'=>$this->last));?>"
accesskey="f" class="Formbutton"><?php echo $this->getIcon('Last', '', 16);?>
</a>
<?php
} else { ?>
<button disabled="disabled" class="Formbutton"><?php echo $this->getIcon('LastDisabled', '', 16);?></button>
<?php
}
} ?>

Datei anzeigen

@ -0,0 +1,84 @@
<?php
$showDatabasesUrl = $this->url(array('controller'=>'sql','action'=>'show.databases'));
$showTablesUrl = $this->url(array('controller'=>'sql','action'=>'show.tables'));
$showTableDataUrl = $this->url(array('controller'=>'sql','action'=>'show.table.data'));
$sqlBoxUrl = $this->url(array('controller'=>'sql','action'=>'sqlbox'));
// get action name to set the active item in TabBar
$actionName = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
// format action name and escape possible dot in action name
$actionName = str_replace('.', '\\\.', $actionName);
$this->jQuery()->javascriptCaptureStart(); ?>
// set selected tab
$(document).ready(function() {
$('#<?php echo $actionName; ?>').addClass("ui-state-active");
$('#<?php echo $actionName; ?>').addClass("ui-tabs-selected");
});
<?php $this->jQuery()->javascriptCaptureEnd(); ?>
<div id="breadcrumb">
<ul>
<li>
<a href="#">
<?php
echo $this->getIcon('Server', '', 16)
. $this->config->get('config.dbuser.user') .'@'
. $this->config->get('config.dbuser.host');
$port = $this->config->get('config.dbuser.port');
if ($port > 0) {
echo ':' . $port;
}
?>
</a>
</li>
<li>
<a href="<?php echo $showDatabasesUrl;?>">
<?php echo$this->getIcon('Database', '', 16);?>
<?php echo $this->out($this->config->get('dynamic.dbActual'));?>
</a>
</li>
<?php
$actualTable = $this->config->get('dynamic.tableActual');
if ($actualTable > '') {
?>
<li>
<a href="#">
<?php echo$this->getIcon('Tables', '', 16);?>
<?php echo $this->out($actualTable);?>
</a>
</li>
<?php
}
?>
</ul>
</div>
<br />
<div id="headnavi" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li id="show.databases" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $showDatabasesUrl;?>">
<?php echo$this->getIcon('Database', '', 16);?>
<?php echo $this->lang->L_DBS;?>
</a>
</li>
<li id="show.tables" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $showTablesUrl;?>">
<?php echo$this->getIcon('Tables', '', 16);?>
<?php echo $this->lang->L_TABLES;?>
</a>
</li>
<li id="show.table.data" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $showTableDataUrl;?>">
<?php echo$this->getIcon('Tabledata', '', 16);?>
<?php echo $this->lang->L_RECORDS;?>
</a>
</li>
<li id="sqlbox" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $sqlBoxUrl;?>">
<?php echo$this->getIcon('SqlBrowser', '', 16);?>
<?php echo $this->lang->L_SQLBOX;?>
</a>
</li>
</ul>
</div>

Datei anzeigen

@ -0,0 +1,95 @@
<div id="content">
<h2><?php echo $this->lang->L_SQLBOX;?></h2>
<?php echo $this->sqlHeadNavi(); ?>
<div id="mysqlbox">
<form action="<?php echo $this->url(array('controller'=>'sql','action'=>'sqlbox'));?>" method="post" id="myForm">
<div id="sqlheaderbox" style="height:28px;">
<div style="padding:2px 8px 0 4px; float:left;">
<a href="sqlbox.phtml#" onclick="$('#sqltextarea').animate({ height: '-0'}, 300);return false;"><?php echo $this->getIcon('ArrowUp', '', 16);?></a>
<a href="sqlbox.phtml#" onclick="$('#sqltextarea').animate({ height: '+=60'}, 300);return false;"><?php echo $this->getIcon('plus');?></a>
<a href="sqlbox.phtml#" onclick="$('#sqltextarea').animate({ height: '-=60'}, 300);return false;"><?php echo $this->getIcon('minus');?></a>
</div>
<span style="float:left;">
<?php echo $this->lang->L_TABLE;?>: <select id="selectTable" class="text" onchange="setShowTableQuery();"><?php echo $this->tableSelectBox;?></select>
<input class="Formbutton" type="submit" name="execsql" value="<?php echo $this->lang->L_SQL_EXEC;?>" />
<input class="Formbutton" type="button" value="<?php echo $this->lang->L_RESET;?>" onclick="$('#sqltextarea').val('');"/>
</span>
<br class="clear" />
</div>
<div>
<textarea style="height:<?php echo $this->config->get('config.interface.sqlboxHeight');?>px;" name="sqltextarea" id="sqltextarea" rows="4" cols="10"><?php echo $this->boxcontent;?></textarea>
<div class="sqlbox-warning small center"><?php echo $this->lang->L_SQL_WARNING;?></div>
</div>
</form>
</div>
<br />
<?php
$this->jQuery()->javascriptCaptureStart();
if (isset($this->errorMessage)) {
$this->popUpMessage()->addMessage(
'SqlError',
$this->lang->L_ERROR,
$this->errorMessage,
array(
'modal' => true,
'height' => 220,
'width' => 400,
'dialogClass' => 'error'
)
);
}
?>
function setShowTableQuery()
{
query = $('#selectTable').attr('value');
query = 'SELECT * FROM `' + query + '`';
$('#sqltextarea').val(query);
$('#myForm').submit();
}
<?php
$this->jQuery()->javascriptCaptureEnd();
if (isset($this->resultset)) {
$res = $this->resultset;
if (count($res)>0) {
$fieldNames = array_keys($res[0]);
$i = 1;
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
?>
<table class="bdr" summary="Table lists result sets">
<tr class="thead">
<th class="right">#</th>
<?php
foreach ($fieldNames as $field) {
echo '<th>' . $field .'</th>';
}
?>
</tr>
<?php
foreach ($res as $row) {
?>
<tr class="<?php echo $cycleHelper->next()?>">
<td class="small right"><?php echo $this->numberFormat($i);?>.</td>
<?php
foreach ($row as $data) {
if (is_numeric($data)) {
echo '<td class="small right">' . $data . '</td>';
} else {
echo '<td class="small">' . $this->out($data) . '</td>';
}
}
echo '</tr>';
$i++;
}
?>
</table>
<?php
} else {
echo '<p>' . $this->lang->L_NO_ENTRIES . '</p>';
}
}
?>
</div>

Datei anzeigen

@ -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>

Datei anzeigen

@ -0,0 +1,8 @@
<div id="content">
<h2><?php echo $this->lang->L_SQL_CREATETABLE;?></h2>
<br /><br />
Hello (MySQLDumper-) World!
</div>

Datei anzeigen

@ -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>

Datei anzeigen

@ -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 '&nbsp;';
}
?>
</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>

Datei anzeigen

@ -0,0 +1,41 @@
<tr class="thead">
<th>&nbsp;</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>