function entries_no_special($user_id) { require CONFIG . 'config.php'; mysql_select_db($database, $brewing); $query_entry_check = sprintf("SELECT brewCategorySort, brewSubCategory FROM %s WHERE brewBrewerID='%s' AND brewInfo IS NULL", $prefix . "brewing", $user_id); $entry_check = mysql_query($query_entry_check, $brewing) or die(mysql_error()); $row_entry_check = mysql_fetch_assoc($entry_check); do { $brew_style[] = $row_entry_check['brewCategorySort'] . "-" . $row_entry_check['brewSubCategory']; } while ($row_entry_check = mysql_fetch_assoc($entry_check)); foreach ($brew_style as $style) { if (check_special_ingredients($style, $_SESSION['prefsStyleSet'])) { $totalRows_entry_check[] = 1; } else { $totalRows_entry_check[] = 0; } } if (array_sum($totalRows_entry_check) > 0) { return TRUE; } else { return FALSE; } }
$entry_output .= $entry_style; } //$entry_output .= "<span class='required'>Style entered NOT accepted.</span>"; $entry_output .= "</td>"; if ($action == "print") { $entry_output .= "<td class='dataList bdr1B'>"; } else { $entry_output .= "<td class='dataList'>"; } if ($row_log['brewConfirmed'] == "0") { if ($action != "print") { $entry_output .= "<span class='icon'><img src='" . $base_url . "images/exclamation.png' border='0' alt='Unconfirmed entry!' title='Unconfirmed entry! Click Edit to review and confirm the entry data.'></span>"; } else { $entry_output .= "Y"; } } elseif (check_special_ingredients($entry_style, $_SESSION['prefsStyleSet']) && $row_log['brewInfo'] == "") { if ($action != "print") { $entry_output .= "<span class='icon'><img src='" . $base_url . "images/exclamation.png' border='0' alt='Unconfirmed entry!' title='Unconfirmed entry! Click Edit to review and confirm the entry data.'></span>"; } else { $entry_output .= "Y"; } } else { if ($action != "print") { $entry_output .= yes_no($row_log['brewConfirmed'], $base_url); } else { $entry_output .= "Yes"; } } $entry_output .= "</td>"; if ($action == "print") { $entry_output .= "<td class='dataList bdr1B'>";
} ?> </tr> </thead> <tbody> <?php do { $brewer_info = brewer_info($row_log['brewBrewerID']); $brewer_info = explode("^", $brewer_info); $styleConvert = style_convert($row_log['brewCategorySort'], 1); $entry_style = $row_log['brewCategorySort'] . "-" . $row_log['brewSubCategory']; ?> <tr<?php if ($row_log['brewConfirmed'] == "0" && $action != "print") { echo " style='background-color: #ff9; border-top: 1px solid #F90; border-bottom: 1px solid #F90;'"; } elseif (check_special_ingredients($entry_style) && $row_log['brewInfo'] == "") { echo " style='background-color: #ff9; border-top: 1px solid #F90; border-bottom: 1px solid #F90;'"; } ?> > <input type="hidden" name="id[]" value="<?php echo $row_log['id']; ?> " /> <td class="dataList "> <?php if (NHC && $prefix == "final_") { echo sprintf("%06s", $row_log['id']); } else { echo sprintf("%04s", $row_log['id']); }
$updateSQL .= "brewConfirmed=" . GetSQLValueString($_POST['brewConfirmed'], "text"); $updateSQL .= " WHERE id ='" . $id . "'"; mysql_real_escape_string($updateSQL); mysql_select_db($database, $brewing); $result1 = mysql_query($updateSQL, $brewing) or die(mysql_error()); //echo $updateSQL."<br>"; // Build updade url if (check_special_ingredients($styleBreak, $_SESSION['prefsStyleSet']) && $_POST['brewInfo'] == "") { $updateGoTo = $base_url . "index.php?section=brew&go=entries&filter={$filter}&action=edit&id={$id}&msg=4"; } elseif ($section == "admin") { $updateGoTo = $base_url . "index.php?section=admin&go=entries&msg=2"; } else { $updateGoTo = $base_url . "index.php?section=list&msg=2"; } // Check if entry requires special ingredients or a classic style, if so, override the $updateGoTo variable with another and redirect if (check_special_ingredients($styleBreak, $_SESSION['prefsStyleSet'])) { if ($_POST['brewInfo'] == "") { $updateSQL = sprintf("UPDATE {$brewing_db_table} SET brewConfirmed='0' WHERE id=%s", GetSQLValueString($id, "text")); mysql_real_escape_string($updateSQL); mysql_select_db($database, $brewing); mysql_real_escape_string($updateSQL); $result1 = mysql_query($updateSQL, $brewing) or die(mysql_error()); } if ($section == "admin") { if ($_POST['brewInfo'] == "") { $updateGoTo = $base_url . "index.php?section=brew&go=entries&filter={$filter}&action=edit&id={$id}&msg=1-" . $styleReturn; } else { $updateGoTo = $base_url . "index.php?section=admin&go=entries&msg=2"; } } else { if ($_POST['brewInfo'] == "") {