/**
* Manage schemas within a database
*
- * $Id: database.php,v 1.30 2003/12/30 03:09:28 chriskl Exp $
+ * $Id: database.php,v 1.31 2003/12/31 15:44:27 soranzo Exp $
*/
// Include application functions
echo "</table>\n";
echo "<h3>{$lang['stroptions']}</h3>\n";
- echo "<table>\n";
- echo "<tr>\n<th class=\"data left\">{$lang['strdownload']}</th>\n";
- echo "<td><input type=\"checkbox\" name=\"download\" /></td>\n</tr>\n";
- echo "<tr>\n<th class=\"data left\">{$lang['strgzip']}</th>\n";
- echo "<td><input type=\"checkbox\" name=\"compress\" /></td>\n</tr>\n";
- echo "</table>\n";
+ echo "<p><input type=\"radio\" name=\"output\" value=\"show\" checked=\"checked\" />{$lang['strshow']}\n";
+ echo "<br/><input type=\"radio\" name=\"output\" value=\"download\" />{$lang['strdownload']}\n";
+ echo "<br /><input type=\"radio\" name=\"output\" value=\"gzipped\" />{$lang['strdownloadgzipped']}</p>\n";
echo "<p><input type=\"hidden\" name=\"action\" value=\"export\" />\n";
echo $misc->form;
* Does an export to the screen or as a download. This checks to
* see if they have pg_dump set up, and will use it if possible.
*
- * $Id: dataexport.php,v 1.9 2003/12/27 10:57:36 chriskl Exp $
+ * $Id: dataexport.php,v 1.10 2003/12/31 15:44:27 soranzo Exp $
*/
$extensions = array(
$url .= '&what=' . urlencode($_REQUEST['what']);
$url .= '&table=' . urlencode($_REQUEST['table']);
$url .= '&d_format=' . urlencode($_REQUEST['d_format']);
+ $url .= '&output=' . urlencode($_REQUEST['output']);
if (isset($_REQUEST['d_oids'])) $url .= '&d_oids=' . urlencode($_REQUEST['d_oids']);
- if (isset($_REQUEST['download'])) $url .= '&download=' . urlencode($_REQUEST['download']);
$url .= "&" . SID;
header("Location: {$url}");
$url = 'dbexport.php?database=' . urlencode($_REQUEST['database']);
$url .= '&what=' . urlencode($_REQUEST['what']);
$url .= '&table=' . urlencode($_REQUEST['table']);
+ $url .= '&output=' . urlencode($_REQUEST['output']);
if (isset($_REQUEST['s_clean'])) $url .= '&s_clean=' . urlencode($_REQUEST['s_clean']);
- if (isset($_REQUEST['download'])) $url .= '&download=' . urlencode($_REQUEST['download']);
$url .= "&" . SID;
header("Location: {$url}");
$url .= '&what=' . urlencode($_REQUEST['what']);
$url .= '&table=' . urlencode($_REQUEST['table']);
$url .= '&sd_format=' . urlencode($_REQUEST['sd_format']);
+ $url .= '&output=' . urlencode($_REQUEST['output']);
if (isset($_REQUEST['sd_clean'])) $url .= '&sd_clean=' . urlencode($_REQUEST['sd_clean']);
if (isset($_REQUEST['sd_oids'])) $url .= '&sd_oids=' . urlencode($_REQUEST['sd_oids']);
- if (isset($_REQUEST['download'])) $url .= '&download=' . urlencode($_REQUEST['download']);
$url .= "&" . SID;
header("Location: {$url}");
}
// Make it do a download, if necessary
- if (isset($_REQUEST['download'])) {
+ if ($_REQUEST['output'] == 'download') {
header('Content-Type: application/download');
if (isset($extensions[$format]))
echo "<option value=\"html\">XHTML</option>\n";
echo "<option value=\"xml\">XML</option>\n";
echo "</select></td></tr>";
- echo "<tr><th class=\"data\">{$lang['strdownload']}</th><td><input type=\"checkbox\" name=\"download\" /></td></tr>";
echo "</table>\n";
+ echo "<h3>{$lang['stroptions']}</h3>\n";
+ echo "<p><input type=\"radio\" name=\"output\" value=\"show\" checked=\"checked\" />{$lang['strshow']}\n";
+ echo "<br/><input type=\"radio\" name=\"output\" value=\"download\" />{$lang['strdownload']}</p>\n";
+
echo "<p><input type=\"hidden\" name=\"action\" value=\"export\" />\n";
echo "<input type=\"hidden\" name=\"what\" value=\"dataonly\" />\n";
if (isset($_REQUEST['table'])) {
* Does an export of a database to the screen or as a download.
* Can also dump a specific table of a database.
*
- * $Id: dbexport.php,v 1.5 2003/12/30 03:09:29 chriskl Exp $
+ * $Id: dbexport.php,v 1.6 2003/12/31 15:44:27 soranzo Exp $
*/
// Include application functions
if ($conf['pg_dump_path'] !== null && $conf['pg_dump_path'] != '') {
// Make it do a download, if necessary
- if (isset($_REQUEST['download'])) {
- header('Content-Type: application/download');
- if (isset($_REQUEST['compress']))
- header('Content-Disposition: attachment; filename=dump.sql.gz');
- else
+ switch($_REQUEST['output']){
+ case 'show':
+ header('Content-Type: text/plain');
+ break;
+ case 'download':
+ header('Content-Type: application/download');
header('Content-Disposition: attachment; filename=dump.sql');
- }
- else {
- header('Content-Type: text/plain');
+ break;
+ case 'gzipped':
+ header('Content-Type: application/download');
+ header('Content-Disposition: attachment; filename=dump.sql.gz');
+ break;
}
// Set environmental variable for password that pg_dump uses
}
// Check for GZIP compression specified
- if (isset($_REQUEST['compress'])) {
+ if ($_REQUEST['output'] == 'gzipped') {
$cmd .= " -Z 9";
}
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.125 2003/12/30 03:09:29 chriskl Exp $
+ * $Id: english.php,v 1.126 2003/12/31 15:44:27 soranzo Exp $
*/
// Language and character set
$lang['stroptions'] = 'Options';
$lang['strrefresh'] = 'Refresh';
$lang['strdownload'] = 'Download';
+ $lang['strdownloadgzipped'] = 'Download compressed with gzip';
$lang['strinfo'] = 'Info';
$lang['stroids'] = 'OIDs';
$lang['stradvanced'] = 'Advanced';
$lang['strprocesses'] = 'Processes';
$lang['strsetting'] = 'Setting';
$lang['strparameters'] = 'Parameters';
- $lang['strgzip'] = 'GZIP Compression';
// Error handling
$lang['strnoframes'] = 'You need a frames-enabled browser to use this application.';
* Italian language file, based on the english language file for phpPgAdmin.
* Nicola Soranzo [nsoranzo@tiscali.it]
*
- * $Id: italian.php,v 1.22 2003/12/16 00:32:28 soranzo Exp $
+ * $Id: italian.php,v 1.23 2003/12/31 15:44:27 soranzo Exp $
*/
// Language and character set - Lingua e set di caratteri
$lang['stroptions'] = 'Opzioni';
$lang['strrefresh'] = 'Ricarica';
$lang['strdownload'] = 'Scarica';
+ $lang['strdownloadgzipped'] = 'Scarica compresso con gzip';
$lang['strinfo'] = 'Informazioni';
$lang['stroids'] = 'OIDs';
$lang['stradvanced'] = 'Avanzato';
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.77 2003/12/30 03:09:29 chriskl Exp $
+ * $Id: english.php,v 1.78 2003/12/31 15:44:27 soranzo Exp $
*/
// Language and character set
$lang['stroptions'] = 'Options';
$lang['strrefresh'] = 'Refresh';
$lang['strdownload'] = 'Download';
+ $lang['strdownloadgzipped'] = 'Download compressed with gzip';
$lang['strinfo'] = 'Info';
$lang['stroids'] = 'OIDs';
$lang['stradvanced'] = 'Advanced';
$lang['strprocess'] = 'Process';
$lang['strprocesses'] = 'Processes';
$lang['strsetting'] = 'Setting';
- $lang['strgzip'] = 'GZIP compression';
// Error handling
$lang['strnoframes'] = 'You need a frames-enabled browser to use this application.';
* Italian language file, based on the english language file for phpPgAdmin.
* Nicola Soranzo [nsoranzo@tiscali.it]
*
- * $Id: italian.php,v 1.17 2003/12/16 00:32:28 soranzo Exp $
+ * $Id: italian.php,v 1.18 2003/12/31 15:44:27 soranzo Exp $
*/
// Language and character set - Lingua e set di caratteri
$lang['stroptions'] = 'Opzioni';
$lang['strrefresh'] = 'Ricarica';
$lang['strdownload'] = 'Scarica';
+ $lang['strdownloadgzipped'] = 'Scarica compresso con gzip';
$lang['strinfo'] = 'Informazioni';
$lang['stroids'] = 'OIDs';
$lang['stradvanced'] = 'Avanzato';
/**
* List tables in a database
*
- * $Id: tblproperties.php,v 1.33 2003/12/17 09:11:32 chriskl Exp $
+ * $Id: tblproperties.php,v 1.34 2003/12/31 15:44:27 soranzo Exp $
*/
// Include application functions
echo "</table>\n";
echo "<h3>{$lang['stroptions']}</h3>\n";
- echo "<table>\n";
- echo "<tr>\n<th class=\"data left\">{$lang['strdownload']}</th>\n";
- echo "<td><input type=\"checkbox\" name=\"download\" /></td>\n</tr>\n";
- echo "</table>\n";
+ echo "<p><input type=\"radio\" name=\"output\" value=\"show\" checked=\"checked\" />{$lang['strshow']}\n";
+ echo "<br/><input type=\"radio\" name=\"output\" value=\"download\" />{$lang['strdownload']}</p>\n";
echo "<p><input type=\"hidden\" name=\"action\" value=\"export\" />\n";
echo $misc->form;