commited patch #458014 - Advanced index generation/editing thanks to Michal Cihar

This commit is contained in:
Loïc Chapeaux
2001-11-09 20:34:25 +00:00
parent 93ce91f1ad
commit 9d3ecd3048
35 changed files with 1157 additions and 200 deletions

View File

@@ -17,6 +17,10 @@ $Source$
* libraries/display_tbl.lib.php3, lines 715-724: return to the browse mode
once a "KILL" statement has been run. Thanks to
Florian Perrichot <perrich at club-internet.fr> for this suggestion.
* header.inc.php3; tbl_indexes.php3; tbl_printview.php3;
tbl_properties.php3; libraries/indexes.js; lang/*: commited patch
#458014 - Advanced index generation/editing thanks to
Michal Cihar <nijel at users.sourceforge.net>.
2001-11-08 Robin Johnson <robbat2@users.sourceforge.net>
* config.inc.php3; main.php3; phpinfo.php3: fixed bug #479303

View File

@@ -105,6 +105,17 @@ var jsPasswordNotSame = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPassw
</script>
<script src="libraries/user_details.js" type="text/javascript" language="javascript"></script>
<?php
} else if (isset($js_to_run) && $js_to_run == 'indexes.js') {
echo "\n";
?>
// js index validation stuff
var errorMsg0 = '<?php echo str_replace('\'', '\\\'', $strFormEmpty); ?>';
var errorMsg1 = '<?php echo str_replace('\'', '\\\'', $strNotNumber); ?>';
var errorMsg2 = '<?php echo str_replace('\'', '\\\'', $strNotValidNumber); ?>';
//-->
</script>
<script src="libraries/indexes.js" type="text/javascript" language="javascript"></script>
<?php
} else {
echo "\n";
?>

View File

@@ -321,4 +321,20 @@ $strUpdateProfile = 'Update profile:';//to translate
$strUpdateProfileMessage = 'The profile has been updated.';//to translate
$strWithChecked = 'With selected:'; //to translate
$strZip = '"zipped"'; //to translate
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -323,4 +323,20 @@ $strShowAll = 'Show all'; // to translate
$strStartingRecord = 'Starting record';//to translate
$strTableHasBeenFlushed = 'Table %s has been flushed';
$strUseBackquotes = 'Use backquotes with tables and fields\' names';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -322,4 +322,20 @@ $strUpdateProfile = 'Update profile:';//to translate
$strUpdateProfileMessage = 'The profile has been updated.';//to translate
$strUseBackquotes = 'Use backquotes with tables and fields\' names';
$strWithChecked = 'With selected:';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -322,4 +322,20 @@ $strUpdateProfileMessage = 'The profile has been updated.';//to translate
$strUseBackquotes = ' Use backquotes with tables and fields names '; //to translate
$strWithChecked = 'With selected:';
$strZip = '"zipped"'; //to translate
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -326,4 +326,20 @@ $strUpdateProfile = 'Update profile:';//to translate
$strUpdateProfileMessage = 'The profile has been updated.';//to translate
$strUseBackquotes = 'Use backquotes with tables and fields\' names';
$strWithChecked = 'With selected:';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -322,4 +322,20 @@ $strZip = '"zazipov
$strAfterInsertBack = 'Return';
$strAfterInsertNewInsert = 'Insert a new record';
$strBookmarkDeleted = 'The bookmark has been deleted.';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -324,4 +324,20 @@ $strZip = '"zazipov
$strAfterInsertBack = 'Return';
$strAfterInsertNewInsert = 'Insert a new record';
$strBookmarkDeleted = 'The bookmark has been deleted.';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -321,4 +321,20 @@ $strBookmarkDeleted = 'The bookmark has been deleted.';
$strFlushTable = 'Flush the table ("FLUSH")';
$strNoFrames = 'phpMyAdmin is more friendly with a <b>frames-capable</b> browser.';
$strTableHasBeenFlushed = 'Table %s has been flushed';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -321,4 +321,20 @@ $strUpdateProfileMessage = 'The profile has been updated.';//to translate
$strUseBackquotes = 'Gebruik backquotes bij tabellen en velden\' namen'; // what are backquotes?
$strWithChecked = 'With selected:';
$strZip = '"zipped"'; //to translate
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -23,6 +23,7 @@ $strAddNewField = 'Add new field';
$strAddPriv = 'Add a new Privilege';
$strAddPrivMessage = 'You have added a new privilege.';
$strAddSearchConditions = 'Add search conditions (body of the "where" clause):';
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strAddUser = 'Add a new User';
$strAddUserMessage = 'You have added a new user.';
$strAffectedRows = 'Affected rows:';
@@ -58,6 +59,8 @@ $strBrowse = 'Browse';
$strBzip = '"bzipped"';
$strCantLoadMySQL = 'cannot load MySQL extension,<br />please check PHP Configuration.';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCarriage = 'Carriage return: \\r';
$strChange = 'Change';
$strCheckAll = 'Check All';
@@ -70,6 +73,8 @@ $strConfirm = 'Do you really want to do it?';
$strCopyTable = 'Copy table to (database<b>.</b>table):';
$strCopyTableOK = 'Table %s has been copied to %s.';
$strCreate = 'Create';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strCreateNewDatabase = 'Create new database';
$strCreateNewTable = 'Create new table on database ';
$strCriteria = 'Criteria';
@@ -138,9 +143,12 @@ $strHostEmpty = 'The host name is empty!';
$strIdxFulltext = 'Fulltext';
$strIfYouWish = 'If you wish to load only some of a table\'s columns, specify a comma separated field list.';
$strIgnore = 'Ignore';
$strIndex = 'Index';
$strIndexHasBeenDropped = 'Index %s has been dropped';
$strIndexes = 'Indexes';
$strIndexHasBeenDropped = 'Index %s has been dropped';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strInsert = 'Insert';
$strInsertAsNewRow = 'Insert as new row';
$strInsertedRows = 'Inserted rows:';
@@ -166,6 +174,7 @@ $strLogout = 'Log out';
$strModifications = 'Modifications have been saved';
$strModify = 'Modify';
$strModifyIndexTopic = 'Modify an index';
$strMoveTable = 'Move table to (database<b>.</b>table):';
$strMoveTableOK = 'Table %s has been moved to %s.';
$strMySQLReloaded = 'MySQL reloaded.';
@@ -181,7 +190,10 @@ $strNo = 'No';
$strNoDatabases = 'No databases';
$strNoDropDatabases = '"DROP DATABASE" statements are disabled.';
$strNoFrames = 'phpMyAdmin is more friendly with a <b>frames-capable</b> browser.';
$strNoIndex = 'No index defined!';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoModification = 'No change';
$strNone = 'None';
$strNoPassword = 'No Password';
$strNoPrivileges = 'No Privileges';
$strNoQuery = 'No SQL query!'; //to translate
@@ -211,6 +223,8 @@ $strPrevious = 'Previous';
$strPrimary = 'Primary';
$strPrimaryKey = 'Primary key';
$strPrimaryKeyHasBeenDropped = 'The primary key has been dropped';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
$strPrintView = 'Print view';
$strPrivileges = 'Privileges';
$strProperties = 'Properties';
@@ -320,4 +334,5 @@ $strWrongUser = 'Wrong username/password. Access denied.';
$strYes = 'Yes';
$strZip = '"zipped"';
?>

View File

@@ -326,4 +326,20 @@ $strAfterInsertBack = 'Return';
$strAfterInsertNewInsert = 'Insert a new record';
$strBookmarkDeleted = 'The bookmark has been deleted.';
$strOverhead = 'Overhead';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -23,6 +23,7 @@ $strAddNewField = 'Ajouter un champ';
$strAddPriv = 'Ajouter un privil<69>ge';
$strAddPrivMessage = 'Vous avez ajout<75> un privil<69>ge';
$strAddSearchConditions = 'Crit<69>res de recherche (pour l\'<27>nonc<6E> "where"):';
$strAddToIndex = 'Ajouter <20> la clef&nbsp;%s&nbsp;colonne(s)';
$strAddUser = 'Ajouter un utilisateur';
$strAddUserMessage = 'Vous avez ajout<75> un utilisateur';
$strAffectedRows = 'Nombre d\'enregistrements affect<63>s :';
@@ -58,6 +59,8 @@ $strBrowse = 'Afficher';
$strBzip = '"bzipp<70>"';
$strCantLoadMySQL = 'ne peux charger l\'extension MySQL,<br />v<>rifiez la configuration PHP';
$strCantRenameIdxToPrimary = 'La clef ne peut <20>tre renomm<6D>e PRIMARY&nbsp;!';
$strCardinality = 'Cardinalit<69>';
$strCarriage = 'Retour de chariot : \\r';
$strChange = 'Modifier';
$strCheckAll = 'Tout cocher';
@@ -70,6 +73,8 @@ $strConfirm = 'Veuillez confirmer';
$strCopyTable = '<b>Copier</b> la table vers (base<b>.</b>table)&nbsp;:';
$strCopyTableOK = 'La table %s a <20>t<EFBFBD> copi<70>e vers %s.';
$strCreate = 'Cr<43>er';
$strCreateIndex = 'Cr<43>er une clef sur&nbsp;%s&nbsp;colonne(s)';
$strCreateIndexTopic = 'Cr<43>er un nouvelle clef';
$strCreateNewDatabase = 'Cr<43>er une base de donn<6E>es';
$strCreateNewTable = 'Cr<43>er une nouvelle table sur la base ';
$strCriteria = 'Crit<69>re';
@@ -138,9 +143,12 @@ $strHostEmpty = 'Le nom de serveur est vide';
$strIdxFulltext = 'Texte entier';
$strIfYouWish = 'Si vous d<>sirez ne charger que certaines colonnes, indiquez leurs noms, s<>par<61>s par des virgules.';
$strIgnore = 'Ignorer';
$strIndex = 'Index';
$strIndexes = 'Index';
$strIndexHasBeenDropped = 'L\'index %s a <20>t<EFBFBD> effac<61>';
$strIndexName = 'Nom de la clef&nbsp;:';
$strIndexType = 'Type de clef&nbsp;:';
$strInsert = 'Ins<6E>rer';
$strInsertAsNewRow = 'Ins<6E>rer en tant que nouvel enregistrement';
$strInsertedRows = 'Nombre d\'enregistrements ins<6E>r<EFBFBD>s :';
@@ -166,6 +174,7 @@ $strLogout = 'Quitter';
$strModifications = 'Les modifications ont <20>t<EFBFBD> sauvegard<72>es.';
$strModify = 'Modifier';
$strModifyIndexTopic = 'Modifier une clef';
$strMoveTable = '<b>D<>placer</b> la table vers (base<b>.</b>table)&nbsp;:';
$strMoveTableOK = 'La table %s a <20>t<EFBFBD> d<>plac<61>e vers %s.';
$strMySQLReloaded = 'MySQL recharg<72>.';
@@ -181,7 +190,10 @@ $strNo = 'Non';
$strNoDropDatabases = 'La commande "DROP DATABASE" est d<>sactiv<69>e.';
$strNoDatabases = 'Aucune base de donn<6E>es';
$strNoFrames = 'L\'utilisation de phpMyAdmin est plus ais<69>e avec un navigateur <b>supportant les "frames"</b>.';
$strNoIndex = 'Aucune clef n\'est d<>finie&nbsp;!';
$strNoIndexPartsDefined = 'Aucune colonne n\'a <20>t<EFBFBD> d<>finie pour cette clef&nbsp;!';
$strNoModification = 'Pas de modifications';
$strNone = 'Nulle';
$strNoPassword = 'aucun mot de passe';
$strNoPrivileges = 'aucun privil<69>ge';
$strNoQuery = 'Aucune requ<71>te SQL !';
@@ -211,6 +223,8 @@ $strPrevious = 'Pr
$strPrimary = 'Primaire';
$strPrimaryKey = 'Cl<43> primaire';
$strPrimaryKeyHasBeenDropped = 'La cl<63> primaire a <20>t<EFBFBD> effac<61>e';
$strPrimaryKeyName = 'Le nom d\'une clef primaire doit <20>tre PRIMARY&nbsp;!';
$strPrimaryKeyWarning = '("PRIMARY" <b>doit et ne peut <20>tre</b> que le nom d'\une clef primaire&nsbp;!)';
$strPrintView = 'Version imprimable';
$strPrivileges = 'Privil<EFBFBD>ges';
$strProperties = 'Propri<EFBFBD>t<EFBFBD>s';

View File

@@ -322,4 +322,20 @@ $strCopyTable = 'Copy table to (database<b>.</b>table):';
$strMoveTable = 'Move table to (database<b>.</b>table):';
$strMoveTableOK = 'Table %s has been moved to %s.';
$strNoQuery = 'No SQL query!'; //to translate
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -322,4 +322,20 @@ $strRunningAs = 'as';
$strShowCols = 'Show columns';
$strShowTables = 'Show tables';
$strTableHasBeenFlushed = 'Table %s has been flushed';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -322,4 +322,20 @@ $strTableHasBeenFlushed = 'Table %s has been flushed';
$strUpdatePrivMessage = 'You have updated the privileges for %s.';//to translate
$strUpdateProfile = 'Update profile:';//to translate
$strUpdateProfileMessage = 'The profile has been updated.';//to translate
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -324,5 +324,19 @@ $strYes = ' Si ';
$strZip = '"compresso con zip"';
// To translate
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -325,4 +325,20 @@ $strUpdateProfile = 'Update profile:';//to translate
$strUpdateProfileMessage = 'The profile has been updated.';//to translate
$strUseBackquotes = 'Use backquotes with tables and fields\' names';
$strWithChecked = 'With selected:';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -325,4 +325,20 @@ $strUpdateProfile = 'Update profile:';//to translate
$strUpdateProfileMessage = 'The profile has been updated.';//to translate
$strUseBackquotes = 'Use backquotes with tables and fields\' names';
$strWithChecked = 'With selected:';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -321,4 +321,20 @@ $strZip = '"komprimert (zip)"';
$strAfterInsertBack = 'Return';
$strAfterInsertNewInsert = 'Insert a new record';
$strBookmarkDeleted = 'The bookmark has been deleted.';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -321,4 +321,20 @@ $strCopyTable = 'Copy table to (database<b>.</b>table):';
$strMoveTable = 'Move table to (database<b>.</b>table):';
$strMoveTableOK = 'Table %s has been moved to %s.';
$strNoQuery = 'No SQL query!'; //to translate
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -325,4 +325,20 @@ $strUpdateProfile = 'Update profile:';//to translate
$strUpdateProfileMessage = 'The profile has been updated.';//to translate
$strUseBackquotes = 'Use backquotes with tables and fields\' names';
$strWithChecked = 'With selected:';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -321,4 +321,20 @@ $strMoveTable = 'Move table to (database<b>.</b>table):';
$strMoveTableOK = 'Table %s has been moved to %s.';
$strNoQuery = 'No SQL query!'; //to translate
$strZip = '"zipped"'; //to translate
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -322,4 +322,20 @@ $strZip = '
$strAfterInsertBack = 'Return';
$strAfterInsertNewInsert = 'Insert a new record';
$strBookmarkDeleted = 'The bookmark has been deleted.';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -322,4 +322,20 @@ $strZip = '
$strAfterInsertBack = 'Return';
$strAfterInsertNewInsert = 'Insert a new record';
$strBookmarkDeleted = 'The bookmark has been deleted.';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -325,4 +325,19 @@ $strZip = '"zo zipovan
// To translate
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -320,4 +320,20 @@ $strUpdateProfile = 'Update profile:';//to translate
$strUpdateProfileMessage = 'The profile has been updated.';//to translate
$strWithChecked = 'With selected:';
$strZip = '"zipped"'; //to translate
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -322,4 +322,20 @@ $strZip = '"zippad"';
$strAfterInsertBack = 'Return';
$strAfterInsertNewInsert = 'Insert a new record';
$strBookmarkDeleted = 'The bookmark has been deleted.';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -326,4 +326,20 @@ $strUpdateProfile = 'Update profile:';//to translate
$strUpdateProfileMessage = 'The profile has been updated.';//to translate
$strUseBackquotes = 'Use backquotes with tables and fields\' names';
$strWithChecked = 'With selected:';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

View File

@@ -322,4 +322,20 @@ $strZip = '"ziplenmi
$strAfterInsertBack = 'Return';
$strAfterInsertNewInsert = 'Insert a new record';
$strBookmarkDeleted = 'The bookmark has been deleted.';
// Indexes
$strAddToIndex = 'Add to index &nbsp;%s&nbsp;column(s)';
$strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCardinality = 'Cardinality';
$strCreateIndex = 'Create an index on&nbsp;%s&nbsp;columns';
$strCreateIndexTopic = 'Create a new index';
$strIgnore = 'Ignore';
$strIndexName = 'Index name&nbsp;:';
$strIndexType = 'Index type&nbsp;:';
$strModifyIndexTopic = 'Modify an index';
$strNone = 'None';
$strNoIndexPartsDefined = 'No index parts defined!';
$strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
?>

87
libraries/indexes.js Normal file
View File

@@ -0,0 +1,87 @@
/* $Id$ */
/**
* Ensures a value submitted in a form is numeric and is in a range
*
* @param object the form
* @param string the name of the form field to check
* @param integer the minimum authorized value
* @param integer the maximum authorized value
*
* @return boolean whether a valid number has been submitted or not
*/
function checkFormElementInRange(theForm, theFieldName, min, max)
{
var theField = theForm.elements[theFieldName];
var val = parseInt(theField.value);
if (typeof(min) == 'undefined') {
min = 0;
}
if (typeof(max) == 'undefined') {
max = Number.MAX_VALUE;
}
// It's not a number
if (isNaN(val)) {
theField.select();
alert(errorMsg1);
theField.focus();
return false;
}
// It's a number but it is not between min and max
else if (val < min || val > max) {
theField.select();
alert(val + errorMsg2);
theField.focus();
return false;
}
// It's a valid number
else {
theField.value = val;
}
return true;
} // end of the 'checkFormElementInRange()' function
/**
* Ensures indexes names are valid according to their type and, for a primary
* key, lock index name to 'PRIMARY'
*
* @return boolean false if there is no index form, true else
*/
function checkIndexName()
{
if (typeof(document.forms['index_frm']) == 'undefined') {
return false;
}
// Gets the elements pointers
var the_idx_name = document.forms['index_frm'].elements['index'];
var the_idx_type = document.forms['index_frm'].elements['index_type'];
// Index is a primary key
if (the_idx_type.options[0].value == 'PRIMARY' && the_idx_type.options[0].selected) {
document.forms['index_frm'].elements['index'].value = 'PRIMARY';
if (typeof(the_idx_name.disabled) != 'undefined') {
document.forms['index_frm'].elements['index'].disabled = true;
}
}
// Other cases
else {
if (the_idx_name.value == 'PRIMARY') {
document.forms['index_frm'].elements['index'].value = '';
}
if (typeof(the_idx_name.disabled) != 'undefined') {
document.forms['index_frm'].elements['index'].disabled = false;
}
}
return true;
} // end of the 'checkIndexName()' function
onload = checkIndexName;

501
tbl_indexes.php3 Normal file
View File

@@ -0,0 +1,501 @@
<?php
/* $Id$ */
/**
* Gets some core libraries
*/
require('./libraries/grab_globals.lib.php3');
require('./libraries/common.lib.php3');
/**
* Defines the index types
*/
$index_types = array(
'INDEX',
'PRIMARY',
'UNIQUE',
'FULLTEXT'
);
/**
* Ensures the db & table are valid, then loads headers and gets indexes
* informations.
* Skipped if this script is called by "tbl_properties.php3"
*/
if (!defined('_IDX_INCLUDED_')) {
// Not a valid db name -> back to the welcome page
if (!empty($db)) {
$is_db = @mysql_select_db($db);
}
if (empty($db) || !$is_db) {
header('Location: ' . $cfgPmaAbsoluteUri . 'main.php3?lang=' . $lang . '&server=' . $server . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
exit();
}
// Not a valid table name -> back to the db_details.php3
if (!empty($table)) {
$is_table = @mysql_query("SHOW TABLES LIKE '" . sql_addslashes($table, TRUE) . '\'');
}
if (empty($table) || !@mysql_numrows($is_table)) {
header('Location: ' . $cfgPmaAbsoluteUri . 'db_details.php3?lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db) . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
exit();
} else if (isset($is_table)) {
mysql_free_result($is_table);
}
// Displays headers (if needed)
$js_to_run = ((isset($index) && isset($do_save_data)) ? 'functions.js' : 'indexes.js');
include('./header.inc.php3');
} // end if
/**
* Gets fields and indexes informations
*/
if (defined('_IDX_INCLUDED_')) {
$err_url_0 = 'db_details.php3'
. '?lang=' . $lang
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db);
}
// Gets table keys and store them in arrays
$indexes = array();
$prev_index = '';
$indexes_info = array();
$indexes_data = array();
// keys had already been grabbed in "tbl_properties.php3"
if (defined('_IDX_INCLUDED_')) {
$idx_cnt = count($ret_keys);
} else {
$local_query = 'SHOW KEYS FROM ' . backquote($table);
$result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url_0);
$idx_cnt = mysql_num_rows($result);
}
for ($i = 0; $i < $idx_cnt; $i++) {
$row = (defined('_IDX_INCLUDED_') ? $ret_keys[$i] : mysql_fetch_array($result));
if ($row['Key_name'] != $prev_index ){
$indexes[] = $row['Key_name'];
$prev_index = $row['Key_name'];
}
$indexes_info[$row['Key_name']]['Sequences'][] = $row['Seq_in_index'];
$indexes_info[$row['Key_name']]['Non_unique'] = $row['Non_unique'];
if (isset($row['Cardinality'])) {
$indexes_info[$row['Key_name']]['Cardinality'] = $row['Cardinality'];
}
// I don't know what does following column mean....
// $indexes_info[$row['Key_name']]['Packed'] = $row['Packed'];
$indexes_info[$row['Key_name']]['Comment'] = $row['Comment'];
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Column_name'] = $row['Column_name'];
if (isset($row['Sub_part'])) {
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Sub_part'] = $row['Sub_part'];
}
} // end while
if (defined('_IDX_INCLUDED_')) {
unset($ret_keys);
} else if ($result) {
mysql_free_result($result);
}
// Get fields and stores their name/type
// fields had already been grabbed in "tbl_properties.php3"
if (defined('_IDX_INCLUDED_')) {
mysql_data_seek($fields_rs, 0);
} else {
$local_query = 'SHOW FIELDS FROM ' . backquote($table);
$fields_rs = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url_0);
$fields_cnt = mysql_num_rows($fields_rs);
}
$fields_names = array();
$fields_types = array();
while ($row = mysql_fetch_array($fields_rs)) {
$fields_names[] = $row['Field'];
$fields_types[] = $row['Type'];
} // end while
if ($fields_rs) {
mysql_free_result($fields_rs);
}
/**
* Stipslashes some variables if required
*/
if (get_magic_quotes_gpc()) {
if (isset($index)) {
$index = stripslashes($index);
}
if (isset($old_index)) {
$old_index = stripslashes($old_index);
}
} // end if
/**
* Do run the query to build the new index and moves back to
* "tbl_properties.php3"
*/
if (!defined('_IDX_INCLUDED_')
&& (isset($index) && isset($do_save_data))) {
$err_url = 'tbl_indexes.php3'
. '?lang=' . $lang
. '&amp;server=' . $server
. '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table);
if (empty($old_index)) {
$err_url .= '&amp;create_index=1&amp;idx_num_fields=' . $idx_num_fields;
} else {
$err_url .= '&amp;index=' . urlencode($old_index);
}
if ($index_type == 'PRIMARY') {
if ($index == '') {
$index = 'PRIMARY';
} else if ($index != 'PRIMARY') {
mysql_die($strPrimaryKeyName, '', FALSE, $err_url);
}
} else if ($index == 'PRIMARY') {
mysql_die($strCantRenameIdxToPrimary, '', FALSE, $err_url);
}
$sql_query = 'ALTER TABLE ' . backquote($table);
// Drops the old index
if (!empty($old_index)) {
if ($old_index == 'PRIMARY') {
$sql_query .= ' DROP PRIMARY KEY,';
} else {
$sql_query .= ' DROP INDEX ' . backquote($old_index) .',';
}
} // end if
// Builds the new one
switch ($index_type) {
case 'PRIMARY':
$sql_query .= ' ADD PRIMARY KEY (';
break;
case 'FULLTEXT':
$sql_query .= ' ADD FULLTEXT ' . (empty($index) ? '' : backquote($index)) . ' (';
break;
case 'UNIQUE':
$sql_query .= ' ADD UNIQUE ' . (empty($index) ? '' : backquote($index)) . ' (';
break;
case 'INDEX':
$sql_query .= ' ADD INDEX ' . (empty($index) ? '' : backquote($index)) . ' (';
break;
} // end switch
$index_fields = '';
while (list($i, $name) = each($column)) {
if ($name != '--ignore--') {
$index_fields .= (empty($index_fields) ? '' : ',')
. backquote(get_magic_quotes_gpc() ? stripslashes($name) : $name)
. (empty($sub_part[$i]) ? '' : '(' . $sub_part[$i] . ')');
}
} // end while
if (empty($index_fields)){
mysql_die($strNoIndexPartsDefined, '', FALSE, $err_url);
} else {
$sql_query .= $index_fields . ')';
}
$result = mysql_query($sql_query) or mysql_die('', '', FALSE, $err_url);
$message = $strTable . ' ' . htmlspecialchars($table) . ' ' . $strHasBeenAltered;
include('./tbl_properties.php3');
exit();
} // end builds the new index
/**
* Edits an index or defines a new one
*/
else if (!defined('_IDX_INCLUDED_')
&& (isset($index) || isset($create_index))) {
// Prepares the form values
if (!isset($index)) {
$index = '';
}
if (!isset($index_type)) {
$index_type = '';
}
if ($index == '' || !isset($indexes_info[$index])) {
$edited_index_info['Sequences'] = array();
$edited_index_data = array();
for ($i = 1; $i <= $idx_num_fields; $i++) {
$edited_index_info['Sequences'][] = $i;
$edited_index_data[$i] = array('Column_name' => '', 'Sub_part' => '');
} // end for
if ($index == ''
&& !isset($indexes_info['PRIMARY'])
&& ($index_type == '' || $index_type == 'PRIMARY')) {
$index = 'PRIMARY';
}
} else {
$edited_index_info = $indexes_info[$index];
$edited_index_data = $indexes_data[$index];
if ($edited_index_info['Comment'] == 'FULLTEXT') {
$index_type = 'FULLTEXT';
} else if ($index == 'PRIMARY') {
$index_type = 'PRIMARY';
} else if ($edited_index_info['Non_unique'] == '0') {
$index_type = 'UNIQUE';
} else {
$index_type = 'INDEX';
}
} // end if... else...
if (isset($add_fields)) {
if (isset($prev_add_fields)) {
$added_fields += $prev_add_fields;
}
$field_cnt = count($edited_index_info['Sequences']) + 1;
for ($i = $field_cnt; $i < ($added_fields + $field_cnt); $i++) {
$edited_index_info['Sequences'][] = $i;
$edited_index_data[$i] = array('Column_name' => '', 'Sub_part' => '');
} // end for
// Restore entered values
while (list($i, $name) = each($column)) {
if ($name != '--ignore--'){
$edited_index_data[$i+1]['Column_name'] = $name;
$edited_index_data[$i+1]['Sub_part'] = $sub_part[$i];
}
} // end while
} // end if
// end preparing form values
?>
<!-- Build index form -->
<form action="tbl_indexes.php3" method="post" name="index_frm"
onsubmit="if (typeof(this.elements['index'].disabled) != 'undefined') {this.elements['index'].disabled = false}">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<?php
if (isset($create_index)) {
echo '<input type="hidden" name="create_index" value="1" />';
}
echo "\n";
?>
<input type="hidden" name="old_index" value="<?php echo (isset($create_index) ? '' : $index); ?>" />
<b><?php echo '------ ' . (isset($create_index) ? $strCreateIndexTopic : $strModifyIndexTopic) . ' ------'; ?></b>
<br /><br />
<table border="0">
<tr>
<td><?php echo $strIndexName; ?>&nbsp;</td>
<td>
<input type="text" name="index" value="<?php echo htmlspecialchars($index); ?>" />
&nbsp;<?php echo $strPrimaryKeyWarning . "\n"; ?>
</td>
</tr>
<tr>
<td><?php echo $strIndexType; ?>&nbsp;</td>
<td>
<select name="index_type" onchange="return checkIndexName()">
<?php
if ($index == 'PRIMARY' || !isset($indexes_info['PRIMARY'])) {
echo ' '
. '<option value="PRIMARY"' . (($index_type == 'PRIMARY') ? ' selected="selected"' : '') . '>PRIMARY</option>';
}
echo "\n";
?>
<option value="UNIQUE"<?php if ($index_type == 'UNIQUE') echo ' selected="selected"'; ?>>UNIQUE</option>
<option value="FULLTEXT"<?php if ($index_type == 'FULLTEXT') echo ' selected="selected"'; ?>>FULLTEXT</option>
<option value="INDEX"<?php if ($index_type == 'INDEX') echo ' selected="selected"'; ?>>INDEX</option>
</select>&nbsp;
<?php echo show_docu('manual_Reference.html#ALTER_TABLE') . "\n"; ?>
</td>
</tr>
</table><br />
<table border="<?php echo $cfgBorder; ?>" cellpadding="5">
<tr>
<th><?php echo $strField; ?></th>
<th><?php echo $strSize; ?></th>
</tr>
<?php
while (list($row_no, $seq_index) = each($edited_index_info['Sequences'])) {
$add_type = (is_array($fields_types) && count($fields_types) == count($fields_names));
$selected = $edited_index_data[$seq_index]['Column_name'];
if (!empty($edited_index_data[$seq_index]['Sub_part'])) {
$sub_part = ' value="' . $edited_index_data[$seq_index]['Sub_part'] . '"';
} else {
$sub_part = '';
}
echo "\n";
?>
<tr bgcolor="<?php echo (($row_no % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo); ?>">
<td>
<select name="column[]">
<option value="--ignore--"<?php if ('--ignore--' == $selected) echo ' selected="selected"'; ?>>
-- <?php echo $strIgnore; ?> --</option>
<?php
reset($fields_names);
while (list($key, $val) = each($fields_names)) {
if ($index_type != 'FULLTEXT'
|| eregi('^(varchar|text|tinytext|mediumtext|longtext)', $fields_types[$key])) {
echo "\n" . ' '
. '<option value="' . htmlspecialchars($val) . '"' . (($val == $selected) ? ' selected="selected"' : '') . '>'
. htmlspecialchars($val) . (($add_type) ? ' [' . $fields_types[$key] . ']' : '' ) . '</option>' . "\n";
}
} // end while
echo "\n";
?>
</select>
</td>
<td>
<input type="text" size="5" name="sub_part[]"<?php echo $sub_part; ?> />
</td>
</tr>
<?php
} // end while
echo "\n";
?>
</table><br />
<input type="submit" name="do_save_data" value="<?php echo $strSave; ?>" /><br />
<?php
echo "\n";
if (isset($added_fields)) {
echo ' <input type="hidden" name="prev_add_fields" value="' . $added_fields . '" />';
}
if (isset($idx_num_fields)) {
echo ' <input type="hidden" name="idx_num_fields" value="' . $idx_num_fields . '" />' . "\n";
}
echo ' <hr /><br />' . "\n";
echo ' ' . sprintf($strAddToIndex, '<input type="text" name="added_fields" size="4" value="1" />') . "\n";
echo ' &nbsp;<input type="submit" name="add_fields" value="' . $strGo . '" onclick="return checkFormElementInRange(this.form, \'added_fields\', 1)" />' . "\n";
} else {
/**
* Display indexes
*/
?>
<!-- Indexes form -->
<form action="tbl_indexes.php3" method="post">
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<?php
echo "\n";
echo ' ' . $strIndexes . '&nbsp;:' . "\n";
echo ' ' . show_docu('manual_MySQL_Optimization.html#MySQL_indexes') . '<br />' ."\n";
if ($idx_cnt > 0) {
?>
<table border="<?php echo $cfgBorder; ?>">
<tr>
<th><?php echo $strKeyname; ?></th>
<th><?php echo $strType; ?></th>
<th><?php echo $strCardinality; ?></th>
<th colspan="2"><?php echo $strAction; ?></th>
<th colspan="2"><?php echo $strField; ?></th>
</tr>
<?php
echo "\n";
while (list($index_no, $index_name) = each($indexes)) {
$cell_bgd = (($index_no % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo);
$index_td = ' <td bgcolor="' . $cell_bgd . '" rowspan="' . count($indexes_info[$index_name]['Sequences']) . '">' . "\n";
echo ' <tr>' . "\n";
echo $index_td
. ' ' . htmlspecialchars($index_name) . "\n"
. ' </td>' . "\n";
if ($indexes_info[$index_name]['Comment'] == 'FULLTEXT') {
$index_type = 'FULLTEXT';
} else if ($index_name == 'PRIMARY') {
$index_type = 'PRIMARY';
} else if ($indexes_info[$index_name]['Non_unique'] == '0') {
$index_type = 'UNIQUE';
} else {
$index_type = 'INDEX';
}
echo $index_td
. ' ' . $index_type . "\n"
. ' </td>' . "\n";
echo $index_td
. ' ' . (isset($indexes_info[$index_name]['Cardinality']) ? $indexes_info[$index_name]['Cardinality'] : $strNone) . "\n"
. ' </td>' . "\n";
if ($index_name == 'PRIMARY') {
$sql_query = urlencode('ALTER TABLE ' . backquote($table) . ' DROP PRIMARY KEY');
$js_msg = 'ALTER TABLE ' . js_format($table) . ' DROP PRIMARY KEY';
$zero_rows = urlencode($strPrimaryKeyHasBeenDropped);
} else {
$sql_query = urlencode('ALTER TABLE ' . backquote($table) . ' DROP INDEX ' . backquote($index_name));
$js_msg = 'ALTER TABLE ' . js_format($table) . ' DROP INDEX ' . js_format($index_name);
$zero_rows = urlencode(sprintf($strIndexHasBeenDropped, htmlspecialchars($index_name)));
}
echo $index_td
. ' <a href="sql.php3?' . $url_query . '&amp;sql_query=' . $sql_query . '&amp;zero_rows=' . $zero_rows . '" onclick="return confirmLink(this, \'' . $js_msg . '\')">' . $strDrop . '</a>' . "\n"
. ' </td>' . "\n";
echo $index_td
. ' <a href="tbl_indexes.php3?' . $url_query . '&amp;index=' . urlencode($index_name) . '">' . $strEdit . '</a>' . "\n"
. ' </td>' . "\n";
while (list($row_no, $seq_index) = each($indexes_info[$index_name]['Sequences'])) {
if ($row_no > 0) {
echo ' <tr>' . "\n";
}
if (!empty($indexes_data[$index_name][$seq_index]['Sub_part'])) {
echo ' <td bgcolor="' . $cell_bgd . '">' . "\n"
. ' ' . $indexes_data[$index_name][$seq_index]['Column_name'] . "\n"
. ' </td>' . "\n";
echo ' <td align="right" bgcolor="' . $cell_bgd . '">' . "\n"
. ' ' . $indexes_data[$index_name][$seq_index]['Sub_part'] . "\n"
. ' </td>' . "\n";
echo ' </tr>' . "\n";
} else {
echo ' <td bgcolor="' . $cell_bgd . '" colspan="2">' . "\n"
. ' ' . $indexes_data[$index_name][$seq_index]['Column_name'] . "\n"
. ' </td>' . "\n";
echo ' </tr>' . "\n";
}
} // end while
} // end while
?>
</table><br />
<?php
echo "\n\n";
} // end display indexes
else {
// none indexes
echo "\n" . ' <br />' . "\n";
echo ' <i>' . $strNoIndex . '</i><br /><br />' . "\n\n";
}
echo ' ' . sprintf($strCreateIndex, '<input type="text" size="4" name="idx_num_fields" value="1" />') . "\n";
echo ' &nbsp;<input type="submit" name="create_index" value="' . $strGo . '" onclick="return checkFormElementInRange(this.form, \'idx_num_fields\', 1)" />' . "\n";
echo ' ';
} // end display indexes
?>
</form>
<?php
/**
* Displays the footer
*/
echo "\n";
if (!defined('_IDX_INCLUDED_')){
require('./footer.inc.php3');
}
?>

View File

@@ -42,7 +42,9 @@ if (MYSQL_INT_VERSION >= 32303) {
$num_rows = mysql_result($result, 0, 'count');
$show_comment = '';
} // end display comments
if ($result) {
mysql_free_result($result);
}
/**
@@ -51,31 +53,40 @@ mysql_free_result($result);
$local_query = 'SHOW KEYS FROM ' . backquote($table);
$result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url);
$primary = '';
$prev_key = '';
$prev_seq = 0;
$i = 0;
$indexes = array();
$lastIndex = '';
$indexes_info = array();
$indexes_data = array();
$pk_array = array(); // will be use to emphasis prim. keys in the table view
while ($row = mysql_fetch_array($result)) {
$ret_keys[] = $row;
// Unset the 'Seq_in_index' value if it's not a composite index - part 1
if ($i > 0 && $row['Key_name'] != $prev_key && $prev_seq == 1) {
unset($ret_keys[$i-1]['Seq_in_index']);
}
$prev_key = $row['Key_name'];
$prev_seq = $row['Seq_in_index'];
// Backups the list of primary keys
if ($row['Key_name'] == 'PRIMARY') {
$primary .= $row['Column_name'] . ', ';
$pk_array[$row['Column_name']] = 1;
}
$i++;
} // end while
// Unset the 'Seq_in_index' value if it's not a composite index - part 2
if ($i > 0 && $row['Key_name'] != $prev_key && $prev_seq == 1) {
unset($ret_keys[$i-1]['Seq_in_index']);
// Retains keys informations
if ($row['Key_name'] != $lastIndex ){
$indexes[] = $row['Key_name'];
$lastIndex = $row['Key_name'];
}
mysql_free_result($result);
$indexes_info[$row['Key_name']]['Sequences'][] = $row['Seq_in_index'];
$indexes_info[$row['Key_name']]['Non_unique'] = $row['Non_unique'];
if (isset($row['Cardinality'])) {
$indexes_info[$row['Key_name']]['Cardinality'] = $row['Cardinality'];
}
// I don't know what does following column mean....
// $indexes_info[$row['Key_name']]['Packed'] = $row['Packed'];
$indexes_info[$row['Key_name']]['Comment'] = $row['Comment'];
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Column_name'] = $row['Column_name'];
if (isset($row['Sub_part'])) {
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Sub_part'] = $row['Sub_part'];
}
} // end while
if ($result) {
mysql_free_result($result);
}
/**
* Gets fields properties
@@ -181,8 +192,8 @@ echo "\n";
/**
* Displays indexes
*/
$index_count = (isset($ret_keys))
? count($ret_keys)
$index_count = (isset($indexes))
? count($indexes)
: 0;
if ($index_count > 0) {
?>
@@ -193,67 +204,57 @@ if ($index_count > 0) {
<table border="<?php echo $cfgBorder; ?>">
<tr>
<th><?php echo $strKeyname; ?></th>
<th><?php echo $strUnique; ?></th>
<?php
if (MYSQL_INT_VERSION >= 32323) {
echo "\n";
?>
<th><?php echo $strIdxFulltext; ?></th>
<?php
}
echo "\n";
?>
<th><?php echo $strField; ?></th>
<th><?php echo $strType; ?></th>
<th><?php echo $strCardinality; ?></th>
<th colspan="2"><?php echo $strField; ?></th>
</tr>
<?php
$prev_key = '';
$j = 0;
for ($i = 0 ; $i < $index_count; $i++) {
$row = $ret_keys[$i];
if (isset($row['Seq_in_index'])) {
$key_name = htmlspecialchars($row['Key_name']) . '<nobr>&nbsp;<small>-' . $row['Seq_in_index'] . '-</small></nobr>';
} else {
$key_name = htmlspecialchars($row['Key_name']);
}
if (!isset($row['Sub_part'])) {
$row['Sub_part'] = '';
}
echo "\n";
while (list($index_no, $index_name) = each($indexes)) {
$cell_bgd = (($index_no % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo);
$index_td = ' <td bgcolor="' . $cell_bgd . '" rowspan="' . count($indexes_info[$index_name]['Sequences']) . '">' . "\n";
echo ' <tr>' . "\n";
echo $index_td
. ' ' . htmlspecialchars($index_name) . "\n"
. ' </td>' . "\n";
if ($row['Key_name'] != $prev_key) {
$j++;
$prev_key = $row['Key_name'];
}
$bgcolor = ($j % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
echo "\n";
?>
<tr bgcolor="<?php echo $bgcolor; ?>">
<td><?php echo $key_name; ?></td>
<td><?php echo (($row['Non_unique'] == '0') ? $strYes : $strNo); ?></td>
<?php
if (MYSQL_INT_VERSION >= 32323) {
echo "\n";
?>
<td><?php echo (($row['Comment'] == 'FULLTEXT') ? $strYes : $strNo); ?></td>
<?php
}
if (!empty($row['Sub_part'])) {
echo "\n";
?>
<td><?php echo htmlspecialchars($row['Column_name']); ?></td>
<td align="right">&nbsp;<?php echo $row['Sub_part']; ?></td>
<?php
if ($indexes_info[$index_name]['Comment'] == 'FULLTEXT') {
$index_type = 'FULLTEXT';
} else if ($index_name == 'PRIMARY') {
$index_type = 'PRIMARY';
} else if ($indexes_info[$index_name]['Non_unique'] == '0') {
$index_type = 'UNIQUE';
} else {
echo "\n";
?>
<td colspan="2"><?php echo htmlspecialchars($row['Column_name']); ?></td>
<?php
$index_type = 'INDEX';
}
echo "\n";
?>
</tr>
<?php
} // end for
echo "\n";
echo $index_td
. ' ' . $index_type . "\n"
. ' </td>' . "\n";
echo $index_td
. ' ' . (isset($indexes_info[$index_name]['Cardinality']) ? $indexes_info[$index_name]['Cardinality'] : $strNone) . "\n"
. ' </td>' . "\n";
while (list($row_no, $seq_index) = each($indexes_info[$index_name]['Sequences'])) {
if ($row_no > 0) {
echo ' <tr>' . "\n";
}
if (!empty($indexes_data[$index_name][$seq_index]['Sub_part'])) {
echo ' <td bgcolor="' . $cell_bgd . '">' . "\n"
. ' ' . $indexes_data[$index_name][$seq_index]['Column_name'] . "\n"
. ' </td>' . "\n";
echo ' <td align="right" bgcolor="' . $cell_bgd . '">' . "\n"
. ' ' . $indexes_data[$index_name][$seq_index]['Sub_part'] . "\n"
. ' </td>' . "\n";
echo ' </tr>' . "\n";
} else {
echo ' <td bgcolor="' . $cell_bgd . '" colspan="2">' . "\n"
. ' ' . $indexes_data[$index_name][$seq_index]['Column_name'] . "\n"
. ' </td>' . "\n";
echo ' </tr>' . "\n";
}
} // end while
} // end while
?>
</table>
<?php

View File

@@ -192,36 +192,23 @@ if (!empty($show_comment)) {
$local_query = 'SHOW KEYS FROM ' . backquote($table);
$result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url_0);
$primary = '';
$prev_key = '';
$prev_seq = 0;
$i = 0;
$ret_keys = array();
$pk_array = array(); // will be use to emphasis prim. keys in the table view
while ($row = mysql_fetch_array($result)) {
$ret_keys[] = $row;
// Unset the 'Seq_in_index' value if it's not a composite index - part 1
if ($i > 0 && $row['Key_name'] != $prev_key && $prev_seq == 1) {
unset($ret_keys[$i-1]['Seq_in_index']);
}
$prev_key = $row['Key_name'];
$prev_seq = $row['Seq_in_index'];
// Backups the list of primary keys
if ($row['Key_name'] == 'PRIMARY') {
$primary .= $row['Column_name'] . ', ';
$pk_array[$row['Column_name']] = 1;
}
$i++;
} // end while
// Unset the 'Seq_in_index' value if it's not a composite index - part 2
if ($i > 0 && $row['Key_name'] != $prev_key && $prev_seq == 1) {
unset($ret_keys[$i-1]['Seq_in_index']);
}
mysql_free_result($result);
// 3. Get fields
$local_query = 'SHOW FIELDS FROM ' . backquote($table);
$result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url_0);
$fields_cnt = mysql_num_rows($result);
$fields_rs = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url_0);
$fields_cnt = mysql_num_rows($fields_rs);
@@ -254,7 +241,7 @@ $fields_cnt = mysql_num_rows($result);
$i = 0;
$aryFields = array();
while ($row = mysql_fetch_array($result)) {
while ($row = mysql_fetch_array($fields_rs)) {
$i++;
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
$aryFields[] = $row['Field'];
@@ -362,7 +349,6 @@ while ($row = mysql_fetch_array($result)) {
<?php
} // end while
mysql_free_result($result);
echo "\n";
?>
@@ -440,103 +426,14 @@ echo "\n\n";
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<?php
$index_count = (isset($ret_keys))
? count($ret_keys)
: 0;
if ($index_count > 0) {
?>
<!-- Indexes -->
<td valign="top" align="left">
<?php echo $strIndexes . '&nbsp;:' . "\n"; ?>
<table border="<?php echo $cfgBorder; ?>">
<tr>
<th><?php echo $strKeyname; ?></th>
<th><?php echo $strUnique; ?></th>
<?php
if (MYSQL_INT_VERSION >= 32323) {
echo "\n";
?>
<th><?php echo $strIdxFulltext; ?></th>
<?php
}
echo "\n";
?>
<th colspan="2"><?php echo $strField; ?></th>
<th><?php echo $strAction; ?></th>
</tr>
<?php
$prev_key = '';
$j = 0;
for ($i = 0; $i < $index_count; $i++) {
$row = $ret_keys[$i];
if (isset($row['Seq_in_index'])) {
$key_name = htmlspecialchars($row['Key_name']) . '<nobr>&nbsp;<small>-' . $row['Seq_in_index'] . '-</small></nobr>';
} else {
$key_name = htmlspecialchars($row['Key_name']);
}
if (!isset($row['Sub_part'])) {
$row['Sub_part'] = '';
}
if ($row['Key_name'] == 'PRIMARY') {
$sql_query = urlencode('ALTER TABLE ' . backquote($table) . ' DROP PRIMARY KEY');
$js_msg = 'ALTER TABLE ' . js_format($table) . ' DROP PRIMARY KEY';
$zero_rows = urlencode($strPrimaryKeyHasBeenDropped);
} else {
$sql_query = urlencode('ALTER TABLE ' . backquote($table) . ' DROP INDEX ' . backquote($row['Key_name']));
$js_msg = 'ALTER TABLE ' . js_format($table) . ' DROP INDEX ' . js_format($row['Key_name']);
$zero_rows = urlencode(sprintf($strIndexHasBeenDropped, htmlspecialchars($row['Key_name'])));
}
if ($row['Key_name'] != $prev_key) {
$j++;
$prev_key = $row['Key_name'];
}
$bgcolor = ($j % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
echo "\n";
?>
<tr bgcolor="<?php echo $bgcolor; ?>">
<td><?php echo $key_name; ?></td>
<td><?php echo (($row['Non_unique'] == '0') ? $strYes : $strNo); ?></td>
<?php
if (MYSQL_INT_VERSION >= 32323) {
echo "\n";
?>
<td><?php echo (($row['Comment'] == 'FULLTEXT') ? $strYes : $strNo); ?></td>
<?php
}
if (!empty($row['Sub_part'])) {
echo "\n";
?>
<td><?php echo htmlspecialchars($row['Column_name']); ?></td>
<td align="right">&nbsp;<?php echo $row['Sub_part']; ?></td>
<?php
} else {
echo "\n";
?>
<td colspan="2"><?php echo htmlspecialchars($row['Column_name']); ?></td>
<?php
}
echo "\n";
?>
<td>
<a href="sql.php3?<?php echo $url_query . '&amp;sql_query=' . $sql_query . '&amp;zero_rows=' . $zero_rows; ?>"
onclick="return confirmLink(this, '<?php echo $js_msg; ?>')">
<?php echo $strDrop; ?></a>
</td>
</tr>
<?php
} // end for
echo "\n";
define('_IDX_INCLUDED_', 1);
require ('./tbl_indexes.php3');
?>
</table>
<?php echo show_docu('manual_MySQL_Optimization.html#MySQL_indexes') . "\n"; ?>
</td>
<?php
} // end display indexes
/**
* Displays Space usage and row statistics
*/
@@ -568,12 +465,10 @@ if ($cfgShowStats) {
}
// Displays them
if ($index_count > 0) {
echo ' <td width="20">&nbsp;</td>' . "\n";
}
?>
<!-- Space usage -->
<td width="20">&nbsp;</td>
<td valign="top">
<?php echo $strSpaceUsage . '&nbsp;:' . "\n"; ?>
<a name="showusage"></a>
@@ -1242,7 +1137,7 @@ else { // MySQL < 3.23.22
<li>
<a href="sql.php3?<?php echo ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query); ?>&amp;back=tbl_properties.php3&amp;reload=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
onclick="return confirmLink(this, 'DROP TABLE <?php echo js_format($table); ?>')">
<?php echo $strDropTable . ' ' . htmlspecialchars($table); ?></a>
<?php echo $strDropTable; ?></a>
</li>
</ul>