merged patch #470575 (Inserting rows in loop) thanks to Tomas Polak
This commit is contained in:
@@ -12,6 +12,9 @@ $Source$
|
||||
* config.inc.php3, line 159; Documentation.html, lines 646-652;
|
||||
libraries/display_tbl.lib.php3, line 607: merged patch #472575 (indicator
|
||||
in table rows) thanks to Darklord <darklord at chello.at>.
|
||||
* tbl_change.php3; tbl_replace.php3; lang/*: merged patch #470575
|
||||
(Inserting rows in loop) thanks to
|
||||
Tomas Polak <loskutak at users.sourceforge.net>.
|
||||
* libraries/defines.inc.php3, line 20: starting 2.2.2-dev. version.
|
||||
|
||||
2001-10-24 Robin Johnson <robbat2@users.sourceforge.net>
|
||||
|
@@ -298,6 +298,8 @@ $strWrongUser = 'Usu
|
||||
$strYes = 'Sim';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
$strDatabaseHasBeenDropped = 'Database %s has been dropped.'; //to translate
|
||||
$strFlushTable = 'Flush the table ("FLUSH")';
|
||||
|
@@ -309,6 +309,8 @@ $strYes = '
|
||||
$strZip = '"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> zip"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strExtendedInserts = 'Extended inserts';
|
||||
$strFlushTable = 'Flush the table ("FLUSH")';
|
||||
$strFullText = 'Full Texts';//to translate
|
||||
|
@@ -264,6 +264,8 @@ $strZip = '"comprimit amb zip"';
|
||||
|
||||
// To translate
|
||||
$strAffectedRows = 'Affected rows:';
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAnIndex = 'An index has been added on %s';//to translate
|
||||
$strAPrimaryKey = 'A primary key has been added on %s';//to translate
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
|
@@ -263,6 +263,8 @@ $strYes = '
|
||||
|
||||
// To translate
|
||||
$strAffectedRows = ' Rows affected: '; //to translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAnIndex = 'An index has been added on %s';//to translate
|
||||
$strAPrimaryKey = 'A primary key has been added on %s';//to translate
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
|
@@ -265,6 +265,8 @@ $strZip = '"zipped"'; //to translate
|
||||
|
||||
// To translate
|
||||
$strAffectedRows = 'Affected rows:';
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAnIndex = 'An index has been added on %s';//to translate
|
||||
$strAPrimaryKey = 'A primary key has been added on %s';//to translate
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
|
@@ -319,4 +319,6 @@ $strYes = 'Ano';
|
||||
$strZip = '"zazipov<6F>no"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
?>
|
||||
|
@@ -319,4 +319,8 @@ $strWrongUser = '
|
||||
$strYes = 'Ano';
|
||||
|
||||
$strZip = '"zazipov<6F>no"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
?>
|
||||
|
@@ -315,6 +315,8 @@ $strYes = 'Ja';
|
||||
$strZip = '"zipped"'; //to translate
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strFlushTable = 'Flush the table ("FLUSH")';
|
||||
$strNoFrames = 'phpMyAdmin is more friendly with a <b>frames-capable</b> browser.';
|
||||
$strTableHasBeenFlushed = 'Table %s has been flushed';
|
||||
|
@@ -280,6 +280,8 @@ $strYes = 'Ja';
|
||||
|
||||
// To translate
|
||||
$strAffectedRows = 'Affected rows:'; //to translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAnIndex = 'An index has been added on %s';//to translate
|
||||
$strAPrimaryKey = 'A primary key has been added on %s';//to translate
|
||||
$strBzip = '"bzipped"'; //to translate
|
||||
|
@@ -27,6 +27,8 @@ $strAddUser = 'Add a new User';
|
||||
$strAddUserMessage = 'You have added a new user.';
|
||||
$strAffectedRows = 'Affected rows:';
|
||||
$strAfter = 'After';
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAll = 'All';
|
||||
$strAlterOrderBy = 'Alter table order by';
|
||||
$strAnalyzeTable = 'Analyze table';
|
||||
|
@@ -321,5 +321,7 @@ $strYes = 'Kyll
|
||||
$strZip = '"zip-pakattu"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strOverhead = 'Overhead';
|
||||
?>
|
||||
|
@@ -27,6 +27,8 @@ $strAddUser = 'Ajouter un utilisateur';
|
||||
$strAddUserMessage = 'Vous avez ajout<75> un utilisateur';
|
||||
$strAffectedRows = 'Nombre d\'enregistrements affect<63>s :';
|
||||
$strAfter = 'Apr<70>s';
|
||||
$strAfterInsertBack = 'Retourner <20> la page pr<70>c<EFBFBD>dente';
|
||||
$strAfterInsertNewInsert = 'Ins<6E>rer un nouvel enregistrement';
|
||||
$strAll = 'Tout';
|
||||
$strAlterOrderBy = '<b>Ordonner</b> la table par';
|
||||
$strAnalyzeTable = 'Analyser la table';
|
||||
|
@@ -315,6 +315,8 @@ $strYes = 'Si';
|
||||
$strZip = 'comprimido no formato "zipped"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
$strMoveTable = 'Move table to (database<b>.</b>table):';
|
||||
$strMoveTableOK = 'Table %s has been moved to %s.';
|
||||
|
@@ -311,6 +311,8 @@ $strYes = 'Ja';
|
||||
$strZip = '"Zip komprimiert"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strFieldHasBeenDropped = 'Field %s has been dropped';//to translate
|
||||
$strFlushTable = 'Flush the table ("FLUSH")';
|
||||
$strIndexHasBeenDropped = 'Index %s has been dropped';//to translate
|
||||
|
@@ -289,6 +289,8 @@ $strYes = '
|
||||
$strZip = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>zip<69>';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAPrimaryKey = 'A primary key has been added on %s';//to translate
|
||||
$strAnIndex = 'An index has been added on %s';//to translate
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
|
@@ -321,4 +321,6 @@ $strYes = ' Si ';
|
||||
$strZip = '"compresso con zip"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
?>
|
||||
|
@@ -265,6 +265,8 @@ $strZip = '"zipped"'; //to translate
|
||||
|
||||
// To translate
|
||||
$strAffectedRows = 'Affected rows:';
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAnIndex = 'An index has been added on %s';//to translate
|
||||
$strAPrimaryKey = 'A primary key has been added on %s';//to translate
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
|
@@ -265,6 +265,8 @@ $strZip = '"zipped"'; //to translate
|
||||
|
||||
// To translate
|
||||
$strAffectedRows = 'Affected rows:';
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAnIndex = 'An index has been added on %s';//to translate
|
||||
$strAPrimaryKey = 'A primary key has been added on %s';//to translate
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
|
@@ -318,4 +318,6 @@ $strYes = 'Ja';
|
||||
$strZip = '"komprimert (zip)"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
?>
|
||||
|
@@ -314,6 +314,8 @@ $strYes = 'Tak';
|
||||
$strZip = '".zip"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
$strMoveTable = 'Move table to (database<b>.</b>table):';
|
||||
$strMoveTableOK = 'Table %s has been moved to %s.';
|
||||
|
@@ -265,6 +265,8 @@ $strZip = '"zipped"'; //to translate
|
||||
|
||||
// To translate
|
||||
$strAffectedRows = 'Affected rows:';
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAnIndex = 'An index has been added on %s';//to translate
|
||||
$strAPrimaryKey = 'A primary key has been added on %s';//to translate
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
|
@@ -313,6 +313,8 @@ $strWithChecked = 'Verificat cu:';
|
||||
$strYes = 'Da';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
$strMoveTable = 'Move table to (database<b>.</b>table):';
|
||||
$strMoveTableOK = 'Table %s has been moved to %s.';
|
||||
|
@@ -317,4 +317,8 @@ $strWrongUser = '
|
||||
$strYes = '<27><>';
|
||||
|
||||
$strZip = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> "zip"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
?>
|
||||
|
@@ -317,4 +317,8 @@ $strWrongUser = '
|
||||
$strYes = '<27><>';
|
||||
|
||||
$strZip = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> "zip"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
?>
|
||||
|
@@ -318,6 +318,8 @@ $strYes = '
|
||||
$strZip = '"zo zipovan<61>"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strFlushTable = 'Flush the table ("FLUSH")';
|
||||
$strNoFrames = 'phpMyAdmin is more friendly with a <b>frames-capable</b> browser.';
|
||||
$strTableHasBeenFlushed = 'Table %s has been flushed';
|
||||
|
@@ -282,6 +282,8 @@ $strYes = 'Si';
|
||||
|
||||
// To translate
|
||||
$strAnIndex = 'An index has been added on %s';//to translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAPrimaryKey = 'A primary key has been added on %s';//to translate
|
||||
$strBzip = '"bzipped"'; //to translate
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
|
@@ -319,4 +319,6 @@ $strYes = 'Ja';
|
||||
$strZip = '"zippad"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
?>
|
||||
|
@@ -265,6 +265,8 @@ $strZip = '"zipped"'; //to translate
|
||||
|
||||
// To translate
|
||||
$strAffectedRows = 'Affected rows:';
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
$strAnIndex = 'An index has been added on %s';//to translate
|
||||
$strAPrimaryKey = 'A primary key has been added on %s';//to translate
|
||||
$strCopyTable = 'Copy table to (database<b>.</b>table):';
|
||||
|
@@ -317,4 +317,8 @@ $strWrongUser = 'Hatal
|
||||
$strYes = 'Evet';
|
||||
|
||||
$strZip = '"ziplenmi<6D>"';
|
||||
|
||||
// To translate
|
||||
$strAfterInsertBack = 'Return';
|
||||
$strAfterInsertNewInsert = 'Insert a new record';
|
||||
?>
|
||||
|
@@ -6,7 +6,39 @@
|
||||
* Get the variables sent or posted to this script and displays the header
|
||||
*/
|
||||
require('./libraries/grab_globals.lib.php3');
|
||||
require('./header.inc.php3');
|
||||
include('./header.inc.php3');
|
||||
// Displays the query submitted and its result
|
||||
if (!empty($message)) {
|
||||
if (isset($goto)) {
|
||||
$goto_cpy = $goto;
|
||||
$goto = 'tbl_properties.php3'
|
||||
. '?lang=' . $lang
|
||||
. '&server=' . $server
|
||||
. '&db=' . urlencode($db)
|
||||
. '&table=' . urlencode($table)
|
||||
. '&$show_query=y'
|
||||
. '&sql_query=' . urlencode($disp_query);
|
||||
unset($goto);
|
||||
} else {
|
||||
$show_query = 'y';
|
||||
}
|
||||
if (isset($sql_query)) {
|
||||
$sql_query_cpy = $sql_query;
|
||||
unset($sql_query);
|
||||
}
|
||||
if (isset($disp_query)) {
|
||||
$sql_query = (get_magic_quotes_gpc() ? stripslashes($disp_query) : $disp_query);
|
||||
}
|
||||
show_message($message);
|
||||
if (isset($goto_cpy)) {
|
||||
$goto = $goto_cpy;
|
||||
unset($goto_cpy);
|
||||
}
|
||||
if (isset($sql_query_cpy)) {
|
||||
$sql_query = $sql_query_cpy;
|
||||
unset($sql_query_cpy);
|
||||
}
|
||||
}
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (!empty($sql_query)) {
|
||||
$sql_query = stripslashes($sql_query);
|
||||
@@ -14,7 +46,7 @@ if (get_magic_quotes_gpc()) {
|
||||
if (!empty($primary_key)) {
|
||||
$primary_key = stripslashes($primary_key);
|
||||
}
|
||||
}
|
||||
} // end if
|
||||
|
||||
|
||||
/**
|
||||
@@ -411,17 +443,45 @@ echo "\n";
|
||||
} // end for
|
||||
?>
|
||||
</table>
|
||||
<br /><br />
|
||||
<br />
|
||||
|
||||
<input type="submit" name="submit_type" value="<?php echo $strSave; ?>" />
|
||||
<table cellpadding="5">
|
||||
<tr>
|
||||
<td valign="middle" nowrap="nowrap">
|
||||
<?php
|
||||
if (isset($primary_key)) {
|
||||
?>
|
||||
<input type="submit" name="submit_type" value="<?php echo $strInsertAsNewRow; ?>" />
|
||||
<input type="radio" name="submit_type" value="<?php echo $strSave; ?>" checked="checked" /><?php echo $strSave; ?><br />
|
||||
<?php echo $strOr; ?><br />
|
||||
<input type="radio" name="submit_type" value="<?php echo $strInsertAsNewRow; ?>" /><?php echo $strInsertAsNewRow. "\n"; ?>
|
||||
<?php
|
||||
} else {
|
||||
echo "\n";
|
||||
?>
|
||||
<input type="hidden" name="submit_type" value="<?php echo $strInsertAsNewRow; ?>" />
|
||||
<?php
|
||||
echo ' ' . $strInsertAsNewRow . "\n";
|
||||
}
|
||||
echo "\n";
|
||||
echo "\n"
|
||||
?>
|
||||
</td>
|
||||
<td valign="middle">
|
||||
<b>-- <?php echo $strAnd; ?> --</b>
|
||||
</td>
|
||||
<td valign="middle" nowrap="nowrap">
|
||||
<input type="radio" name="after_insert" value="back" checked="checked" /><?php echo $strAfterInsertBack; ?><br />
|
||||
<?php echo $strOr; ?><br />
|
||||
<input type="radio" name="after_insert" value="new_insert" /><?php echo $strAfterInsertNewInsert . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" align="center" valign="middle">
|
||||
<input type="submit" value="<?php echo $strGo; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
@@ -16,7 +16,17 @@ require('./libraries/common.lib.php3');
|
||||
if (isset($sql_query)) {
|
||||
$sql_query = urldecode($sql_query);
|
||||
}
|
||||
if ($goto == 'sql.php3') {
|
||||
if (isset($after_insert) && $after_insert == 'new_insert') {
|
||||
$goto = 'tbl_change.php3'
|
||||
. '?lang=' . $lang
|
||||
. '&server=' . $server
|
||||
. '&db=' . urlencode($db)
|
||||
. '&table=' . urlencode($table)
|
||||
. '&goto=' . urlencode($goto)
|
||||
. (empty($primary_key) ? '' : '&primary_key=' . $primary_key)
|
||||
. '&pos=' . $pos
|
||||
. (empty($sql_query) ? '' : '&sql_query=' . urlencode($sql_query));
|
||||
} else if ($goto == 'sql.php3') {
|
||||
$goto = 'sql.php3?'
|
||||
. 'lang=' . $lang
|
||||
. '&server=' . $server
|
||||
@@ -116,13 +126,13 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) {
|
||||
}
|
||||
// No change -> move back to the calling script
|
||||
else {
|
||||
$message = $strNoModification;
|
||||
if (file_exists('./' . $goto)) {
|
||||
$js_to_run = 'functions.js';
|
||||
include('./header.inc.php3');
|
||||
$message = $strNoModification;
|
||||
include('./' . ereg_replace('\.\.*', '.', $goto));
|
||||
} else {
|
||||
header('Location: ' . $cfgPmaAbsoluteUri . $goto . '&message=' . $strNoModification);
|
||||
header('Location: ' . $cfgPmaAbsoluteUri . $goto . '&message=' . urlencode($message));
|
||||
}
|
||||
exit();
|
||||
}
|
||||
@@ -182,7 +192,7 @@ else {
|
||||
&& (ereg('^(NOW|CURDATE|CURTIME|UNIX_TIMESTAMP|RAND|USER|LAST_INSERT_ID)$', $funcs[$encoded_key]))) {
|
||||
$valuelist .= $funcs[$encoded_key] . '(), ';
|
||||
} else {
|
||||
$valuelist .= $funcs[$encoded_key] . "($val), ";
|
||||
$valuelist .= $funcs[$encoded_key] . '(' . $val . '), ';
|
||||
}
|
||||
} // end while
|
||||
|
||||
@@ -220,7 +230,8 @@ if (!$result) {
|
||||
include('./header.inc.php3');
|
||||
include('./' . ereg_replace('\.\.*', '.', $goto));
|
||||
} else {
|
||||
header('Location: ' . $cfgPmaAbsoluteUri . $goto . '&message=' . $message);
|
||||
$add_query = (strpos(' ' . $goto, 'tbl_change') ? '&disp_query=' . urlencode($sql_query) : '');
|
||||
header('Location: ' . $cfgPmaAbsoluteUri . $goto . '&message=' . urlencode($message) . $add_query);
|
||||
}
|
||||
exit();
|
||||
} // end if
|
||||
|
Reference in New Issue
Block a user