예제 #1
0
            // end if
        }
        // end for
        $dumpBuffer .= '</database>' . DUMP_CRLF;
    } else {
        if (isset($_POST['table_select'])) {
            $tmpSelect = implode($_POST['table_select'], OPEN_SEPARATOR);
            $tmpSelect = OPEN_SEPARATOR . $tmpSelect . OPEN_SEPARATOR;
        }
        if (!isset($limitFrom) || !isset($limitTo)) {
            $limitFrom = $limitTo = 0;
        }
        for ($i = 0; $i < $numTables; $i++) {
            $table = $single ? $_POST['table_select'][$i] : $auxConn->tableName($i);
            if (isset($tmpSelect) && strpos(' ' . $tmpSelect, OPEN_SEPARATOR . $table . OPEN_SEPARATOR) || !isset($tmpSelect) && !empty($table)) {
                $dumpBuffer .= Dump::CSVData(OPEN_DATABASE, $table, array('from' => $limitFrom, 'to' => $limitTo, 'what' => isset($_POST['what']) ? $_POST['what'] : null));
            }
            // end if
        }
        // end for
    }
    // end 'csv' case
}
// end building the dump
// Free memory if is necessary
if (!$single) {
    $auxConn->close();
    unset($auxConn);
}
/**
 * "Displays" the dump...