This commit is contained in:
Marc Delisle
2002-04-28 11:09:12 +00:00
parent cd80db48c2
commit 45f9ded139
48 changed files with 173 additions and 110 deletions

View File

@@ -8,6 +8,8 @@ $Source$
2002-04-28 Marc Delisle <lem9@users.sourceforge.net>
* tbl_properties.php3, new tbl_properties_common.php3:
start the split
* tbl_properties.php3, new tbl_properties_export.php3,
tbl_properties_links.php3, lang/*.php3: export is splitted
2002-04-28 Alexander M. Turek <rabus@users.sourceforge.net>
* header.inc.php3, lines 162-170: Improved patch #548696.

View File

@@ -355,4 +355,5 @@ $strZip = '"zipped" "
// To translate
$strCardinality = 'Cardinality';
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -353,4 +353,5 @@ $strZip = '"compactado com zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -354,4 +354,5 @@ $strZip = '"zip-
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -354,4 +354,5 @@ $strZip = '"zip-
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strZip = '"comprimit amb zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -351,4 +351,5 @@ $strYes = '
$strZip = '"zipped"';
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -347,4 +347,5 @@ $strYes = '
$strZip = '"zipped"';
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -354,4 +354,5 @@ $strZip = '"zip-ano"';
// To translate
$strLinksTo = 'Links to';
$strExport = 'Export'; //to translate
?>

View File

@@ -354,4 +354,5 @@ $strZip = '"zip-ano"';
// To translate
$strLinksTo = 'Links to';
$strExport = 'Export'; //to translate
?>

View File

@@ -350,4 +350,5 @@ $strZip = '"zazipov
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strZip = '"zazipov
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Ja';
$strZip = '"zipped"';
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -346,4 +346,5 @@ $strYes = 'Ja';
$strZip = '"Gezipt"';
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Yes';
$strZip = '"zipped"';
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strZip = '"zipitud"';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -353,4 +353,5 @@ $strZip = '"zip-pakattu"';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Oui';
$strZip = '"zipp<70>"';
$strExport = 'Export'; //to translate
?>

View File

@@ -353,4 +353,5 @@ $strZip = 'comprimido no formato "zipped"';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -358,4 +358,5 @@ $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!)';
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strYes = 'Ja';
$strZip = '"Zip komprimiert"';
// To translate
$strExport = 'Export'; //to translate
?>

View File

@@ -350,4 +350,5 @@ $strZip = '
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strYes = '
$strZip = '"Zipped"';
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -351,4 +351,5 @@ $strZip = '"zippel t
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Ya';
$strZip = '"Dikompress dengan Zip"';
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -356,4 +356,5 @@ $strZip = '"compresso con zip"';
// To translate
?>
$strExport = 'Export'; //to translate
?>

View File

@@ -358,4 +358,5 @@ $strXkana = '
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -358,4 +358,5 @@ $strXkana = '
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -350,4 +350,5 @@ $strZip = 'zip
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -353,4 +353,5 @@ $strZip = 'arhiv
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strZip = '"zip"';
//to translate:
$strReferentialIntegrity = 'Check referential integrity:'; //to translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -353,4 +353,5 @@ $strZip = 'Komprimert (zip)';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strZip = '".zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -356,4 +356,5 @@ $strZip = '"Compress
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strZip = '"arhivat"';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -354,4 +354,5 @@ $strZip = '
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -354,4 +354,5 @@ $strZip = '
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -355,4 +355,5 @@ $strZip = '"zip-ovano"';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -352,4 +352,5 @@ $strZip = '"zo zipovan
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -352,4 +352,5 @@ $strZip = '"zozipovan
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -347,4 +347,5 @@ $strZip = '"comprimido con zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strZip = '"zippad"';
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -355,4 +355,5 @@ $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!)';
$strReferentialIntegrity = 'Check referential integrity:'; //to translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strZip = '"ziplenmi
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strZip = '
// To translate
$strLinksTo = 'Links to'; //to translate
$strExport = 'Export'; //to translate
?>

View File

@@ -708,114 +708,6 @@ if ($is_upload) {
echo "\n";
?>
<!-- Dump of a database -->
<li>
<form method="post" action="tbl_dump.php3" name="tbl_dump">
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<?php echo $strViewDump; ?><br />
<table cellpadding="5" border="2">
<tr>
<td nowrap="nowrap">
<input type="radio" name="what" value="structure" id="radio_dump_structure" checked="checked" />
<label for="radio_dump_structure"><?php echo $strStrucOnly; ?></label>&nbsp;&nbsp;<br />
<input type="radio" name="what" value="data" id="radio_dump_data" />
<label for="radio_dump_data"><?php echo $strStrucData; ?></label>&nbsp;&nbsp;<br />
<input type="radio" name="what" value="dataonly" id="radio_dump_dataonly" />
<label for="radio_dump_dataonly"><?php echo $strDataOnly; ?></label>&nbsp;&nbsp;<br />
<input type="radio" name="what" value="excel" id="radio_dump_excel" />
<label for="radio_dump_excel"><?php echo $strStrucExcelCSV; ?></label>&nbsp;&nbsp;<br />
<input type="radio" name="what" value="csv" id="radio_dump_csv" />
<label for="radio_dump_csv"><?php echo $strStrucCSV;?></label>&nbsp;:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsTerminatedBy; ?>&nbsp;
<input type="text" name="separator" size="2" value=";" class="textfield" />&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsEnclosedBy; ?>&nbsp;
<input type="text" name="enclosed" size="1" value="&quot;" class="textfield" />&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsEscapedBy; ?>&nbsp;
<input type="text" name="escaped" size="2" value="\" class="textfield" />&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strLinesTerminatedBy; ?>&nbsp;
<input type="text" name="add_character" size="2" value="<?php echo ((PMA_whichCrlf() == "\n") ? '\n' : '\r\n'); ?>" class="textfield" />&nbsp;&nbsp;
</td>
<td valign="middle">
<input type="checkbox" name="drop" value="1" id="checkbox_dump_drop" />
<label for="checkbox_dump_drop"><?php echo $strStrucDrop; ?></label><br />
<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" />
<label for="checkbox_dump_showcolumns"><?php echo $strCompleteInserts; ?></label><br />
<input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" />
<label for="checkbox_dump_extended_ins"><?php echo $strExtendedInserts; ?></label><br />
<?php
// Add backquotes checkbox
if (PMA_MYSQL_INT_VERSION >= 32306) {
?>
<input type="checkbox" name="use_backquotes" value="1" id="checkbox_dump_use_backquotes" />
<label for="checkbox_dump_use_backquotes"><?php echo $strUseBackquotes; ?></label><br />
<?php
} // end backquotes feature
echo "\n";
?>
<br />
<input type="checkbox" name="asfile" value="sendit" id="checkbox_dump_asfile" onclick="return checkTransmitDump(this.form, 'transmit')" />
<label for="checkbox_dump_asfile"><?php echo $strSend; ?></label>
<?php
// zip, gzip and bzip2 encode features
if (PMA_PHP_INT_VERSION >= 40004) {
$is_zip = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress'));
$is_gzip = (isset($cfg['GZipDump']) && $cfg['GZipDump'] && @function_exists('gzencode'));
$is_bzip = (isset($cfg['BZipDump']) && $cfg['BZipDump'] && @function_exists('bzcompress'));
if ($is_zip || $is_gzip || $is_bzip) {
echo "\n" . ' (' . "\n";
if ($is_zip) {
?>
<input type="checkbox" name="zip" value="zip" id="checkbox_dump_zip" onclick="return checkTransmitDump(this.form, 'zip')" />
<?php echo '<label for="checkbox_dump_zip">' . $strZip . '</label>' . (($is_gzip || $is_bzip) ? '&nbsp;' : '') . "\n"; ?>
<?php
}
if ($is_gzip) {
echo "\n"
?>
<input type="checkbox" name="gzip" value="gzip" id="checkbox_dump_gzip" onclick="return checkTransmitDump(this.form, 'gzip')" />
<?php echo '<label for="checkbox_dump_gzip">' . $strGzip . '</label>' . (($is_bzip) ? '&nbsp;' : '') . "\n"; ?>
<?php
}
if ($is_bzip) {
echo "\n"
?>
<input type="checkbox" name="bzip" value="bzip" id="checkbox_dump_bzip" onclick="return checkTransmitDump(this.form, 'bzip')" />
<?php echo '<label for="checkbox_dump_bzip">' . $strBzip . '</label>' . "\n"; ?>
<?php
}
echo "\n" . ' )';
}
}
echo "\n";
// Encoding setting form appended by Y.Kawada
if (function_exists('PMA_set_enc_form')) {
echo '<br />' . "\n"
. PMA_set_enc_form(' ');
}
?>
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;<?php echo $strStartingRecord; ?>&nbsp;
<input type="text" name="limit_from" value="0" size="5" class="textfield" style="vertical-align: middle" onfocus="this.select()" />
&nbsp;--&nbsp;<?php echo $strNbRecords; ?>&nbsp;
<input type="text" name="limit_to" size="5" value="<?php echo PMA_countRecords($db, $table, TRUE); ?>" class="textfield" style="vertical-align: middle" onfocus="this.select()" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="<?php echo $strGo; ?>" />
</td>
</tr>
</table>
</form>
</li>
<!-- Change table name -->
<li>
<div style="margin-bottom: 10px">

120
tbl_properties_export.php3 Executable file
View File

@@ -0,0 +1,120 @@
<?php
/* $Id$ */
require('./tbl_properties_common.php3');
?>
<!-- Dump of a database -->
<form method="post" action="tbl_dump.php3" name="tbl_dump">
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" />
<?php echo $strViewDump; ?><br />
<table cellpadding="5" border="2">
<tr>
<td nowrap="nowrap">
<input type="radio" name="what" value="structure" id="radio_dump_structure" checked="checked" />
<label for="radio_dump_structure"><?php echo $strStrucOnly; ?></label>&nbsp;&nbsp;<br />
<input type="radio" name="what" value="data" id="radio_dump_data" />
<label for="radio_dump_data"><?php echo $strStrucData; ?></label>&nbsp;&nbsp;<br />
<input type="radio" name="what" value="dataonly" id="radio_dump_dataonly" />
<label for="radio_dump_dataonly"><?php echo $strDataOnly; ?></label>&nbsp;&nbsp;<br />
<input type="radio" name="what" value="excel" id="radio_dump_excel" />
<label for="radio_dump_excel"><?php echo $strStrucExcelCSV; ?></label>&nbsp;&nbsp;<br />
<input type="radio" name="what" value="csv" id="radio_dump_csv" />
<label for="radio_dump_csv"><?php echo $strStrucCSV;?></label>&nbsp;:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsTerminatedBy; ?>&nbsp;
<input type="text" name="separator" size="2" value=";" class="textfield" />&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsEnclosedBy; ?>&nbsp;
<input type="text" name="enclosed" size="1" value="&quot;" class="textfield" />&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsEscapedBy; ?>&nbsp;
<input type="text" name="escaped" size="2" value="\" class="textfield" />&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strLinesTerminatedBy; ?>&nbsp;
<input type="text" name="add_character" size="2" value="<?php echo ((PMA_whichCrlf() == "\n") ? '\n' : '\r\n'); ?>" class="textfield" />&nbsp;&nbsp;
</td>
<td valign="middle">
<input type="checkbox" name="drop" value="1" id="checkbox_dump_drop" />
<label for="checkbox_dump_drop"><?php echo $strStrucDrop; ?></label><br />
<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" />
<label for="checkbox_dump_showcolumns"><?php echo $strCompleteInserts; ?></label><br />
<input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" />
<label for="checkbox_dump_extended_ins"><?php echo $strExtendedInserts; ?></label><br />
<?php
// Add backquotes checkbox
if (PMA_MYSQL_INT_VERSION >= 32306) {
?>
<input type="checkbox" name="use_backquotes" value="1" id="checkbox_dump_use_backquotes" />
<label for="checkbox_dump_use_backquotes"><?php echo $strUseBackquotes; ?></label><br />
<?php
} // end backquotes feature
echo "\n";
?>
<br />
<input type="checkbox" name="asfile" value="sendit" id="checkbox_dump_asfile" onclick="return checkTransmitDump(this.form, 'transmit')" />
<label for="checkbox_dump_asfile"><?php echo $strSend; ?></label>
<?php
// zip, gzip and bzip2 encode features
if (PMA_PHP_INT_VERSION >= 40004) {
$is_zip = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress'));
$is_gzip = (isset($cfg['GZipDump']) && $cfg['GZipDump'] && @function_exists('gzencode'));
$is_bzip = (isset($cfg['BZipDump']) && $cfg['BZipDump'] && @function_exists('bzcompress'));
if ($is_zip || $is_gzip || $is_bzip) {
echo "\n" . ' (' . "\n";
if ($is_zip) {
?>
<input type="checkbox" name="zip" value="zip" id="checkbox_dump_zip" onclick="return checkTransmitDump(this.form, 'zip')" />
<?php echo '<label for="checkbox_dump_zip">' . $strZip . '</label>' . (($is_gzip || $is_bzip) ? '&nbsp;' : '') . "\n"; ?>
<?php
}
if ($is_gzip) {
echo "\n"
?>
<input type="checkbox" name="gzip" value="gzip" id="checkbox_dump_gzip" onclick="return checkTransmitDump(this.form, 'gzip')" />
<?php echo '<label for="checkbox_dump_gzip">' . $strGzip . '</label>' . (($is_bzip) ? '&nbsp;' : '') . "\n"; ?>
<?php
}
if ($is_bzip) {
echo "\n"
?>
<input type="checkbox" name="bzip" value="bzip" id="checkbox_dump_bzip" onclick="return checkTransmitDump(this.form, 'bzip')" />
<?php echo '<label for="checkbox_dump_bzip">' . $strBzip . '</label>' . "\n"; ?>
<?php
}
echo "\n" . ' )';
}
}
echo "\n";
// Encoding setting form appended by Y.Kawada
if (function_exists('PMA_set_enc_form')) {
echo '<br />' . "\n"
. PMA_set_enc_form(' ');
}
?>
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;<?php echo $strStartingRecord; ?>&nbsp;
<input type="text" name="limit_from" value="0" size="5" class="textfield" style="vertical-align: middle" onfocus="this.select()" />
&nbsp;--&nbsp;<?php echo $strNbRecords; ?>&nbsp;
<input type="text" name="limit_to" size="5" value="<?php echo PMA_countRecords($db, $table, TRUE); ?>" class="textfield" style="vertical-align: middle" onfocus="this.select()" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="<?php echo $strGo; ?>" />
</td>
</tr>
</table>
</form>
<?php
/**
* Displays the footer
*/
echo "\n";
require('./footer.inc.php3');
?>

View File

@@ -5,11 +5,14 @@
/**
* Prepares links
*/
$lnk3 = '<a href="tbl_properties_export.php3?' . $url_query . '">';
if ($num_rows > 0) {
$lnk1 = '<a href="sql.php3?' . $url_query
. '&amp;sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table))
. '&amp;pos=0">';
$lnk2 = '<a href="tbl_select.php3?' . $url_query . '">';
$lnk3 = '<a href="tbl_properties_export.php3?' . $url_query . '">';
$ln4_stt = (PMA_MYSQL_INT_VERSION >= 40000)
? 'TRUNCATE '
: 'DELETE FROM ';
@@ -33,7 +36,9 @@ if ($num_rows > 0) {
[ <a href="tbl_change.php3?<?php echo $url_query; ?>">
<b><?php echo $strInsert; ?></b></a> ]&nbsp;&nbsp;&nbsp;
[ <?php echo $lnk4 . "\n"; ?>
<b><?php echo $strEmpty; ?></b><?php if ($lnk4) echo '</a>'; ?> ]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b><?php echo $strEmpty; ?></b><?php if ($lnk4) echo '</a>'; ?> ]&nbsp;&nbsp;&nbsp;
[ <?php echo $lnk3 . "\n"; ?>
<b><?php echo $strExport; ?></b><?php if ($lnk3) echo '</a>'; ?> ]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[ <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 ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
<b><?php echo $strDrop; ?></b></a> ]