// Print Recipe
 $print_recipe_link = "<span class='icon'><img src='" . $base_url . "images/printer.png'  border='0' alt='Print Recipe Form for " . $row_log['brewName'] . "' title='Print Recipe for " . $row_log['brewName'] . "'></span><a id='modal_window_link' href='" . $base_url . "output/entry.php?go=recipe&amp;id=" . $row_log['id'] . "&amp;bid=" . $_SESSION['brewerID'] . "' title='Print Recipe Form for " . $row_log['brewName'] . "'>Print Recipe</a>&nbsp;&nbsp;";
 if ($comp_entry_limit) {
     $warning_append = "\nAlso, you will not be able to add another entry since the entry limit for the competition has been reached. Click Cancel in this box and then edit the entry instead if you wish to keep it.";
 } else {
     $warning_append = "";
 }
 if ($entry_window_open == 1) {
     $delete_link = build_action_link("bin_closed", $base_url, $section, $go, "delete", $filter, $row_log['id'], $brewing_db_table, "Delete " . $row_log['brewName'] . "? This cannot be undone. " . $warning_append, 1, "Delete");
 }
 if (judging_date_return() > 0 && $action != "print") {
     $entry_output .= "<td class='dataList' nowrap='nowrap'>";
     if ($registration_open == 1 || $entry_window_open == 1) {
         $entry_output .= $edit_link;
     }
     if (pay_to_print($_SESSION['prefsPayToPrint'], $row_log['brewPaid'])) {
         $entry_output .= $print_forms_link;
     }
     if (NHC && $prefix == "final_") {
         $entry_output .= $print_recipe_link;
     }
     if ($row_log['brewPaid'] != 1) {
         $entry_output .= $delete_link;
     }
     $entry_output .= "</td>";
 }
 // Display the edit link for NHC final round after judging has taken place
 // Necessary to gather recipe data for first place winners in the final round
 if (judging_date_return() == 0 && $action != "print") {
     $entry_output .= "<td class='dataList' nowrap='nowrap'>";
     if ($registration_open == 2 && $entry_window_open == 1 && (NHC && $prefix == "final_")) {
Exemplo n.º 2
0
include CLASSES . 'tiny_but_strong/tbs_class_php5.php';
include DB . 'output_entry.db.php';
$entry_closed = getTimeZoneDateTime($_SESSION['prefsTimeZone'], $row_contest_dates['contestEntryDeadline'], $_SESSION['prefsDateFormat'], $_SESSION['prefsTimeFormat'], "long", "date-no-gmt");
if (NHC && $prefix == "final_") {
    $contest_name = date('Y') . " NHC Final Round";
} else {
    $contest_name = $contest_info['contestName'];
}
// Check access restrictions
if ($brewer_info['brewerEmail'] != $_SESSION['loginUsername'] && $row_logged_in_user['userLevel'] > 1) {
    echo "<html><head><title>Error</title></head><body>";
    echo "<p>You do not have sufficient access priveliges to view this page.</p>";
    echo "</body>";
    exit;
}
if (!pay_to_print($_SESSION['prefsPayToPrint'], $brewing_info['brewPaid']) && $go != "recipe") {
    echo "<html><head><title>Error</title></head><body>";
    echo "<p>You must pay for your entry to print its entry form and bottle labels.</p>";
    echo "</body>";
    exit;
}
if ($_SESSION['prefsStyleSet'] == "BJCP2008") {
    $category_end = 23;
} else {
    $category_end = 34;
}
if ($prefix == "final_") {
    $brewing_info['id'] = sprintf("%06s", $brewing_info['id']);
} else {
    $brewing_info['id'] = sprintf("%04s", $brewing_info['id']);
}