$competition_logo = "<img src='".$base_url."user_images/".$_SESSION['contestLogo']."' width='".$_SESSION['prefsCompLogoSize']."' style='float:right; padding: 5px 0 5px 5px' alt='Competition Logo' title='Competition Logo' />";
	
Declare all variables empty at the top of the script. Add on later...
	$primary_page_info = "";
	$header1_1 = "";
	$page_info1 = "";
	$header1_2 = "";
	$page_info2 = "";
	
	$table_head1 = "";
	$table_body1 = "";
	
	etc., etc., etc.

 * ---------------- END Rebuild Info --------------------- */
$a = styles_active(0);
foreach (array_unique($a) as $style) {
    include DB . 'winners_category.db.php';
    // Display all winners
    if ($row_entry_count['count'] > 1) {
        $entries = "entries";
    } else {
        $entries = "entry";
    }
    if ($row_score_count['count'] > "0") {
        $primary_page_info = "";
        $header1_1 = "";
        $page_info1 = "";
        $header1_2 = "";
        $page_info2 = "";
        $table_head1 = "";
$message2 = "<div class='error'>No judging dates/locations have been specified. <a href='index.php?section=admin&amp;action=add&amp;go=judging'>Add a judging location</a>?</div>";
$primary_page_info = "";
$primary_page_info .= sprintf("<p>Thank you for your interest in the %s organized by ", $_SESSION['contestName']);
if ($_SESSION['contestHostWebsite'] != "") {
    $primary_page_info .= sprintf("<a href='%s' target='_blank'>%s</a>", $_SESSION['contestHostWebsite'], $_SESSION['contestHost']);
} else {
    $primary_page_info .= $_SESSION['contestHost'];
}
if (!empty($_SESSION['contestHostLocation'])) {
    $primary_page_info .= sprintf(", %s", $_SESSION['contestHostLocation']);
}
$primary_page_info .= sprintf(".  Be sure to read the <a href='%s'>competition rules</a>.</p>", build_public_url("rules", "default", "default", $sef, $base_url));
if (judging_date_return() == 0 && $registration_open == "2") {
    include 'judge_closed.sec.php';
    include DB . 'winners.db.php';
    $style_types_active = styles_active(1);
    if ($style_types_active > 0) {
        $header1_1 .= "<h2>Best of Show Winners";
        if ($section == "past_winners") {
            $header1_1 .= ": " . $trimmed;
        }
        $header1_1 .= "</h2>";
    }
    $header1_2 .= "<h2>Winning Entries";
    if ($section == "past_winners") {
        $header1_2 .= ": " . $trimmed;
    }
    $header1_2 .= "</h2>";
    $page_info .= sprintf("<h2>Winning Entries</h2><p>Winners will be posted on or after %s.</p>", getTimeZoneDateTime($_SESSION['prefsTimeZone'], $row_check['judgingDate'] + $delay, $_SESSION['prefsDateFormat'], $_SESSION['prefsTimeFormat'], "long", "date-time"));
} else {
    if (!isset($_SESSION['loginUsername'])) {
                     $html .= strtr($row_scores['brewerClubs'], $html_remove);
                 } else {
                     $html .= "&nbsp;";
                 }
                 $html .= '</td>';
                 $html .= '</tr>';
             } while ($row_scores = mysql_fetch_assoc($scores));
             $html .= '</table>';
         }
         // if (($results_count[0] > 0) && ($results_count[1] > 0))
     }
     // end foreach
 }
 // end if if ($_SESSION['prefsWinnerMethod'] == 1)
 if ($_SESSION['prefsWinnerMethod'] == 2) {
     $styles = styles_active(2);
     foreach (array_unique($styles) as $style) {
         $style = explode("^", $style);
         include DB . 'winners_subcategory.db.php';
         if ($row_entry_count['count'] > 0 && $row_score_count['count'] > 0) {
             $html .= '<br><br><strong>Category ' . ltrim($style[0], "0") . $style[1] . ': ' . $style[2] . ' (' . $row_entry_count['count'] . ' entries)</strong><br>';
             $html .= '<table border="1">';
             $html .= '<tr>';
             $html .= '<td width="35" align="center"  bgcolor="#cccccc" nowrap="nowrap"><strong>Pl.</strong></td>';
             $html .= '<td width="150" align="center" bgcolor="#cccccc"><strong>Brewer(s)</strong></td>';
             $html .= '<td width="200" align="center" bgcolor="#cccccc"><strong>Entry Name</strong></td>';
             $html .= '<td width="200" align="center" bgcolor="#cccccc"><strong>Style</strong></td>';
             $html .= '<td width="175" align="center" bgcolor="#cccccc"><strong>Club</strong></td>';
             $html .= '</tr>';
             include DB . 'scores.db.php';
             do {
	$page_info1 = "";
	$header1_2 = "";
	$page_info2 = "";
	
	$table_head1 = "";
	$table_body1 = "";
	
	etc., etc., etc.

 * ---------------- END Rebuild Info --------------------- */
if ($_SESSION['prefsStyleSet'] == "BJCP2008") {
    $category_end = 28;
} else {
    $category_end = 34;
}
$a = styles_active(2);
foreach (array_unique($a) as $style) {
    $style = explode("^", $style);
    include DB . 'winners_subcategory.db.php';
    // Display all winners
    if ($row_entry_count['count'] > 0) {
        if ($row_entry_count['count'] > 1) {
            $entries = "entries";
        } else {
            $entries = "entry";
        }
        if ($row_score_count['count'] > 0) {
            $primary_page_info = "";
            $header1_1 = "";
            $page_info1 = "";
            $header1_2 = "";