global $wgDBprefix, $wgUser, $delete_langs, $wgOut, $IP, $forumver, $wgOut;
$awc_dir = awc_dir;
#
$awc_install_dir = awc_dir . "updates/install/";
#
$awc_lang_dir = awc_dir . "languages/";
#
$dbw =& wfGetDB(DB_MASTER);
$dbr =& wfGetDB(DB_SLAVE);
#$date_seperated = awcsforum_funcs::date_seperated(wfTimestampNow());
$date_seperated = $dbw->timestamp();
/** @changeVer 2.5.8 changed to new table install, use .sql file */
/** @todo work other dBases here too */
require_once awc_dir . 'dBase.php';
$installCLS = new awcforum_cls_dBase();
$installCLS->testCreate();
$installCLS->sourceFile($awc_install_dir, 'install_tables');
require_once $awc_install_dir . 'config.php';
foreach ($Config_Settings as $q => $v) {
    $s = isset($v[0]) ? $v[0] : null;
    $t = isset($v[1]) ? $v[1] : null;
    $a = isset($v[2]) ? $v[2] : null;
    #print "typeis->{$t} | q=$q<br />";
    #die("typeis->" . $q);
    $sql1 = "SELECT * FROM " . $wgDBprefix . "awc_f_config WHERE q = '" . $q . "'";
    $res1 = $dbr->query($sql1);
    if (!$dbw->fetchObject($res1)) {
        $wgOut->addHTML($wgDBprefix . "awc_f_config <b>Inserted: </b> " . $q . "<br>");
        $dbw->insert('awc_f_config', array('q' => $q, 'a' => $a, 'typeis' => $t, 'section' => $s));
    }
}