'')); $dbp = str_replace('_', '\_', $match[2]); } else { $db = false; $dbp = $db_prefix; } // Dump each table. $tables = $smcFunc['db_list_tables'](false, $db_prefix . '%'); foreach ($tables as $tableName) { if (function_exists('apache_reset_timeout')) @apache_reset_timeout(); // Are we dumping the structures? if (isset($_REQUEST['struct'])) { echo $crlf, '--', $crlf, '-- Table structure for table `', $tableName, '`', $crlf, '--', $crlf, $crlf, $smcFunc['db_table_sql']($tableName), ';', $crlf; } // How about the data? if (!isset($_REQUEST['data']) || substr($tableName, -10) == 'log_errors') continue; // Are there any rows in this table? $get_rows = $smcFunc['db_insert_sql']($tableName); // No rows to get - skip it. if (empty($get_rows)) continue; echo $crlf, '--', $crlf, '-- Dumping data in `', $tableName, '`', $crlf, '--', $crlf, $crlf, $get_rows, '-- --------------------------------------------------------', $crlf; } echo $crlf, '-- Done', $crlf; exit; } ?>