New import page; reorganized formatting

This commit is contained in:
lorilee
2010-06-09 21:43:54 -04:00
parent ef33691b3b
commit d36b1a7593

View File

@@ -122,10 +122,25 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
echo ' <input type="hidden" name="import_type" value="' . $import_type . '" />'."\n"; echo ' <input type="hidden" name="import_type" value="' . $import_type . '" />'."\n";
echo PMA_pluginGetJavascript($import_list); echo PMA_pluginGetJavascript($import_list);
?> ?>
<fieldset class="options"> <div class="importoptions">
<legend><?php echo __('File to import'); ?></legend> <h3><?php echo __('File to Import:'); ?></h3>
<?php <?php
// zip, gzip and bzip2 encode features
$compressions = array();
if ($cfg['GZipDump'] && @function_exists('gzopen')) {
$compressions[] = 'gzip';
}
if ($cfg['BZipDump'] && @function_exists('bzopen')) {
$compressions[] = 'bzip2';
}
if ($cfg['ZipDump'] && @function_exists('zip_open')) {
$compressions[] = 'zip';
}
// We don't have show anything about compression, when no supported
if ($compressions != array()) {
printf(__('<i>File may be compressed (%s) or uncompressed</i>'), implode(", ", $compressions));
}
if ($GLOBALS['is_upload']) { if ($GLOBALS['is_upload']) {
$uid = uniqid(""); $uid = uniqid("");
@@ -134,7 +149,7 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
<div id="upload_form_status" style="display: none;"></div> <div id="upload_form_status" style="display: none;"></div>
<div id="upload_form_status_info" style="display: none;"></div> <div id="upload_form_status_info" style="display: none;"></div>
<div id="upload_form_form"> <div id="upload_form_form">
<label for="input_import_file"><?php echo __('Location of the text file'); ?></label> <label for="input_import_file"><?php echo __('Location of the file:'); ?></label>
<input style="margin: 5px" type="file" name="import_file" id="input_import_file" onchange="match_file(this.value);" /> <input style="margin: 5px" type="file" name="import_file" id="input_import_file" onchange="match_file(this.value);" />
<?php <?php
echo PMA_displayMaximumUploadSize($max_upload_size) . "\n"; echo PMA_displayMaximumUploadSize($max_upload_size) . "\n";
@@ -192,31 +207,10 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', 'charset_of_file', 'utf8', FALSE); echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', 'charset_of_file', 'utf8', FALSE);
} // end if (recoding) } // end if (recoding)
echo '</div>' . "\n"; echo '</div>' . "\n";
// zip, gzip and bzip2 encode features
$compressions = __('None');
if ($cfg['GZipDump'] && @function_exists('gzopen')) {
$compressions .= ', gzip';
}
if ($cfg['BZipDump'] && @function_exists('bzopen')) {
$compressions .= ', bzip2';
}
if ($cfg['ZipDump'] && @function_exists('zip_open')) {
$compressions .= ', zip';
}
// We don't have show anything about compression, when no supported
if ($compressions != __('None')) {
echo '<div class="formelementrow">' . "\n";
printf(__('Imported file compression will be automatically detected from: %s'), $compressions);
echo '</div>' . "\n";
}
echo "\n";
?> ?>
</fieldset> </div>
<fieldset class="options"> <div class="importoptions">
<legend><?php echo __('Partial import'); ?></legend> <h3><?php echo __('Partial Import:'); ?></h3>
<?php <?php
if (isset($timeout_passed) && $timeout_passed) { if (isset($timeout_passed) && $timeout_passed) {
@@ -229,14 +223,14 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
<div class="formelementrow"> <div class="formelementrow">
<input type="checkbox" name="allow_interrupt" value="yes" <input type="checkbox" name="allow_interrupt" value="yes"
id="checkbox_allow_interrupt" <?php echo PMA_pluginCheckboxCheck('Import', 'allow_interrupt'); ?>/> id="checkbox_allow_interrupt" <?php echo PMA_pluginCheckboxCheck('Import', 'allow_interrupt'); ?>/>
<label for="checkbox_allow_interrupt"><?php echo __('Allow the interruption of an import in case the script detects it is close to the PHP timeout limit. This might be good way to import large files, however it can break transactions.'); ?></label><br /> <label for="checkbox_allow_interrupt"><?php echo __('Allow the interruption of an import in case the script detects it is close to the PHP timeout limit. <i>(This might be good way to import large files, however it can break transactions.)</i>'); ?></label><br />
</div> </div>
<?php <?php
if (! (isset($timeout_passed) && $timeout_passed)) { if (! (isset($timeout_passed) && $timeout_passed)) {
?> ?>
<div class="formelementrow"> <div class="formelementrow">
<label for="text_skip_queries"><?php echo __('Number of queries to skip from start'); ?></label> <label for="text_skip_queries"><?php echo __('Number of rows to skip, starting from the first row:'); ?></label>
<input type="text" name="skip_queries" value="<?php echo PMA_pluginGetDefault('Import', 'skip_queries');?>" id="text_skip_queries" /> <input type="text" name="skip_queries" value="<?php echo PMA_pluginGetDefault('Import', 'skip_queries');?>" id="text_skip_queries" />
</div> </div>
<?php <?php
@@ -249,22 +243,19 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
<?php <?php
} }
?> ?>
</fieldset> </div>
<fieldset class="options"> <div class="importoptions">
<legend><?php echo __('Format of imported file'); ?></legend> <h3><?php echo __('Format:'); ?></h3>
<?php <?php echo PMA_pluginGetChoice('Import', 'format', $import_list); ?>
// Let's show format options now </div>
echo '<div style="float: left;">';
echo PMA_pluginGetChoice('Import', 'format', $import_list);
echo '</div>';
echo '<div style="float: left;">'; <div class="importoptions" id="format_specific_opts">
echo PMA_pluginGetOptions('Import', $import_list); <h3><?php echo __('Format-Specific Options:'); ?></h3>
echo '</div>'; <?php echo PMA_pluginGetOptions('Import', $import_list); ?>
?> </div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</fieldset> </div>
<?php <?php
// Encoding setting form appended by Y.Kawada // Encoding setting form appended by Y.Kawada
if (function_exists('PMA_set_enc_form')) { if (function_exists('PMA_set_enc_form')) {