check_ban(); // ------------- // Get the input $Cat = get_input("Cat","get","cat"); $p = get_input("p","get","alpha"); // ------------------------------------------- // 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 = << {$ubbt_lang['BOARD_RULES']} $tbclose $tbopen EOF; $rules = @file("{$config['path']}/includes/boardrules.php"); if (!is_array($rules)) { $rules = @file("{config['phpurl']}/includes/boardrules.php"); } if ($rules) { while(list($linenum,$line) = each($rules)) { $boardrules .= $line; } } $boardrules .= <<
{$ubbt_lang['I_AGREE']} $tbclose

EOF; } else { $boardrules = ""; } $requiredfields = ""; $optionalfields = ""; // Grab the registration screen options $query = " SELECT R_Field,R_Show,R_Require FROM {$config['tbprefix']}Registration "; $sth = $dbh->do_query($query,__LINE__,__FILE__); while(list($field,$show,$require) = $dbh->fetch_array($sth)) { if ($show) { $regopt[$field]['show'] = $show; } if ($require) { $regopt[$field]['require'] = $require; } } // This whole section below is quite messy, edit at your own risk :) //PASSWORD SELECTION if (isset($regopt['U_Password'])) { $thisoption = << {$ubbt_lang['OPT_PASS']} {$ubbt_lang['VER_PASS']} EOF; if (isset($regopt['U_Password']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Password']['show'])) { $optionalfields .= $thisoption; } } // END PASSWORD SELECTION // LANGUAGE SELECTION if (isset($regopt['U_Language'])) { $thisoption = << {$ubbt_lang['CH_LANG']} EOF; // ------------------------------- // Let's list out the style sheets $defselected = "selected=\"selected\""; $stylesheets = ""; $styles = split(",",$theme['availablestyles']); $size = sizeof($styles); for ($i=0;$i<$size;$i++) { list($style,$desc) = split(":",$styles[$i]); $style = trim($style); $desc = trim($desc); $extra = ""; $thisoption .= ""; } $thisoption .= << EOF; if (isset($regopt['U_StyleSheet']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_StyleSheet']['show'])) { $optionalfields .= $thisoption; } } // END STYLESHEET SELECTION // FAKE EMAIL SELECTION if (isset($regopt['U_Fakeemail'])) { $thisoption = << {$ubbt_lang['FAKE_EMAIL']} EOF; if (isset($regopt['U_Fakeemail']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Fakeemail']['show'])) { $optionalfields .= $thisoption; } } // END FAKE EMAIL SELECTION // FULL NAME SELECTION if (isset($regopt['U_Name'])) { $thisoption = << {$ubbt_lang['FULL_NAME']} EOF; if (isset($regopt['U_Name']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Name']['show'])) { $optionalfields .= $thisoption; } } // END FULL NAME SELECTION // BIRTHDAY SELECTION if ((isset($regopt['U_Birthday'])) && (!$config['checkage'])) { $thisoption = << {$ubbt_lang['BIRTHDAY']} EOF; // ----------------------------------------- // Generate the birthday selection formboxes $thisoption .= ""; $thisoption .= ""; $thisoption .= ""; $thisoption .= << EOF; $bday_text = $ubbt_lang['SHOWBDAY']; if (!$config['cal_bday']) { $bday_text = $ubbt_lang['SHOWBDAY2']; } $thisoption .= << $bday_text EOF; if (isset($regopt['U_Birthday']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Birthday']['show'])) { $optionalfields .= $thisoption; } } // END BIRTHDAY SELECTION // PICTURE SELECTION $allowpics = ""; if ($config['url_av']) { $pictureview = " {$ubbt_lang['UPLOAD_PIC_SHORT']}

"; $allowpics = 1; $Picture ="http://"; $pictureview .= " {$ubbt_lang['PROF_PIC_SHORT']}

"; $allowpics = 1; } $stockavatar = ""; if ($config['stockavatars']) { $stockavatar = << {$ubbt_lang['PREDEF_PIC']}
  {$ubbt_lang['PREDEF_CHOOSE']}  

EOF; } $picchangetext = ""; $picchangeclose = ""; if ($allowpics) { $PicWidth = $theme['PictureWidth']; $PicHeight = $theme['PictureHeight']; $picchangetext .= " {$ubbt_lang['NONE']}

"; } $avatarscript = << EOF; if (isset($regopt['U_Picture'])) { $thisoption = << {$ubbt_lang['AVATAR']} $picchangetext $avatarscript $pictureview $stockavatar $picchangeclose EOF; if (isset($regopt['U_Picture']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Picture']['show'])) { $optionalfields .= $thisoption; } } // END PICTURE SELECTION // PRIVATE MESSAGE SELECTION if (isset($regopt['U_AcceptPriv'])) { $thisoption = << {$ubbt_lang['PROF_PRIV']} EOF; if (isset($regopt['U_AcceptPriv']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_AcceptPriv']['show'])) { $optionalfields .= $thisoption; } } // END PRIVATE MESSAGE SELECTION // SIGNATURE SELECTION if (isset($regopt['U_Signature'])) { $thisoption = << {$ubbt_lang['PROF_SIG']} EOF; if (isset($regopt['U_Signature']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Signature']['show'])) { $optionalfields .= $thisoption; } } // END SIGNATURE SELECTION // HOMEPAGE SELECTION if (isset($regopt['U_Homepage'])) { $thisoption = << {$ubbt_lang['PROF_HOME']} EOF; if (isset($regopt['U_Homepage']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Homepage']['show'])) { $optionalfields .= $thisoption; } } // END HOMEPAGE SELECTION // OCCUPATION SELECTION if (isset($regopt['U_Occupation'])) { $thisoption = << {$ubbt_lang['PROF_OCC']} EOF; if (isset($regopt['U_Occupation']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Occupation']['show'])) { $optionalfields .= $thisoption; } } // END OCCUPATION SELECTION // HOBBIES SELECTION if (isset($regopt['U_Hobbies'])) { $thisoption = << {$ubbt_lang['PROF_HOBB']} EOF; if (isset($regopt['U_Hobbies']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Hobbies']['show'])) { $optionalfields .= $thisoption; } } // END HOBBIES SELECTION // LOCATION SELECTION if (isset($regopt['U_Location'])) { $thisoption = << {$ubbt_lang['PROF_LOC']} EOF; if (isset($regopt['U_Location']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Location']['show'])) { $optionalfields .= $thisoption; } } // END LOCATION SELECTION // BIO SELECTION if (isset($regopt['U_Bio'])) { $thisoption = << {$ubbt_lang['PROF_BIO']} EOF; if (isset($regopt['U_Bio']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Bio']['show'])) { $optionalfields .= $thisoption; } } // END BIO SELECTION // EXTRA1 SELECTION if (isset($regopt['U_Extra1'])) { $thisoption = << {$ubbt_lang['PROF_ICQ']} EOF; if (isset($regopt['U_Extra1']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Extra1']['show'])) { $optionalfields .= $thisoption; } } // END EXTRA1 SELECTION // EXTRA2 SELECTION if (isset($regopt['U_Extra2'])) { $thisoption = << {$config['extra2']} EOF; if (isset($regopt['U_Extra2']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Extra2']['show'])) { $optionalfields .= $thisoption; } } // END EXTRA2 SELECTION // EXTRA3 SELECTION if (isset($regopt['U_Extra3'])) { $thisoption = << {$config['extra3']} EOF; if (isset($regopt['U_Extra3']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Extra3']['show'])) { $optionalfields .= $thisoption; } } // END EXTRA3 SELECTION // EXTRA4 SELECTION if (isset($regopt['U_Extra4'])) { $thisoption = << {$config['extra4']} EOF; if (isset($regopt['U_Extra4']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Extra4']['show'])) { $optionalfields .= $thisoption; } } // END EXTRA4 SELECTION // EXTRA5 SELECTION if (isset($regopt['U_Extra5'])) { $thisoption = << {$config['extra5']} EOF; if (isset($regopt['U_Extra5']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Extra5']['show'])) { $optionalfields .= $thisoption; } } // END EXTRA5 SELECTION // VISIBLE SELECTION if (isset($regopt['U_Visible'])) { $thisoption = << {$ubbt_lang['PROF_VIS']} EOF; if (isset($regopt['U_Visible']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Visible']['show'])) { $optionalfields .= $thisoption; } } // END VISIBLE SELECTION // ONLINE FORMAT SELECTION if (isset($regopt['U_OnlineFormat'])) { $thisoption = << {$ubbt_lang['AUX_ONLINE']} EOF; if (isset($regopt['U_OnlineFormat']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_OnlineFormat']['show'])) { $optionalfields .= $thisoption; } } // END ONLINE FORMAT SELECTION // TIMEFORMAT SELECTION if (isset($regopt['U_TimeFormat'])) { $long="";$short1="";$short2="";$short3="";$short4="";$short5=""; $timeformat = $theme['timeformat']; if ($timeformat == "long") { $long = "SELECTED"; } elseif ($timeformat == "short1") { $short1 = "SELECTED"; } elseif ($timeformat == "short2") { $short2 = "SELECTED"; } elseif ($timeformat == "short3") { $short3 = "SELECTED"; } elseif ($timeformat == "short4") { $short4 = "SELECTED"; } elseif ($timeformat == "short5") { $short5 = "SELECTED"; } $thisoption = << {$ubbt_lang['TIMEFORMAT']} EOF; if (isset($regopt['U_TimeFormat']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_TimeFormat']['show'])) { $optionalfields .= $thisoption; } } // END TIMEFORMAT SELECTION // TIMEOFFSET SELECTION if (isset($regopt['U_TimeOffset'])) { $date = $html -> get_date(); $time = $html -> convert_time($date); $thisoption = << {$ubbt_lang['YOUR_OFFSET']}
{$ubbt_lang['CURR_TIME']} $time
EOF; if (isset($regopt['U_TimeOffset']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_TimeOffset']['show'])) { $optionalfields .= $thisoption; } } // END TIMEOFFSET SELECTION // SHOW SIGS SELECTION if (isset($regopt['U_ShowSigs'])) { $thisoption = << {$ubbt_lang['VIEW_SIGS']} EOF; if (isset($regopt['U_ShowSigs']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_ShowSigs']['show'])) { $optionalfields .= $thisoption; } } // END SHOWSIGS SELECTION // FRONTPAGE SELECTION if (isset($regopt['U_FrontPage'])) { $thisoption = << {$ubbt_lang['FRONTPAGE']} EOF; if (isset($regopt['U_FrontPage']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_FrontPage']['show'])) { $optionalfields .= $thisoption; } } // END FRONTPAGE SELECTIOn // DISPLAY SELECTION if (isset($regopt['U_Display'])) { $thisoption = << {$ubbt_lang['PROF_DISP']} EOF; if (isset($regopt['U_Display']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Display']['show'])) { $optionalfields .= $thisoption; } } // END DISPLAY SELECTION // VIEW SELECTION if (isset($regopt['U_View'])) { $thisoption = << {$ubbt_lang['PROF_VIEW']} EOF; if (isset($regopt['U_View']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_View']['show'])) { $optionalfields .= $thisoption; } } // END VIEW SELECTION // POSTSPER SELECTION if (isset($regopt['U_PostsPer'])) { $thisoption = << {$ubbt_lang['PROF_POSTS_SHORT']} EOF; if (isset($regopt['U_PostsPer']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_PostsPer']['show'])) { $optionalfields .= $thisoption; } } // END POSTSPER SELECTION // FLATPOSTS SELECTION if (isset($regopt['U_FlatPosts'])) { $thisoption = << {$ubbt_lang['TOT_FLAT_SHORT']} EOF; if (isset($regopt['U_FlatPosts']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_FlatPosts']['show'])) { $optionalfields .= $thisoption; } } // END FLATPOSTS SELECTION // PREVIEW SELECTION if (isset($regopt['U_Preview'])) { $thisoption = << {$ubbt_lang['PROF_PREVIEW']} EOF; if (isset($regopt['U_Preview']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Preview']['show'])) { $optionalfields .= $thisoption; } } // END PREVIEW SELECTION // TEXTROWS SELECTION if (isset($regopt['U_TextRows'])) { $thisoption = << {$ubbt_lang['PROF_ROWS']} EOF; if (isset($regopt['U_TextRows']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_TextRows']['show'])) { $optionalfields .= $thisoption; } } // END TEXTROWS SELECTION // TEXTCOLS SELECTION if (isset($regopt['U_TextCols'])) { $thisoption = << {$ubbt_lang['PROF_COLS']} EOF; if (isset($regopt['U_TextCols']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_TextCols']['show'])) { $optionalfields .= $thisoption; } } // END TEXTCOLS SELECTION // PICTUREVIEW SELECTION if ((isset($regopt['U_PictureView'])) && ($theme['PictureView'])) { $thisoption = << {$ubbt_lang['PROF_PICVIEW']} EOF; if (isset($regopt['U_PictureView']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_PictureView']['show'])) { $optionalfields .= $thisoption; } } // END PICTUREVIEW SELECTION // PICTUREPOSTS SELECTION if ((isset($regopt['U_PicturePosts'])) && ($theme['PictureView'])) { $thisoption = << {$ubbt_lang['VIEW_PICS']} EOF; if (isset($regopt['U_PicturePosts']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_PicturePosts']['show'])) { $optionalfields .= $thisoption; } } // END PICTUREPOSTS SELECTION // ADMIN EMAILS SELECTION if (isset($regopt['U_AdminEmails'])) { $thisoption = << {$ubbt_lang['ADMIN_EMAIL']} EOF; if (isset($regopt['U_AdminEmails']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_AdminEmails']['show'])) { $optionalfields .= $thisoption; } } // END ADMIN EMAILS SELECTION // EMAIL FORMAT SELECTION if (isset($regopt['U_EmailFormat'])) { $thisoption = << {$ubbt_lang['HTMLEMAIL']} EOF; if (isset($regopt['U_EmailFormat']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_EmailFormat']['show'])) { $optionalfields .= $thisoption; } } // END EMAIL FORMAT SELECTION // NOTIFY SELECTION if (isset($regopt['U_Notify'])) { $thisoption = << {$ubbt_lang['PROF_NOTIF']} EOF; if (isset($regopt['U_Notify']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_Notify']['show'])) { $optionalfields .= $thisoption; } } if (isset($regopt['U_EReplies'])) { $thisoption = << {$ubbt_lang['PROF_REPLIES']} EOF; if (isset($regopt['U_EReplies']['require'])) { $requiredfields .= $thisoption; } elseif (isset($regopt['U_EReplies']['show'])) { $optionalfields .= $thisoption; } } if ($optionalfields) { $optionalfields = << {$ubbt_lang['OPTIONAL']} $tbclose $tbopen $optionalfields $tbclose EOF; } // --------------------- // Grab the tablewrapper list($tbopen,$tbclose) = $html -> table_wrapper(); // Setup the form type: if ( ($config['uploadav']) && (ini_get('file_uploads')) ){ $enctype = "enctype=\"multipart/form-data\""; } else { $enctype = ""; } include("$thispath/templates/$tempstyle/newuser_signup.tmpl"); $html -> send_footer(); ?>