/*
# UBB.threads, Version 6
# Official Release Date for UBB.threads Version6: 06/05/2002
# First version of UBB.threads created July 30, 1996 (by Rick Baker).
# This entire program is copyright Infopop Corporation, 2002.
# For more info on the UBB.threads and other Infopop
# Products/Services, visit: http://www.infopop.com
# Program Author: Rick Baker.
# File Version 6.5.1.1
# You may not distribute this program in any manner, modified or otherwise,
# without the express, written written consent from Infopop Corporation.
# Note: if you modify ANY code within UBB.threads, we at Infopop Corporation
# cannot offer you support-- thus modify at your own peril :)
# ---------------------------------------------------------------------------
*/
// Require the library
require ("./includes/main.inc.php");
require ("languages/{$myprefs['language']}/editbasic.php");
require ("languages/{$myprefs['language']}/editdisplay.php");
require ("languages/{$myprefs['language']}/editemail.php");
require ("languages/{$myprefs['language']}/newuser.php");
$html = new html;
$userob = new user;
$userob->check_ban();
// -------------
// Get the input
$Cat = get_input("Cat","get");
$p = get_input("p","get");
// -------------------------------------------
// Make sure we have a minlength and maxlength
if (!isset($config['minlength'])) { $config['minlength'] = '3'; }
if (!isset($config['maxlength'])) { $config['maxlength'] = '3'; }
// -------------------------------------------------------------------------
// Security check, make sure install, createtable, altertable files are gone
$query = "
SELECT COUNT(U_Username)
FROM {$config['tbprefix']}Users
";
$sth = $dbh -> do_query($query,__LINE__,__FILE__);
list($usercheck) = $dbh -> fetch_array($sth);
if ($usercheck < 2) {
if (file_exists("install")) {
$html -> not_right("You need to delete the entire install directory before creating your admin user.",$Cat);
}
}
if ($config['suspend_reg']) {
$html->not_right($ubbt_lang['REG_OFF'],$Cat);
}
// ---------------------
// Grab the tablewrapper
list($tbopen,$tbclose) = $html -> table_wrapper();
// ------------------------------------------------------
// If we are checking ages, the we need to do this first
if ( ($config['checkage']) && ($p != "y") ) {
$html -> send_header($ubbt_lang['AGE_VER'],$Cat,0,0,0,0);
$currentyear = date("Y");
if (isset(${$config['cookieprefix']."ubbt_dob"})) {
list($month,$day,$year) = split("/",${$config['cookieprefix']."ubbt_dob"});
$months = array('','January','February','March','April','May','June','July','August','September','October','November','December');
$formprint = "
{$ubbt_lang['DOB_EXIST']}
$months[$month] $day, $year
";
}
else {
$formprint = "
{$ubbt_lang['DOB']}
";
}
// ---------------------
// Grab the tablewrapper
list($tbopen,$tbclose) = $html -> table_wrapper();
include("$thispath/templates/$tempstyle/newuser_checkage.tmpl");
$html -> send_footer();
exit;
}
// ---------------------
// Send the page to them
$html -> send_header($ubbt_lang['NEW_USER'],$Cat,0,0,0,0);
// ---------------------------------------
// Let's see if we are giving board rules
if ($config['boardrules']) {
$boardrules = <<