$tag_val) { $entry[$tag]=$entry_row[$tag_val]; } $entry['TC']=$entry['TYPE_SEQ'].':'.$entry['CAT']; $entry['BASE_TC']=$entry['BASE_TYPE_SEQ'].':'.$entry['BASECAT']; if (!empty($entry['DESC'])) { if (cntStyleDesc($entry['TYPE_SEQ'], $entry['CAT'], $entry['SUBCAT'], $entry['DESC']) < 1) { $entry['CUSTOM']=$entry['DESC']; $entry['DESC']='Custom'; } else { $entry['CUSTOM']=''; } } $Stage=(empty($entry['BASECAT']) ? 3 : 4); } $ShowNote=!$Edit; } else { $entry=GetTags($Len); if (strpos($entry['TC'], ':') === FALSE) { $entry['TC']=0; $entry['TYPE_SEQ']=0; $entry['CAT']=0; } else { list($entry['TYPE_SEQ'], $entry['CAT'])=explode(':', $entry['TC']); } if (strpos($entry['BASE_TC'], ':') === FALSE) { $entry['BASE_TC']=0; $entry['BASE_TYPE_SEQ']=0; $entry['BASECAT']=0; } else { list($entry['BASE_TYPE_SEQ'], $entry['BASECAT'])=explode(':', $entry['BASE_TC']); } $ShowNote=($entry['SHOWNOTE'] == 'Y'); } if ($entry['TYPE_SEQ'] != 0 && $entry['CAT'] != 0) { $o_entry['TC']=$entry['TYPE_SEQ'].':'.$entry['CAT']; $o_entry['TYPE_SEQ']=$entry['TYPE_SEQ']; $o_entry['CAT']=$entry['CAT']; $o_entry['SUBCAT']=$entry['SUBCAT']; if ($entry['BASE_TYPE_SEQ'] != 0 && $entry ['BASECAT'] != 0) { $o_entry['BASE_TC']=$entry['BASE_TYPE_SEQ'].':'.$entry['BASECAT']; $o_entry['BASE_TYPE_SEQ']=$entry['BASE_TYPE_SEQ']; $o_entry['BASECAT']=$entry['BASECAT']; $o_entry['BASESUBCAT']=$entry['BASESUBCAT']; } else { $o_entry['BASE_TC']=$o_entry['BASE_TYPE_SEQ']=$o_entry['BASECAT']=$o_entry['BASESUBCAT']=''; } } else { $o_entry['TC']=$o_entry['TYPE_SEQ']=$o_entry['CAT']=$o_entry['SUBCAT']=''; $o_entry['BASE_TC']=$o_entry['BASE_TYPE_SEQ']=$o_entry['BASECAT']=$o_entry['BASESUBCAT']=''; } $e_entry=ErrTags($E_Map); $e_str=ErrStr($e_entry); $SubCnt=($Stage > 1) ? cntSubCat($entry['TYPE_SEQ'], $entry['CAT']) : 0; if ($Stage > 2) { $query='select * from style_sub where sg="'.$Comp_SG.'" and type_seq="'.$entry['TYPE_SEQ'].'"'; $query.=' and cat="'.$entry['CAT'].'" and sub_cat="'.$entry['SUBCAT'].'"'; $scat_res=mysqli_query($db, $query); $scat_row=mysqli_fetch_assoc($scat_res); } else { $scat_row=array(); $scat_row['note_num']=0; $scat_row['req_comment']='N'; $scat_row['req_base']='N'; $scat_row['req_strength']='N'; $scat_row['req_sweetness']='N'; $scat_row['req_carbonation']='N'; $scat_row['req_color']='N'; $scat_row['req_desc']='N'; } switch ($Stage) { case 2: if ($SubCnt > 1) { $Focus='SUBCAT'; break; } else { $entry['SUBCAT']=''; $o_entry['SUBCAT']=''; $Stage=3; } case 3: if ($scat_row['req_desc'] != 'N') { $Focus=($entry['DESC'] == 'Custom' ? 'CUSTOM' : 'DESC'); } else { $Focus='NAME'; } break; case 4: $Focus='NAME'; break; default: $Focus='TC'; } $DisplayDesc=(array_key_exists('DESC', $entry) && $entry['DESC'] == 'Custom' ? 'table-row' : 'none'); $AllowComment=$CtrlComment == 'A' || ($CtrlComment == 'R' && $scat_row['req_comment'] != 'N'); ?>
0 ? 'EP' : '').($Edit ? 'I' : ''), $Key, $BrewerNo, $Entry); ?>

'."\n"; echo ($brew_row['brewer_type'] != 'G' ? safe($brew_row['fname']).' '.safe($brew_row['lname']) : safe($brew_row['groupname'])).'
'."\n"; ?>

'."\n"; ?> 0 && $e_entry['INSERT']) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } if ($Stage > 0 && $e_entry['CAT_1']) { $query='select * from entry where brewer="'.$BrewerNo.'" and type_seq="'.$entry['TYPE_SEQ'].'"'; $query.=' and cat="'.$entry['CAT'].'" and removed!="Y"'; $res=mysqli_query($db, $query); $row=mysqli_fetch_assoc($res); echo ''."\n"; echo ''."\n"; echo ''."\n"; } if ($Stage > 0 && $e_entry['SUBCAT_1']) { $query='select * from entry where brewer="'.$BrewerNo.'" and type_seq="'.$entry['TYPE_SEQ'].'"'; $query.=' and cat="'.$entry['CAT'].'" and sub_cat="'.$entry['SUBCAT'].'" and removed!="Y"'; $res=mysqli_query($db, $query); $row=mysqli_fetch_assoc($res); echo ''."\n"; echo ''."\n"; echo ''."\n"; } ?> 0 && $e_entry['CAT_2']) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } if ($Stage > 1) { $query='select * from style where sg="'.$Comp_SG.'" and cat="'.$entry['CAT'].'"'; $cat_res=mysqli_query($db, $query); $cat_row=mysqli_fetch_assoc($cat_res); if ($SubCnt == 0) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } else { // Sub-Category echo ''."\n"; echo ''."\n"; echo ''."\n"; if ($e_entry['SUBCAT_2']) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } } // Stage 3 if ($Stage > 2) { // Style Description if ($scat_row['req_desc'] != 'N') { $SD_Cnt=cntStyleDesc($entry['TYPE_SEQ'], $entry['CAT'], $entry['SUBCAT']); if ($SD_Cnt > 0) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } echo ''."\n"; echo ''."\n"; echo ''."\n"; } if ($e_entry['CUSTOM_R']) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } // Brew Name echo ''."\n"; echo ''."\n"; echo ''."\n"; // Sub-Category Note (if present) if ($scat_row['note_num'] > 0) { $query='select * from style_note where sg="'.$Comp_SG.'" and note_num="'.$scat_row['note_num'].'"'; $note_res=mysqli_query($db, $query); $note_row=mysqli_fetch_assoc($note_res); echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; } // Comment if ($AllowComment) { echo ''."\n"; echo ''."\n"; echo ''."\n"; if ($e_entry['COMMENT_1']) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } else { echo ''."\n"; } // Base Style if ($scat_row['req_base'] != 'N') { echo ''."\n"; echo ''."\n"; echo ''."\n"; if (ErrChk($e_str, 'BASECAT')) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } else { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } else { echo ''."\n"; echo ''."\n"; echo ''."\n"; } if ($Stage > 3) { // Base Sub Category if ($scat_row['req_base'] != 'N') { echo ''."\n"; echo ''."\n"; echo ''."\n"; if (ErrChk($e_str, 'BASESUBCAT')) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } else { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } else { echo ''."\n"; echo ''."\n"; echo ''."\n"; } if ($Stage > 2) { // Strength if ($scat_row['req_strength'] != 'N') { echo ''."\n"; echo ''."\n"; echo ''."\n"; if ($e_entry['STRENGTH_1']) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } else { echo ''."\n"; echo ''."\n"; echo ''."\n"; } // Sweetness if ($scat_row['req_sweetness'] != 'N') { echo ''."\n"; echo ''."\n"; echo ''."\n"; if ($e_entry['SWEETNESS_1']) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } else { echo ''."\n"; echo ''."\n"; echo ''."\n"; } // Carbonation if ($scat_row['req_carbonation'] != 'N') { echo ''."\n"; echo ''."\n"; echo ''."\n"; if ($e_entry['CARBONATION_1']) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } else { echo ''."\n"; echo ''."\n"; echo ''."\n"; } // Color if ($scat_row['req_color'] != 'N') { echo ''."\n"; echo ''."\n"; echo ''."\n"; if ($e_entry['COLOR_1']) { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } else { echo ''."\n"; echo ''."\n"; echo ''."\n"; } } else { echo ''."\n"; echo ''."\n"; echo ''."\n"; } $Continue=($Stage > 2 && $scat_row['req_base'] != 'Y') || ($Stage > 3); ?>
Required fields are indicated in BOLD
'."\n"; echo 'Entry Addition Failed - Please try again.
'."\n"; echo '
'."\n"; echo 'Only One Entry allowed per Category
'."\n"; echo '      Entry '.$row['entry'].' is in this Category'."\n"; echo '
'."\n"; echo 'Only One Entry allowed per Category/Sub-Category
'."\n"; echo '      Entry '.$row['entry'].' is in this Category/Sub-Category'."\n"; echo '
Category:  
'."\n"; echo 'Invalid Category - Please select Valid Category
'."\n"; echo '
'."\n"; echo ''."\n"; echo 'Sub-Category:  '."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo 'Invalid SubCategory - Please select Valid SubCategory
'."\n"; echo '
'."\n"; echo ($scat_row['req_desc'] == 'Y' ? '' : '')."\n"; echo 'Style Description:  '."\n"; echo ($scat_row['req_desc'] == 'Y' ? '' : '')."\n"; echo ''."\n"; echo '
'."\n"; echo ($scat_row['req_desc'] == 'Y' ? ''."\n" : ''); echo 'Custom Style Description:  '."\n"; echo ($scat_row['req_desc'] == 'Y' ? ''."\n" : ''); echo ''."\n"; echo '
'."\n"; echo 'Please provide Style Description, when specifying Custom Style Description'."\n"; echo '
'."\n"; echo 'Brew Name:  '."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo 'Entry Note:'."\n"; echo ''."\n"; echo ' '."\n"; echo ''."\n"; echo '(Hide Note)'."\n"; echo '
'."\n"; echo $note_row['note']."\n"; echo '
'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo 'Entry Note:'."\n"; echo ''."\n"; echo ' '."\n"; echo ''."\n"; echo '(Show Note)'."\n"; echo '
'."\n"; echo '
'."\n"; $CommLeft=512 - strlen($entry['COMMENT']); echo ($scat_row['req_comment'] == 'Y' ? '' : '')."\n"; echo 'Entry Comment:'."\n"; echo ($scat_row['req_comment'] == 'Y' ? '' : '')."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo '
Comments '.($scat_row['req_comment'] == 'N' ? 'may' : 'will').' be shown to the Judges. Please do not include any personal information.
'."\n"; echo ''."\n"; echo '
'."\n"; echo 'Comments are required for this Style/Sub-Category
'."\n"; echo '
'."\n"; echo ($scat_row['req_base'] == 'Y' ? '' : 'Specifying Base Style is optional for this style.
')."\n"; echo 'Base Style Category:  '."\n"; echo ($scat_row['req_base'] == 'Y' ? '
' : '')."\n"; echo ''."\n"; echo '
'."\n"; if ($e_entry['BASECAT_2'] ) { echo 'Invalid Base Style Category - Please select Valid Base Category
'."\n"; } if ($e_entry['BASECAT_R'] ) { echo 'Base Style Category is Required - Please select Valid Base Category
'."\n"; } echo '
'."\n"; echo ($scat_row['req_base'] == 'Y' ? '' : '')."\n"; echo 'Base Style Sub-Catgory:  '."\n"; echo ($scat_row['req_base'] == 'Y' ? '' : '')."\n"; echo ''."\n"; echo '
'."\n"; if ($e_entry['BASESUBCAT_2'] ) { echo 'Invalid Base Style Sub-Category - Please select Valid Base Sub-Category
'."\n"; } if ($e_entry['BASESUBCAT_R'] ) { echo 'Base Base Style Sub-Category is Required - Please select Valid Base Sub-Category
'."\n"; } echo '
'."\n"; echo ''."\n"; echo 'Strength:  '."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo 'Strength is required for this Style/Sub-Category
'."\n"; echo '
'."\n"; echo ''."\n"; echo 'Sweetness:  '."\n"; echo ''."\n"; if (array_key_exists('SWEETNESS', $entry) && !empty($entry['SWEETNESS'])) { $use_sweetness=$entry['SWEETNESS']; } else { $use_sweetness=(count(valid_sweetness($scat_row['req_sweetness'], $scat_row['type_seq'])) == 1 ? $scat_row['req_sweetness'] : ''); } echo ''."\n"; echo '
'."\n"; echo 'Sweetness is required for this Style/Sub-Category
'."\n"; echo '
'."\n"; echo ''."\n"; echo 'Carbonation:  '."\n"; echo ''."\n"; if (array_key_exists('CARBONATION', $entry) && !empty($entry['CARBONATION'])) { $use_carbonation=$entry['CARBONATION']; } else { $use_carbonation=(count(valid_carbonation($scat_row['req_carbonation'])) == 1 ? $scat_row['req_carbonation'] : ''); } echo ''."\n"; echo '
'."\n"; echo 'Carbonation is required for this Style/Sub-Category
'."\n"; echo '
'."\n"; echo ''."\n"; echo 'Color:  '."\n"; echo ''."\n"; if (array_key_exists('COLOR', $entry) && !empty($entry['COLOR'])) { $use_color=$entry['COLOR']; } else { $use_color=(count(valid_color($scat_row['req_color'])) == 1 ? $scat_row['req_color'] : ''); } echo ''."\n"; echo '
'."\n"; echo 'Color is required for this Style/Sub-Category
'."\n"; echo '
'."\n"; echo ''."\n"; echo ''."\n"; } else { echo ''."\n"; } ?>
2 && $scat_row['req_base'] != 'Y') || ($Stage > 3)) ? '' : ' disabled="disabled"'); ?> /> '."\n"; echo ''."\n"; echo '
'."\n"; ?>