header('Content-Disposition: attachment;filename="' . $filename . '"'); header("Pragma: no-cache"); header("Expires: 0"); echo $header . $html . $footer; exit; } } // END if ($section == "results") /* -------------- STAFF Exports -------------- */ if ($section == "staff") { include DB . 'judging_locations.db.php'; include DB . 'styles.db.php'; include DB . 'admin_common.db.php'; include DB . 'output_staff_points.db.php'; // Get total amount of paid and received entries $total_entries = total_paid_received("judging_scores", "default"); //$total_entries = 750; // Figure out whether BOS Judge Points are awarded or not // "BOS points may only be awarded if a competition has at least 30 entries in at least five beer and/or three mead/cider categories." $beer_styles[] = 0; $mead_styles[] = 0; $cider_styles[] = 0; do { if ($row_styles2['brewStyleType'] = "Cider") { $beer_syles[] = 0; $mead_styles[] = 0; $cider_styles[] = 1; } elseif ($row_styles2['brewStyleType'] = "Mead") { $beer_syles[] = 0; $mead_styles[] = 1; $cider_styles[] = 0;
<?php /** * Module: default.admin.php * Description: This module houses links to all administration functions. * */ include LIB . 'admin.lib.php'; include DB . 'admin_common.db.php'; include DB . 'judging_locations.db.php'; include DB . 'stewarding.db.php'; include DB . 'dropoff.db.php'; include DB . 'contacts.db.php'; include INCLUDES . 'form_check.inc.php'; if ($go == "default") { $totalRows_entry_count = total_paid_received("default", "default"); $entries_unconfirmed = $totalRows_entry_count - $totalRows_log_confirmed; } if ($check_judging_flights) { include PROCESS . 'process_judging_flight_check.inc.php'; } /* // Future use for granular BOS mats and pullsheets. function style_types_bos_print($file_name,$section,$go,$view) { require(CONfIG.'config.php'); $query_style_types = sprintf("SELECT id FROM %s", $prefix."style_types"); $style_types = mysql_query($query_style_types, $brewing) or die(mysql_error()); $row_style_types = mysql_fetch_assoc($style_types); $return = '';
<?php $totalRows_entry_count = total_paid_received($go, 0); if (NHC) { // Place NHC SQL calls below $query_package_count = sprintf("SELECT a.scorePlace, a.scoreEntry FROM %s a, %s b, %s c WHERE a.eid = b.id AND c.uid = b.brewBrewerID AND b.brewBrewerID = '%s'", $judging_scores_db_table, $brewing_db_table, $brewer_db_table, $_SESSION['user_id']); if ($prefix != "final_") { $query_package_count .= " AND a.scoreEntry >=25"; } $package_count = mysql_query($query_package_count, $brewing) or die(mysql_error()); $row_package_count = mysql_fetch_assoc($package_count); $totalRows_package_count = mysql_num_rows($package_count); //echo $totalRows_package_count; $query_admin_adv = sprintf("SELECT COUNT(*) AS 'count' FROM {$brewing_db_table} WHERE brewBrewerID = '%s' AND brewWinner='6'", $_SESSION['user_id']); $admin_adv = mysql_query($query_admin_adv, $brewing) or die(mysql_error()); $row_admin_adv = mysql_fetch_assoc($admin_adv); } else { if ($section == "list") { $query_log = sprintf("SELECT * FROM {$brewing_db_table} WHERE brewBrewerID = '%s' ORDER BY brewCategorySort, brewSubCategory, brewName {$dir}", $_SESSION['user_id']); $query_log_paid = sprintf("SELECT * FROM {$brewing_db_table} WHERE brewBrewerID = '%s' AND NOT brewPaid='1'", $_SESSION['user_id']); $query_log_confirmed = sprintf("SELECT * FROM {$brewing_db_table} WHERE brewBrewerID = '%s' AND brewConfirmed='1'", $_SESSION['user_id']); } elseif ($section == "pay") { if ($msg == "10") { // If redirected from PayPal, update the brewer table to mark entries as paid $a = explode('-', $view); foreach (array_unique($a) as $value) { $updateSQL = "UPDATE {$brewing_db_table} SET brewPaid='1' WHERE id='" . $value . "';"; //echo $updateSQL; mysql_select_db($database, $brewing); $Result1 = mysql_query($updateSQL, $brewing) or die(mysql_error()); }