// creates schema file output
// $Id$
-ini_set('include_path', ini_get('include_path') . ':/Server/htdocs');
-require_once(ISSO . '/App.php');
+error_reporting(E_ALL ^ E_NOTICE);
-$db = BSApp::LoadModule('DbMySQL');
-$input = BSApp::LoadModule('Input');
+define('ISSO', dirname(dirname(getcwd())));
+require_once ISSO . '/App.php';
+require_once ISSO . '/DbMySqlI.php';
+require_once ISSO . '/Input.php';
+
+$db = BSApp::$db = new BSDbMySqlI();
+$input = BSApp::$input = new BSInput();
if (empty($_REQUEST['submit']))
{
}
else
{
- $db->connect($input->in['server'], $input->in['username'], $input->in['password'], $input->in['database'], false);
+ $db->connect($input->in['server'], $input->in['username'], $input->in['password'], $input->in['database']);
$t = ($input->in['encase'] ? '`' : '');
$prefix = ($input->in['prefix'] ? '" . TABLE_PREFIX . "' : '');
$tables = $db->query("SHOW TABLES");
- while ($table = $db->fetchArray($tables, false))
+ while ($table = $tables->fetchArray(false))
{
$table = $table[0];
$list = array();
$build = "CREATE TABLE $t$prefix$table$t\n(\n";
$indexes = $db->query("SHOW INDEX FROM $table");
- while ($index = $db->fetchArray($indexes))
+ while ($index = $indexes->fetchArray())
{
array_walk($index, 'trim');
}
$fields = $db->query("DESCRIBE $table");
- while ($field = $db->fetchArray($fields))
+ while ($field = $fields->fetchArray())
{
array_walk($field, 'trim');