* 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.24 2007/01/15 15:48:17 soranzo Exp $
+ * $Id: dataexport.php,v 1.23.2.1 2007/05/28 19:30:17 soranzo Exp $
*/
$extensions = array(
echo " FROM stdin;\n";
while (!$rs->EOF) {
$first = true;
- while(list($k, $v) = each($rs->fields)) {
+ while(list($k, $v) = each($rs->f)) {
// Escape value
$v = $data->escapeBytea($v);
if (!$rs->EOF) {
// Output header row
$j = 0;
- foreach ($rs->fields as $k => $v) {
+ foreach ($rs->f as $k => $v) {
$finfo = $rs->fetchField($j++);
if ($finfo->name == $data->id && !$oids) continue;
echo "\t\t<th>", $misc->printVal($finfo->name, true), "</th>\r\n";
while (!$rs->EOF) {
echo "\t<tr>\r\n";
$j = 0;
- foreach ($rs->fields as $k => $v) {
+ foreach ($rs->f as $k => $v) {
$finfo = $rs->fetchField($j++);
if ($finfo->name == $data->id && !$oids) continue;
echo "\t\t<td>", $misc->printVal($v, true, $finfo->type), "</td>\r\n";
// Output header row
$j = 0;
echo "\t<header>\n";
- foreach ($rs->fields as $k => $v) {
+ foreach ($rs->f as $k => $v) {
$finfo = $rs->fetchField($j++);
$name = htmlspecialchars($finfo->name);
$type = htmlspecialchars($finfo->type);
while (!$rs->EOF) {
$j = 0;
echo "\t\t<row>\n";
- foreach ($rs->fields as $k => $v) {
+ foreach ($rs->f as $k => $v) {
$finfo = $rs->fetchField($j++);
$name = htmlspecialchars($finfo->name);
if ($v != null) $v = htmlspecialchars($v);
echo "INSERT INTO \"{$_REQUEST['table']}\" (";
$first = true;
$j = 0;
- foreach ($rs->fields as $k => $v) {
+ foreach ($rs->f as $k => $v) {
$finfo = $rs->fetchField($j++);
$k = $finfo->name;
// SQL (INSERT) format cannot handle oids
if (!$rs->EOF) {
// Output header row
$first = true;
- foreach ($rs->fields as $k => $v) {
+ foreach ($rs->f as $k => $v) {
$finfo = $rs->fetchField($k);
$v = $finfo->name;
if ($v != null) $v = str_replace('"', '""', $v);
}
while (!$rs->EOF) {
$first = true;
- foreach ($rs->fields as $k => $v) {
+ foreach ($rs->f as $k => $v) {
if ($v != null) $v = str_replace('"', '""', $v);
if ($first) {
echo ($v == null) ? "\"\\N\"" : "\"{$v}\"";
$misc->printTitle($lang['strexport']);
if (isset($msg)) $misc->printMsg($msg);
- echo "<form action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">\n";
+ echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\">{$lang['strformat']}:</th><td><select name=\"d_format\">\n";
// COPY and SQL require a table
/**
* Intro screen
*
- * $Id: intro.php,v 1.16 2006/12/31 16:58:59 soranzo Exp $
+ * $Id: intro.php,v 1.15.6.1 2007/05/28 19:30:17 soranzo Exp $
*/
// Include application functions (no db conn)
<h1><?php echo "$appName $appVersion (PHP ". phpversion() .')' ?></h1>
-<form method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
+<form method="get" action="<?php echo $PHP_SELF; ?>">
+ <label>
<select name="language" onchange="this.form.submit()">
<?php
$language = isset($_SESSION['webdbLanguage']) ? $_SESSION['webdbLanguage'] : 'english';
?>
</select>
<noscript><input type="submit" value="<?php echo $lang['stralter'] ?>" /></noscript>
+ </label>
</form>
<p><?php echo $lang['strintro'] ?></p>