- require_once common.lib.php BEFORE ANYTHING else
- unified style, removed tables - removed superuser check for dbstats
This commit is contained in:
@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2005-11-18 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||||
|
* server_databases.php:
|
||||||
|
- require_once common.lib.php BEFORE ANYTHING else
|
||||||
|
- unified style, removed tables
|
||||||
|
- removed superuser check for dbstats
|
||||||
|
|
||||||
2005-11-17 Marc Delisle <lem9@users.sourceforge.net>
|
2005-11-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* Documentation.html: patch #1353283, thanks to Isaac Bennetch
|
* Documentation.html: patch #1353283, thanks to Isaac Bennetch
|
||||||
* lang/finnish: update, thanks to Jouni Kahkonen
|
* lang/finnish: update, thanks to Jouni Kahkonen
|
||||||
|
@@ -5,6 +5,9 @@
|
|||||||
/**
|
/**
|
||||||
* Does the common work
|
* Does the common work
|
||||||
*/
|
*/
|
||||||
|
require_once('./libraries/common.lib.php');
|
||||||
|
|
||||||
|
|
||||||
$js_to_run = 'functions.js';
|
$js_to_run = 'functions.js';
|
||||||
require('./server_common.inc.php');
|
require('./server_common.inc.php');
|
||||||
|
|
||||||
@@ -96,16 +99,6 @@ echo '<h2>' . "\n"
|
|||||||
. ( $dbstats ? $strDatabasesStats : $strDatabases ) . "\n"
|
. ( $dbstats ? $strDatabasesStats : $strDatabases ) . "\n"
|
||||||
.'</h2>' . "\n";
|
.'</h2>' . "\n";
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if the user is allowed to do what he tries to...
|
|
||||||
*/
|
|
||||||
if ( $dbstats && ! $is_superuser ) {
|
|
||||||
echo $strNoPrivileges . "\n";
|
|
||||||
require_once('./footer.inc.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the databases list
|
* Gets the databases list
|
||||||
*/
|
*/
|
||||||
@@ -261,7 +254,7 @@ if ( count($databases) > 0 ) {
|
|||||||
unset( $key, $current, $odd_row );
|
unset( $key, $current, $odd_row );
|
||||||
|
|
||||||
echo '<tr>' . "\n";
|
echo '<tr>' . "\n";
|
||||||
if ( $is_superuser ) {
|
if ( $is_superuser || $cfg['AllowUserDropDatabase'] ) {
|
||||||
echo ' <th> </th>' . "\n";
|
echo ' <th> </th>' . "\n";
|
||||||
}
|
}
|
||||||
echo ' <th>' . $strTotalUC . ': ' . count( $databases ) . '</th>' . "\n";
|
echo ' <th>' . $strTotalUC . ': ' . count( $databases ) . '</th>' . "\n";
|
||||||
@@ -307,91 +300,34 @@ if ( count($databases) > 0 ) {
|
|||||||
PMA_buttonOrImage( 'drop_selected_dbs', 'mult_submit', 'drop_selected_dbs', $strDrop, 'b_deltbl.png' );
|
PMA_buttonOrImage( 'drop_selected_dbs', 'mult_submit', 'drop_selected_dbs', $strDrop, 'b_deltbl.png' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $GLOBALS['cfg']['PropertiesIconic'] ) {
|
if ( PMA_MYSQL_INT_VERSION < 50002 ) {
|
||||||
// iconic view
|
echo '<ul><li id="li_switch_dbstats"><strong>' . "\n";
|
||||||
if ($is_superuser || $cfg['AllowUserDropDatabase']) {
|
if ( empty( $dbstats ) ) {
|
||||||
echo '<table cellpadding="2" cellspacing="0">' . "\n";
|
echo ' <a href="./server_databases.php?' . $url_query . '&dbstats=1"'
|
||||||
if ( $is_superuser && ! $dbstats && PMA_MYSQL_INT_VERSION < 50002 ) {
|
.' title="' . $strDatabasesStatsEnable . '">' . "\n"
|
||||||
echo '<tr><td><a href="./server_databases.php?' . $url_query . '&dbstats=1" title="' . $strDatabasesStatsEnable . '">' . "\n"
|
.' ' . $strDatabasesStatsEnable;
|
||||||
. ' <img class="icon" src="' .$pmaThemeImage . 'b_dbstatistics.png" width="16" height="16" alt="" />' . "\n"
|
} else {
|
||||||
. ' </a>' . "\n"
|
echo ' <a href="./server_databases.php?' . $url_query . '"'
|
||||||
. ' </td>' . "\n"
|
.' title="' . $strDatabasesStatsDisable . '">' . "\n"
|
||||||
. ' <td><strong>' . "\n"
|
.' ' . $strDatabasesStatsDisable;
|
||||||
. ' <a href="./server_databases.php?' . $url_query . '&dbstats=1" title="' . $strDatabasesStatsEnable . '">' . "\n"
|
|
||||||
. ' ' . $strDatabasesStatsEnable . "\n"
|
|
||||||
. ' </a>' . "\n"
|
|
||||||
. ' </strong>' . "\n"
|
|
||||||
. ' </td></tr><tr><td></td><td>' . "\n"
|
|
||||||
. ' ' . $strDatabasesStatsHeavyTraffic . "\n"
|
|
||||||
. ' <br /> </td></tr>' . "\n";
|
|
||||||
} elseif ( $is_superuser && $dbstats ) {
|
|
||||||
echo '<tr><td><a href="./server_databases.php?' . $url_query . '" title="' . $strDatabasesStatsDisable . '">' . "\n"
|
|
||||||
. ' <img class="icon" src="' .$pmaThemeImage . 'b_dbstatistics.png" width="16" height="16" alt="" />' . "\n"
|
|
||||||
. ' </a>' . "\n"
|
|
||||||
. ' </td><td>' . "\n"
|
|
||||||
. ' <strong>' . "\n"
|
|
||||||
. ' <a href="./server_databases.php?' . $url_query . '" title="' . $strDatabasesStatsDisable . '">' . "\n"
|
|
||||||
. ' ' . $strDatabasesStatsDisable . "\n"
|
|
||||||
. ' </a>' . "\n"
|
|
||||||
. ' </strong>' . "\n"
|
|
||||||
. ' </td></tr><tr><td colspan="2"> </td></tr>' . "\n";
|
|
||||||
}
|
|
||||||
echo '</table>' . "\n";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// classic view
|
|
||||||
if ($is_superuser || $cfg['AllowUserDropDatabase']) {
|
|
||||||
echo '<ul>' . "\n";
|
|
||||||
if ( $is_superuser && ! $dbstats && PMA_MYSQL_INT_VERSION < 50002 ) {
|
|
||||||
echo ' <li><strong>' . "\n"
|
|
||||||
. ' <a href="./server_databases.php?' . $url_query . '&dbstats=1" title="' . $strDatabasesStatsEnable . '">' . "\n"
|
|
||||||
. ' ' . $strDatabasesStatsEnable . "\n"
|
|
||||||
. ' </a>' . "\n"
|
|
||||||
. ' </strong><br />' . "\n"
|
|
||||||
. ' ' . $strDatabasesStatsHeavyTraffic . '</li>' . "\n";
|
|
||||||
} elseif ( $is_superuser && $dbstats ) {
|
|
||||||
echo ' <li><strong>' . "\n"
|
|
||||||
. ' <a href="./server_databases.php?' . $url_query . '" title="' . $strDatabasesStatsDisable . '">' . "\n"
|
|
||||||
. ' ' . $strDatabasesStatsDisable . "\n"
|
|
||||||
. ' </a>' . "\n"
|
|
||||||
. ' </strong>' . "\n"
|
|
||||||
. ' <br /></li>' . "\n";
|
|
||||||
}
|
|
||||||
echo '</ul>' . "\n";
|
|
||||||
}
|
}
|
||||||
|
echo '</a></strong><br />' . "\n"
|
||||||
|
.' <div class="warning">'
|
||||||
|
. $strDatabasesStatsHeavyTraffic . '</div></li>' . "\n"
|
||||||
|
.'</ul>' . "\n";
|
||||||
}
|
}
|
||||||
echo '</form>' . "\n";
|
echo '</form>';
|
||||||
} else {
|
} else {
|
||||||
echo $strNoDatabases . "\n";
|
echo $strNoDatabases;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new database.
|
* Create new database.
|
||||||
*/
|
*/
|
||||||
if ( $GLOBALS['cfg']['PropertiesIconic'] )
|
echo '<ul><li id="li_create_database">' . "\n";
|
||||||
{
|
|
||||||
echo '<table cellpadding="2" cellspacing="0">' . "\n";
|
|
||||||
echo '<tr><td style="vertical-align: baseline;">' . "\n"
|
|
||||||
. ' <img class="icon" src="' .$pmaThemeImage . 'b_newdb.png" width="16" height="16" alt="" />' . "\n"
|
|
||||||
. ' </td>' . "\n"
|
|
||||||
. ' <td>' . "\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo '<ul><li>' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
require('./libraries/display_create_database.lib.php');
|
require('./libraries/display_create_database.lib.php');
|
||||||
|
echo ' </li>' . "\n";
|
||||||
if ( $GLOBALS['cfg']['PropertiesIconic'] )
|
echo '</ul>' . "\n";
|
||||||
{
|
|
||||||
echo ' </td></tr></table>' . "\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo ' </li>' . "\n";
|
|
||||||
echo '</ul>' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends the footer
|
* Sends the footer
|
||||||
|
Reference in New Issue
Block a user