authenticate("U_EReplies,U_TextCols,U_TextRows,U_Preview,U_Groups, U_Display"); $Username = $user['U_Username']; if (!${$config['cookieprefix']."w3t_language"}) { ${$config['cookieprefix']."w3t_language"}= $config['language']; } // ------------------ // Check for any bans $html = new html; $userob -> check_ban($user['U_Number'],$Cat); // ------------------ // Let's get the groups if (!$user['U_Groups']) { $user['U_Groups'] = "-4-"; } // ----------------------------------------------------- // Let's find out if they get the default preview or not. isset($user['U_Preview']) && $Preview = $user['U_Preview']; if (!isset($Preview)) { $Preview = $config['preview']; } if ($user['U_EReplies'] == "On"){ $Eselected = "checked = \"checked\""; } if ( ($Preview == 1) || ($Preview == "on") ){ $Pselected = "checked = \"checked\""; } !empty($user['U_TextCols']) && $TextCols = $user['U_TextCols']; !empty($user['U_TextRows']) && $TextRows = $user['U_TextRows']; if (!isset($TextCols)) { $TextCols = $theme['TextCols']; } if (!isset($TextRows)) { $TextRows = $theme['TextRows']; } // -------------------------------------------------------------- // Let's make sure they are supposed to be making posts here $Grouparray = split("-",$user['U_Groups']); $gsize = sizeof($Grouparray); $groupquery = "AND ("; $g = 0; for ($i=0; $i<=$gsize;$i++) { if (!isset($Grouparray[$i])) { continue; } if (!preg_match("/[0-9]/",$Grouparray[$i])) { continue; }; $g++; if ($g > 1) { $groupquery .= " OR "; } $groupquery .= "Bo_Write_Perm LIKE '%-$Grouparray[$i]-%'"; } $groupquery .= ")"; // ------------------ // Get the board info $Board_q = addslashes($Board); $query = " SELECT Bo_Title,Bo_HTML,Bo_Markup,Bo_SpecialHeader,Bo_StyleSheet FROM {$config['tbprefix']}Boards WHERE Bo_Keyword = '$Board_q' $groupquery "; $sth = $dbh -> do_query($query); // ---------------- // Assign the stuff list($Title,$HTML,$Markup,$fheader,$fstyle) = $dbh -> fetch_array($sth); $dbh -> finish_sth($sth); // ------------------------------------------------- // Here we need to figure out what stylesheet to use $mystyle = ""; isset($user['U_StyleSheet']) && $mystyle = $user['U_StyleSheet']; if (!$mystyle) { $mystyle = "usedefault"; } if ($mystyle == "usedefault") { $mystyle = $fstyle; if ($mystyle == "usedefault") { $mystyle = $theme['stylesheet']; } } // fstyle will now be a global variable to use in send_header $fstyle = $mystyle; // ---------------------------------------------------------- // Find out if they are supposed to be replying on this board if (!$Title) { $html -> not_right($ubbt_lang['READ_PERM'],$Cat); } if (isset(${$config['cookieprefix']."ubbt_pass"})) { if (${$config['cookieprefix']."ubbt_pass"} == "invalid") { if (!$config['under13']) { $html -> not_right($ubbt_lang['UNDER13'],$Cat); } else { $html -> not_right($ubbt_lang['NO_COPPA'],$Cat); } } } // --------------- // Send the header $html -> send_header("{$ubbt_lang['MAKENEW_HEAD']} ($Title)",$Cat,0,$user,$Board); // ------------------------------- // Check if HTML is enabled or not if($HTML == "Off") { $htmlstatus = " {$ubbt_lang['NO_HTML']}"; } else { $htmlstatus = " {$ubbt_lang['YES_HTML']}"; } // -------------------------------------------- // Markup is disabled, so we better let them know if($Markup == "Off"){ $markupstatus = " {$ubbt_lang['NO_MARKUP']}"; } else { $markupstatus = " {$ubbt_lang['YES_MARKUP']} {$ubbt_lang['MARK_POSTS']}."; } // ------------------------------------------------------------------------- // If we are allowing anonymous users to choose a name to post under, we let // them know here. if ( ($config['anonnames']) && (!$Username) ) { $choosename = " {$ubbt_lang['CHOOSE_NAME']}"; } // ---------------------------------------------------------------------- // If The Guest group can post here then we set the Username to Anonymous // and we set the reged flag to "n"; $Reged = 'y'; if (!$Username) { $postername = $ubbt_lang['ANON_TEXT']; $Reged = 'n'; } else { $postername = $Username; } $addtofav = ""; if ($postername != $ubbt_lang['ANON_TEXT']) { $addtofav = " {$ubbt_lang['ADDTOFAV']}

"; } if ( ($postername == $ubbt_lang['ANON_TEXT']) && ($config['anonnames']) ) { $postname = ""; } else { $postname = "$postername"; $postname .= ""; } $iconselect = $html -> icon_select(); $instant_ubbcode = $html -> instant_ubbcode(); // ------------------------------------- // What options do they have for posting if ( ($config['markupoption'] == 1) || ($user['U_Status'] == "Administrator") || ($user['U_Status'] == "Moderator") ) { $markupselect = "{$ubbt_lang['MAKE_POST']}
"; $markupselect .= "

"; } // ------------------------------------ // No options, we use the board default else { if ( ($HTML == "Off") && ($Markup == "On") ) { $markupselect = ""; } elseif ( ($HTML == "On") && ($Markup == "On") ) { $markupselect =""; } elseif ( ($HTML == "Off") && ($Markup == "Off") ) { $markupselect =""; } else { $markupselect = ""; } } $formmethod = "
"; if ( ($config['files']) && ($Reged == "y") && (ini_get('file_uploads') ) ) { $canattach = " {$ubbt_lang['CAN_ATTACH']}"; $formmethod = ""; } // --------------------- // Grab the tablewrapper list($tbopen,$tbclose) = $html -> table_wrapper(); if (!$debug) { include("$thispath/templates/$tempstyle/newpost.tmpl"); } $html -> send_footer(); ?>