include DB . 'brewer.db.php';
include DB . 'dropoff.db.php';
if ($section != "step2" && $row_brewer['brewerCountry'] == "United States") {
    $us_phone = TRUE;
} else {
    $us_phone = FALSE;
}
$phone1 = $row_brewer['brewerPhone1'];
$phone2 = $row_brewer['brewerPhone2'];
if ($us_phone) {
    $phone1 = format_phone_us($phone1);
    $phone2 = format_phone_us($phone2);
}
// Get table assignments and build flags
$table_assign_judge = table_assignments($_SESSION['user_id'], "J", $_SESSION['prefsTimeZone'], $_SESSION['prefsDateFormat'], $_SESSION['prefsTimeFormat'], 0);
$table_assign_steward = table_assignments($_SESSION['user_id'], "S", $_SESSION['prefsTimeZone'], $_SESSION['prefsDateFormat'], $_SESSION['prefsTimeFormat'], 0);
if (!empty($table_assign_judge) || !empty($table_assign_steward)) {
    $table_assignment = TRUE;
}
if (empty($table_assign_judge) && empty($table_assign_steward)) {
    $table_assignment = FALSE;
}
// Build info message
if ($section == "step2" || $action == "add" || ($action == "edit" && $_SESSION['loginUsername'] == $row_brewerID['brewerEmail'] || $_SESSION['userLevel'] <= "1")) {
    $info_msg = "<p class=\"lead\">The information here beyond your first name, last name, and club is strictly for record-keeping and contact purposes. <small>A condition of entry into the competition is providing this information. Your name and club may be displayed should one of your entries place, but no other information will be made public.</small></p>\n";
    // Build form action link
    if ($section == "step2") {
        $form_action = $base_url . "includes/process.inc.php?section=setup&amp;action=add&amp;dbTable=" . $brewer_db_table;
    } else {
        $form_action = $base_url . "includes/process.inc.php?section=";
        if ($section == "brewer") {
    $email_subject .= "Stewarding at " . $_SESSION['contestName'];
} else {
    $email_subject .= $_SESSION['contestName'];
}
do {
    $output_datatables_add_link = "";
    $output_datatables_edit_link = "";
    $output_datatables_delete_link = "";
    $output_datatables_print_link = "";
    $output_datatables_other_link = "";
    $output_datatables_view_link = "";
    $output_datatables_actions = "";
    $user_info = user_info($row_brewer['uid']);
    $user_info = explode("^", $user_info);
    $table_assign_judge = table_assignments($user_info[0], "J", $_SESSION['prefsTimeZone'], $_SESSION['prefsDateFormat'], $_SESSION['prefsTimeFormat'], 1);
    $table_assign_steward = table_assignments($user_info[0], "S", $_SESSION['prefsTimeZone'], $_SESSION['prefsDateFormat'], $_SESSION['prefsTimeFormat'], 1);
    if ($filter == "judges") {
        $locations = $row_brewer['brewerJudgeLocation'];
    }
    if ($filter == "stewards") {
        $locations = $row_brewer['brewerStewardLocation'];
    }
    if ($_SESSION['brewerCountry'] == "United States") {
        $us_phone = TRUE;
    } else {
        $us_phone = FALSE;
    }
    unset($brewer_assignment);
    $brewer_assignment = brewer_assignment($row_brewer['uid'], "1", $id, $dbTable);
    //$judge_array = str_replace(", ",",",$brewer_assignment);
    //$judge_array = explode(",",$judge_array);