0); } } } if (!$AdminAcct) { $BrewerKey=$Key; } else { $BrewerKey=($FullList ? 'full-list' : get_key($BrewerNo)); } $Scores=($Comp_Scores == 'Y' || ($AdminAcct && $Comp_Scores == 'A')); $Places=($Comp_Places == 'Y' || ($AdminAcct && $Comp_Places == 'A')); $OrderChk=array('csa', 'csd', 'ea', 'ed', 'pa', 'pd', 'sa','sd'); if ($CompEntry) { array_unshift($OrderChk, 'ca', 'cd'); } if ($FullList) { array_unshift($OrderChk, 'ba', 'bd'); } if (!$Places) { array_push($OrderChk, 'pa', 'pd'); } if (!$Scores) { array_push($OrderChk, 'sa', 'sd'); } if (!in_array($Order, $OrderChk)) { $Order=($FullList ? 'ba' : 'ea'); } if ($FullList) { $FullCnt=cntEntry(0, TRUE); $Size=(!array_key_exists('s', $_GET) || empty($_GET['s'])) ? 25 : only_digits($_GET['s'], 3); $Size=(is_numeric($Size) && $Size > 0) ? $Size : 25; $First=(!array_key_exists('f', $_GET) || empty($_GET['f'])) ? 1 : only_digits($_GET['f'], 4); $First=(is_numeric($First) && $First>0) ? $First : 1; if ($First > $FullCnt) { $First=max(1,intval($FullCnt / $Size) * $Size + 1); } } else { $FullCnt=$Size=$First=0; } if (!$AdminAcct || $BrewerNo != 0) { $EntryTot=cntEntry($BrewerNo, TRUE); $EntryCnt=cntEntry($BrewerNo); $PayCnt=cntPayment($BrewerNo); } else { $EntryTot=$EntryCnt=$PayCnt=0; } $hbc_name=hbc_name(); ?> '."\n"; echo ''."\n"; echo ''."\n"; } ?>
0 ? 'G ' : '').(($EntryCnt > 0 || $PayCnt > 0) ? 'P' : ''); if ($AdminAcct) { links_bar($LBar.'AL'.(!$FullList ? 'B' : ''), $Key, $BrewerNo); } else { links_bar('B'.$LBar, $Key); } ?> '."\n"; echo 'Entry List'.(!$FullList ? ' for Brewer # '.$BrewerNo : '')."\n"; echo ''."\n"; if (!$FullList) { echo '

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

'."\n"; if (get_ctrl('LIMITEB') == 'Y') { $LimitEBV=get_ctrl('LIMITEBV'); echo '

'."\n"; echo 'Entries Limited to '.$LimitEBV.' per Brewer'."\n"; if ($Comp_Stage == 'OPEN') { $EntryLeft=$LimitEBV - $EntryCnt; if ($EntryCnt > 0 && $EntryLeft > 0) { echo '  –  '.$EntryLeft.' Entr'.($EntryLeft == 1 ? 'y' : 'ies').' Remaining'."\n"; } } echo '

'."\n"; } } $query='select * from entry '.(!$FullList ? 'where brewer="'.$BrewerNo.'" ' : '').'order by '; switch ($Order) { case 'ba': $query.='brewer, entry'; break; case 'bd': $query.='brewer desc, entry desc'; break; case 'ca': $query.='comp_entry, entry'; break; case 'cd': $query.='comp_entry desc, entry desc'; break; case 'csa': $query.='type_seq, cat, sub_cat, entry'; break; case 'csd': $query.='type_seq desc, cat desc, sub_cat desc, entry'; break; case 'ea': $query.='entry'; break; case 'ed': $query.='entry desc'; break; case 'pa': $query.='place, entry'; break; case 'pd': $query.='place desc, entry'; break; case 'sa': $query.='score, entry'; break; case 'sd': $query.='score desc, entry'; break; default: $query.=($FullList ? 'brewer, ' : '').'entry'; } if ($FullList && !empty($Size) && $Size > 0) { $query.=' limit '.(($First > 1) ? ($First - 1).', ' : '').$Size; } echo ''."\n"; if (!$FullList) { if ($EntryTot == 0) { echo '

'."\n"; echo 'No Entries Found
'."\n"; echo '

'."\n"; } else { echo '

'."\n"; echo $EntryTot.' Entr'.($EntryTot == 1 ? 'y' : 'ies'); if ($EntryCnt < $EntryTot) { echo '  —  '.$EntryCnt.' Active'; } echo '
'."\n"; echo '

'."\n"; if ($Comp_Stage == 'POST' && ($Comp_Bundle == 'Y' || ($AdminAcct && $Comp_Bundle == 'A')) && is_file($hbc_name.'/zips/'.$BrewerKey.'.zip')) { echo '

'."\n"; echo 'Download Scoresheets'."\n"; echo '

'."\n"; } } } if ($FullList || $AdminAcct) { echo ''."\n"; echo ''."\n"; if ($FullList) { echo ''."\n"; } if ($AdminAcct) { echo ''."\n"; } echo ''."\n"; echo '
'."\n"; table_nav ('entry_list.php?k='.$Key.'&o='.$Order, $FullCnt, $First, $Size, 10, TRUE); echo ''."\n"; echo '
'."\n"; echo 'Entry Search: '."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo '
'."\n"; } if ($FullList || $EntryTot > 0) { echo ''."\n"; echo ''."\n"; if ($FullList) { echo ''."\n"; } echo ''."\n"; if ($CompEntry) { echo ''."\n"; } if ($Scores) { echo ''."\n"; } if ($Places) { echo ''."\n"; } echo ''."\n"; echo ''."\n"; if ($View && ($Comp_Sheets == 'Y' || ($AdminAcct && $Comp_Sheets == 'A'))) { echo ''."\n"; } if ($Comp_Stage != 'POST' && ($AdminAcct || ($Comp_Stage != 'CLOSED' && $EntryTot > 0))) { echo ''."\n"; } echo ''."\n"; } $entry_res=mysqli_query($db, $query); $Cnt=0; while ($entry_row=mysqli_fetch_assoc($entry_res)) { ++$Cnt; list($CatDesc, $SubCatDesc)=get_desc($entry_row['type_seq'], $entry_row['cat'], $entry_row['sub_cat']); $Removed=$entry_row['removed'] == 'Y'; $ClassTR=''; if ($Removed) { $ClassTR='removed'; } elseif ($IndicateNoShow && empty($entry_row['comp_entry'])) { $ClassTR='noshow'; } elseif ($Places && $entry_row['place'] >= 1 && $entry_row['place'] <= 4) { $ClassTR='place'.$entry_row['place']; } echo ''."\n"; if ($FullList) { echo ''."\n"; } echo ''."\n"; if ($CompEntry) { echo ''."\n"; } if ($Scores) { echo ''."\n"; } if ($Places) { echo ''."\n"; } echo ''."\n"; echo ''."\n"; if ($View && ($Comp_Sheets == 'Y' || ($AdminAcct && $Comp_Sheets == 'A'))) { echo ''."\n"; } if ($Comp_Stage != 'POST') { if ($EntryCnt > 0) { if ($AdminAcct || $Comp_Stage == 'OPEN') { echo ''."\n"; } echo ''."\n"; } if ($AdminAcct || !$Removed) { $RestoreDisabled=FALSE; } else { $RestoreDisabled=NoneLeft('E') || NoneLeft ('BE', $BrewerNo) || NoneLeft ('EC', $entry_row['type_seq'], $entry_row['cat']) || NoneLeft ('ES', $entry_row['type_seq'], $entry_row['cat'], $entry_row['sub_cat']); if (!$RestoreDisabled) { $Restrict=get_ctrl('RESTRICT'); if ($Restrict != 'N') { $query='select count(*) from entry where brewer="'.$BrewerNo.'" and cat="'.$entry_row['cat'].'"'.($Restrict == 'S' ? ' and sub_cat="'.$entry_row['sub_cat'].'"' : '').' and removed!="Y"'; $chk_res=mysqli_query($db, $query); $chk_row=mysqli_fetch_row($chk_res); $RestoreDisabled=($chk_row[0] > 0); } } } if ($AdminAcct || $Comp_Stage == 'OPEN') { echo ''."\n"; } } echo ''."\n"; } if ($Cnt != 0) { echo '
'."\n"; echo 'Brewer
Number
'."\n"; echo '
'."\n"; echo 'Entry
Number
'."\n"; echo '
'."\n"; echo 'Comp
Number
'."\n"; echo '
'."\n"; echo 'Score'."\n"; echo ''."\n"; echo 'Place'."\n"; echo ''."\n"; echo 'Style'."\n"; echo ''."\n"; echo 'Description'."\n"; echo ''."\n"; echo 'Score
Sheets'."\n"; echo '
0) ? 'colspan="3" ' : '').'class="cent">'."\n"; echo 'Action'."\n"; echo '
'."\n"; echo ''.$entry_row['brewer'].''."\n"; echo '0) { echo ' onmouseover="showEntry('.$Cnt.')" onmouseout="hideEntry()"'; } echo '>'."\n"; echo ''.$entry_row['entry'].''."\n"; echo ''."\n"; if ($Removed) { echo '—'."\n"; } else { echo (!empty($entry_row['comp_entry']) ? $entry_row['comp_entry'] : '—')."\n"; } echo ''."\n"; if ($Removed) { echo ' '."\n"; } else { echo (!empty($entry_row['score']) ? $entry_row['score'] : '—')."\n"; } echo ''."\n"; switch ($entry_row['place']) { case 1: echo '1st'; break; case 2: echo '2nd'; break; case 3: echo '3rd'; break; case 4: echo 'HM'; break; default: echo '—'; } echo "\n"; echo ''."\n"; if ($AdminAcct) { echo ''.disp_cat($entry_row['type_seq'], $entry_row['cat']).''.(!empty($entry_row['sub_cat']) ? ''.$entry_row['sub_cat'].'' : ''); } else { echo disp_cat($entry_row['type_seq'], $entry_row['cat'], $entry_row['sub_cat']).($AdminAcct ? '' : ''); } echo "\n"; echo ''."\n"; echo $CatDesc.(strlen($SubCatDesc) > 0 ? '
'.$SubCatDesc : '')."\n"; echo '
'."\n"; $ViewFile=$hbc_name.'/sheets/'.($FullList ? get_key($entry_row['brewer']) : $BrewerKey).'-'.$entry_row[($Comp_Renum == 'Y' ? 'comp_' : '').'entry'].'.pdf'; if (is_file($ViewFile)) { echo 'View'; } else { echo '—'; } echo "\n"; echo ''."\n"; if ($Removed) { echo 'Change'."\n"; } else { echo 'Change'."\n"; } echo ''."\n"; if ($Removed) { echo 'Print'."\n"; } else { echo 'Print'."\n"; } echo ''."\n"; if ($RestoreDisabled) { echo 'Restore'."\n"; } else { echo 'Restore' : 'r">Remove').''."\n"; } echo '
'."\n"; } if ($Cnt > 10 && ($FullList || $AdminAcct)) { echo ''."\n"; echo ''."\n"; if ($FullList) { echo ''."\n"; } if ($AdminAcct) { echo ''."\n"; } echo ''."\n"; echo '
'."\n"; table_nav ('entry_list.php?k='.$Key.'&o='.$Order, $FullCnt, $First, $Size, 10, TRUE); echo ''."\n"; echo '
'."\n"; echo 'Entry Search: '."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo '
'."\n"; } ?>
'."\n"; echo ''."\n"; echo ''."\n"; echo '
'; echo ''; echo '
'."\n"; echo ''."\n"; if ($Cnt > 0) { echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; } echo ''."\n"; echo ''."\n"; } ?>