function form()
 {
     exponent_lang_loadDictionary('modules', 'database');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     exponent_forms_initialize();
     $form = new form();
     //Form is created to collect information from the user
     //Values set previously (defaults or user-entered) are displayed
     $form->register('dbengine', TR_DATABASE_DBTYPE, new dropdowncontrol('', exponent_database_backends()));
     $form->register('host', TR_DATABASE_HOST, new textcontrol(DB_HOST));
     $form->register('port', TR_DATABASE_PORT, new textcontrol(DB_PORT));
     $form->register('dbname', TR_DATABASE_DBNAME, new textcontrol(''));
     $form->register('username', TR_DATABASE_USER, new textcontrol(DB_USER));
     $form->register('pwd', TR_DATABASE_PWD, new passwordcontrol(''));
     return $form;
 }
# This file is part of Exponent
#
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################
define('SCRIPT_EXP_RELATIVE', 'sdk/');
define('SCRIPT_FILENAME', 'db_reset.php');
// Initialize the Exponent Framework
include_once dirname(realpath(__FILE__)) . '/../exponent.php';
exponent_lang_loadDictionary('standard', 'dbrecover');
#exit(TR_DBRECOVER_RECOVERYDISABLED);
// If we made it here, the user has enabled the Database Recovery Script manually.
// Save the old user data, in case current user is actually logged in.
$oldu = $user;
// Temproarily elevate the current user to admin status, to
// allow them to install tables.
$user->is_admin = 1;
$user->is_acting_admin = 1;
// The $loc variable would normally be created by the Exponent framework
// when running the action we are about to include.  Here, we synthetically
// create the location, so that the action doesn't freak out.
$loc = exponent_core_makeLocation('administrationmodule');
foreach ($db->getTables(false) as $table) {
    $table = substr($table, strlen($db->prefix));
    echo 'Dropping ' . $table . '<br />';