Initial commit

This commit is contained in:
2022-11-21 09:47:28 +01:00
commit 76cec83d26
11652 changed files with 1980467 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<ul>
<li id="li_create_database" class="no_bullets">
<?php if ($GLOBALS['is_create_db_priv']): ?>
<form method="post" action="server_databases.php" id="create_database_form" class="ajax">
<strong>
<label for="text_create_db">
<?= \PMA\libraries\Util::getImage('b_newdb.png') , ' ' , __('Create database'); ?>
</label>&nbsp;<?= \PMA\libraries\Util::showMySQLDocu('CREATE_DATABASE'); ?>
</strong>
<br />
<?= PMA_URL_getHiddenInputs('', '', 5); ?>
<input type="hidden" name="reload" value="1" />
<?php if (! empty($dbstats)): ?>
<input type="hidden" name="dbstats" value="1" />
<?php endif; ?>
<input type="text" name="new_db" value="<?= htmlspecialchars($GLOBALS['db_to_create']); ?>"
maxlength="64" class="textfield" id="text_create_db" required
placeholder="<?= __('Database name'); ?>" />
<?= PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', null, null, true); ?>
<input type="submit" value="<?= __('Create'); ?>" id="buttonGo" />
</form>
<?php else: ?>
<!-- db creation no privileges message -->
<strong>
<?= \PMA\libraries\Util::getImage('b_newdb.png') , ' ' , __('Create database'); ?>&nbsp;<?= \PMA\libraries\Util::showMySQLDocu('CREATE_DATABASE'); ?>
</strong>
<br />
<span class="noPrivileges">
<?= \PMA\libraries\Util::getImage('s_error2.png', '', array('hspace' => 2, 'border' => 0, 'align' => 'middle')) , ' ' , __('No Privileges'); ?>
</span>
<?php endif; ?>
</li>
</ul>

View File

@ -0,0 +1,42 @@
<tfoot>
<tr>
<?php if ($GLOBALS['is_superuser'] || $GLOBALS['cfg']['AllowUserDropDatabase']): ?>
<th></th>
<?php endif; ?>
<th>
<?= __('Total'); ?>: <span id="databases_count"><?= $databaseCount; ?></span>
</th>
<?php foreach ($column_order as $stat_name => $stat):
if (! array_key_exists($stat_name, $first_database)) {
continue;
}
if ($stat['format'] === 'byte') {
list($value, $unit) = \PMA\libraries\Util::formatByteDown($stat['footer'], 3, 1);
} elseif ($stat['format'] === 'number') {
$value = \PMA\libraries\Util::formatNumber($stat['footer'], 0);
} else {
$value = htmlentities($stat['footer'], 0);
} ?>
<th class="value">
<?php if (isset($stat['description_function'])): ?>
<dfn title="<?= $stat['description_function']($stat['footer']); ?>">
<?= $value; ?>
</dfn>
<?php else: ?>
<?= $value; ?>
<?php endif; ?>
</th>
<?php if ($stat['format'] === 'byte'): ?>
<th class="unit"><?= $unit; ?></th>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($master_replication): ?>
<th></th>
<?php endif; ?>
<?php if ($slave_replication): ?>
<th></th>
<?php endif; ?>
<th></th>
</tr>
</tfoot>

View File

@ -0,0 +1,40 @@
<thead>
<tr>
<?php if ($GLOBALS['is_superuser'] || $GLOBALS['cfg']['AllowUserDropDatabase']): ?>
<th></th>
<?php endif; ?>
<th>
<a href="server_databases.php<?= PMA_URL_getCommon($_url_params); ?>">
<?= __('Database'); ?>
<?= ($sort_by == 'SCHEMA_NAME' ? \PMA\libraries\Util::getImage('s_' . $sort_order . '.png', $sort_order_text) : ''); ?>
</a>
</th>
<?php foreach ($column_order as $stat_name => $stat):
if (! array_key_exists($stat_name, $first_database)) {
continue;
}
$_url_params['sort_by'] = $stat_name;
$_url_params['sort_order'] = ($sort_by == $stat_name && $sort_order == 'desc') ? 'asc' : 'desc'; ?>
<th <?php if ($stat['format'] === 'byte'): ?>colspan="2"<?php endif; ?>>
<a href="server_databases.php<?= PMA_URL_getCommon($_url_params); ?>">
<?= $stat['disp_name']; ?>
<?= ($sort_by == $stat_name ? \PMA\libraries\Util::getImage('s_' . $sort_order . '.png', $sort_order_text) : ''); ?>
</a>
</th>
<?php endforeach; ?>
<?php if ($master_replication): ?>
<th>
<?= __('Master replication'); ?>
</th>
<?php endif; ?>
<?php if ($slave_replication): ?>
<th>
<?= __('Slave replication'); ?>
</th>
<?php endif; ?>
<th>
<?= __('Action'); ?>
</th>
</tr>
</thead>

View File

@ -0,0 +1,65 @@
<tr <?= $tr_class ? ('class="' . $tr_class . '"') : ''; ?>>
<?php if ($GLOBALS['is_superuser'] || $GLOBALS['cfg']['AllowUserDropDatabase']): ?>
<td class="tool">
<input type="checkbox" name="selected_dbs[]" class="checkall"
title="<?= htmlspecialchars($current['SCHEMA_NAME']); ?>"
value="<?= htmlspecialchars($current['SCHEMA_NAME']); ?>"
<?php if ($GLOBALS['dbi']->isSystemSchema($current['SCHEMA_NAME'], true)): ?>
disabled="disabled";
<?php endif; ?>
/>
</td>
<?php endif; ?>
<td class="name">
<a href="<?= \PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') , $url_query , '&amp;db=' , urlencode($current['SCHEMA_NAME']); ?>"
title="<?= sprintf(__('Jump to database'), htmlspecialchars($current['SCHEMA_NAME'])); ?>">
<?= htmlspecialchars($current['SCHEMA_NAME']); ?>
</a>
</td>
<?php foreach ($column_order as $stat_name => $stat):
if (! array_key_exists($stat_name, $current)) {
continue;
}
if ($stat['format'] === 'byte') {
list($value, $unit) = \PMA\libraries\Util::formatByteDown($current[$stat_name], 3, 1);
} elseif ($stat['format'] === 'number') {
$value = \PMA\libraries\Util::formatNumber($current[$stat_name], 0);
} else {
$value = htmlentities($current[$stat_name], 0);
} ?>
<td class="value">
<?php if (isset($stat['description_function'])): ?>
<dfn title="<?= $stat['description_function']($stat['footer']); ?>">
<?= $value; ?>
</dfn>
<?php else: ?>
<?= $value; ?>
<?php endif; ?>
</td>
<?php if ($stat['format'] === 'byte'): ?>
<td class="unit"><?= $unit; ?></td>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($master_replication_status): ?>
<td class="tool" style="text-align: center;">
<?= $master_replication; ?>
</td>
<?php endif; ?>
<?php if ($slave_replication_status): ?>
<td class="tool" style="text-align: center;">
<?= $slave_replication; ?>
</td>
<?php endif; ?>
<td class="tool">
<a onclick="PMA_commonActions.setDb('<?= PMA_jsFormat($current['SCHEMA_NAME']) ?>');"
href="server_privileges.php<?= $url_query; ?>&amp;db=<?= urlencode($current['SCHEMA_NAME']); ?>&amp;checkprivsdb=<?= urlencode($current['SCHEMA_NAME']); ?>"
title="<?= htmlspecialchars(sprintf(__('Check privileges for database "%s".'), $current['SCHEMA_NAME'])); ?>">
<?= \PMA\libraries\Util::getIcon('s_rights.png', __('Check privileges')); ?>
</a>
</td>
</tr>