Minor additions: yeast info popup for bb/recipe display; narrow recipe and bb lists by style with a click on a certain style; fixed some inconsistencies in the db_connect_log.inc.php file.

This commit is contained in:
Geoff Humphrey
2010-01-05 21:44:17 +00:00
parent 279b5ea8cb
commit dec14835eb
6 changed files with 1710 additions and 1677 deletions

View File

@@ -1,4 +1,4 @@
<div id="headerContentAdmin">Yeast</div> <div id="headerContentAdmin"><div id="help"><a href="../sections/reference.inc.php?section=yeast&source=log&KeepThis=true&TB_iframe=true&height=450&width=800" title="Yeast Reference" class="thickbox"><img src="<?php echo $imageSrc; ?>information.png" align="absmiddle" border="0" alt="Reference" /></a></div>Yeast</div>
<table> <table>
<?php if ((($action == "edit") || ($action=="import") || ($action == "importRecipe") || ($action=="reuse")) && ($row_log['brewYeastProfile'] == "")) { ?> <?php if ((($action == "edit") || ($action=="import") || ($action == "importRecipe") || ($action=="reuse")) && ($row_log['brewYeastProfile'] == "")) { ?>
<?php if ($row_log['brewYeast'] != "") { ?> <?php if ($row_log['brewYeast'] != "") { ?>

View File

@@ -60,6 +60,7 @@ $query_log = sprintf("SELECT * FROM brewing ORDER BY %s %s", $sort, $dir);
$log = mysql_query($query_log, $brewing) or die(mysql_error()); $log = mysql_query($query_log, $brewing) or die(mysql_error());
$row_log = mysql_fetch_assoc($log); $row_log = mysql_fetch_assoc($log);
$totalRows_log = mysql_num_rows($log); $totalRows_log = mysql_num_rows($log);
if ($style != "all") $view == "all";
} }
if (($row_pref['mode'] == "2") && ($filter != "all")) { if (($row_pref['mode'] == "2") && ($filter != "all")) {
@@ -78,7 +79,6 @@ $query_log = sprintf("SELECT * FROM brewing WHERE id = '%s'", $id);
$log = mysql_query($query_log, $brewing) or die(mysql_error()); $log = mysql_query($query_log, $brewing) or die(mysql_error());
$row_log = mysql_fetch_assoc($log); $row_log = mysql_fetch_assoc($log);
$totalRows_log = mysql_num_rows($log); $totalRows_log = mysql_num_rows($log);
} }
@@ -91,27 +91,35 @@ elseif ($view == "all") $display = 9999999;
$pg = (isset($_REQUEST['pg']) && ctype_digit($_REQUEST['pg'])) ? $_REQUEST['pg'] : 1; $pg = (isset($_REQUEST['pg']) && ctype_digit($_REQUEST['pg'])) ? $_REQUEST['pg'] : 1;
$start = $display * $pg - $display; $start = $display * $pg - $display;
if ($row_pref['mode'] == "1") { if (($row_pref['mode'] == "1") || (($row_pref['mode'] == "2") && ($filter == "all"))) {
mysql_select_db($database_brewing, $brewing); mysql_select_db($database_brewing, $brewing);
$result = mysql_query("SELECT count(*) FROM brewing"); //$result = mysql_query("SELECT count(*) FROM brewing");
$query_result = "SELECT count(*) FROM brewing";
if ($style != "all") $query_result .= " WHERE brewStyle='$style'";
$result = mysql_query($query_result, $brewing) or die(mysql_error());
$total = mysql_result($result, 0); $total = mysql_result($result, 0);
$log = mysql_query("SELECT * FROM brewing ORDER BY $sort $dir LIMIT $start, $display") or die(mysql_error()); //$log = mysql_query("SELECT * FROM brewing ORDER BY $sort $dir LIMIT $start, $display") or die(mysql_error());
$row_log = mysql_fetch_assoc($log);
}
if (($row_pref['mode'] == "2") && ($filter == "all")) { $query_log = "SELECT * FROM brewing";
mysql_select_db($database_brewing, $brewing); if ($style != "all") $query_log .= " WHERE brewStyle='$style'";
$result = mysql_query("SELECT count(*) FROM brewing"); $query_log .= " ORDER BY $sort $dir LIMIT $start, $display";
$total = mysql_result($result, 0); $log = mysql_query($query_log, $brewing) or die(mysql_error());
$log = mysql_query("SELECT * FROM brewing ORDER BY $sort $dir LIMIT $start, $display") or die(mysql_error());
$row_log = mysql_fetch_assoc($log); $row_log = mysql_fetch_assoc($log);
} }
if (($row_pref['mode'] == "2") && ($filter != "all")) { if (($row_pref['mode'] == "2") && ($filter != "all")) {
mysql_select_db($database_brewing, $brewing); mysql_select_db($database_brewing, $brewing);
$result = mysql_query("SELECT count(*) FROM brewing WHERE brewBrewerID = '".$filter."'"); //$result = mysql_query("SELECT count(*) FROM brewing WHERE brewBrewerID = '".$filter."'");
$query_result = "SELECT count(*) FROM brewing WHERE brewBrewerID='$filter'";
if ($style != "all") $query_result .= " WHERE brewStyle='$style'";
$result = mysql_query($query_result, $brewing) or die(mysql_error());
$total = mysql_result($result, 0); $total = mysql_result($result, 0);
$log = mysql_query("SELECT * FROM brewing WHERE brewBrewerID = '".$filter."' ORDER BY $sort $dir LIMIT $start, $display") or die(mysql_error());
//$log = mysql_query("SELECT * FROM brewing WHERE brewBrewerID = '".$filter."' ORDER BY $sort $dir LIMIT $start, $display") or die(mysql_error());
$query_log = "SELECT * FROM brewing WHERE brewBrewerID='$filter'";
if ($style != "all") $query_log .= " WHERE brewStyle='$style'";
$query_log .= " ORDER BY $sort $dir LIMIT $start, $display";
$log = mysql_query($query_log, $brewing) or die(mysql_error());
$row_log = mysql_fetch_assoc($log); $row_log = mysql_fetch_assoc($log);
} }
@@ -173,7 +181,7 @@ if ($row_pref['mode'] == "1") {
mysql_select_db($database_brewing, $brewing); mysql_select_db($database_brewing, $brewing);
$result = mysql_query("SELECT count(*) FROM brewing"); $result = mysql_query("SELECT count(*) FROM brewing");
$total = mysql_result($result, 0); $total = mysql_result($result, 0);
$list = mysql_query("SELECT * FROM brewing ORDER BY brewDate DESC LIMIT $start, $display"); $list = mysql_query("SELECT * FROM brewing WHERE brewArchive='' OR brewArchive='N' ORDER BY brewDate DESC LIMIT $start, $display");
$row_list = mysql_fetch_assoc($list); $row_list = mysql_fetch_assoc($list);
} }
@@ -181,7 +189,7 @@ if (($row_pref['mode'] == "2") && ($filter == "all")) {
mysql_select_db($database_brewing, $brewing); mysql_select_db($database_brewing, $brewing);
$result = mysql_query("SELECT count(*) FROM brewing"); $result = mysql_query("SELECT count(*) FROM brewing");
$total = mysql_result($result, 0); $total = mysql_result($result, 0);
$list = mysql_query("SELECT * FROM brewing ORDER BY brewDate DESC LIMIT $start, $display"); $list = mysql_query("SELECT * FROM brewing WHERE brewArchive='' OR brewArchive='N' ORDER BY brewDate DESC LIMIT $start, $display");
$row_list = mysql_fetch_assoc($list); $row_list = mysql_fetch_assoc($list);
} }
@@ -287,19 +295,31 @@ $pg = (isset($_REQUEST['pg']) && ctype_digit($_REQUEST['pg'])) ? $_REQUEST['pg'
$start = $display * $pg - $display; $start = $display * $pg - $display;
if ($row_pref['mode'] == "1") { if ($row_pref['mode'] == "1") {
mysql_select_db($database_brewing, $brewing); mysql_select_db($database_brewing, $brewing);
$result = mysql_query("SELECT count(*) FROM recipes"); $query_result = "SELECT count(*) FROM recipes";
if ($style != "all") $query_result .= " WHERE brewStyle='$style'";
$result = mysql_query($query_result, $brewing) or die(mysql_error());
$total = mysql_result($result, 0); $total = mysql_result($result, 0);
$recipeList = mysql_query("SELECT * FROM recipes ORDER BY $sort $dir LIMIT $start, $display") or die(mysql_error()); //$recipeList = mysql_query("SELECT * FROM recipes ORDER BY $sort $dir LIMIT $start, $display") or die(mysql_error());
$query_recipeList = "SELECT * FROM recipes";
if ($style != "all") $query_recipeList.= " WHERE brewStyle='$style'";
$query_recipeList .= " ORDER BY $sort $dir LIMIT $start, $display";
$recipeList = mysql_query($query_recipeList, $brewing) or die(mysql_error());
$row_recipeList = mysql_fetch_assoc($recipeList); $row_recipeList = mysql_fetch_assoc($recipeList);
} }
if (($row_pref['mode'] == "2") && ($filter == "all")) { if (($row_pref['mode'] == "2") && ($filter == "all")) {
mysql_select_db($database_brewing, $brewing); mysql_select_db($database_brewing, $brewing);
$result = mysql_query("SELECT count(*) FROM recipes"); $query_result = "SELECT count(*) FROM recipes";
if ($style != "all") $query_result .= " WHERE brewStyle='$style'";
$result = mysql_query($query_result, $brewing) or die(mysql_error());
$total = mysql_result($result, 0); $total = mysql_result($result, 0);
$recipeList = mysql_query("SELECT * FROM recipes ORDER BY $sort $dir LIMIT $start, $display") or die(mysql_error()); $query_recipeList = "SELECT * FROM recipes";
if ($style != "all") $query_recipeList.= " WHERE brewStyle='$style'";
$query_recipeList .= " ORDER BY $sort $dir LIMIT $start, $display";
$recipeList = mysql_query($query_recipeList, $brewing) or die(mysql_error());
$row_recipeList = mysql_fetch_assoc($recipeList); $row_recipeList = mysql_fetch_assoc($recipeList);
} }
@@ -581,12 +601,12 @@ $totalRows_members = mysql_num_rows($members);
// Status - single user // Status - single user
if ($row_pref['mode'] == "1") { if ($row_pref['mode'] == "1") {
mysql_select_db($database_brewing, $brewing); mysql_select_db($database_brewing, $brewing);
$countStatus = "SELECT * FROM brewing WHERE brewStatus NOT LIKE '' ORDER BY brewStatus,brewName ASC"; $countStatus = "SELECT * FROM brewing WHERE brewStatus NOT LIKE '' AND brewArchive NOT LIKE 'Y' ORDER BY brewStatus,brewName ASC";
$query_count = mysql_query($countStatus, $brewing) or die(mysql_error()); $query_count = mysql_query($countStatus, $brewing) or die(mysql_error());
$total_status = mysql_num_rows($query_count); $total_status = mysql_num_rows($query_count);
mysql_select_db($database_brewing, $brewing); mysql_select_db($database_brewing, $brewing);
$query_status = "SELECT * FROM brewing WHERE brewStatus NOT LIKE '' ORDER BY brewStatus,brewName ASC"; $query_status = "SELECT * FROM brewing WHERE brewStatus NOT LIKE '' AND brewArchive NOT LIKE 'Y' ORDER BY brewStatus,brewName ASC";
if ($total_status > 25) $query_status .= " LIMIT 25"; if ($total_status > 25) $query_status .= " LIMIT 25";
$status = mysql_query($query_status, $brewing) or die(mysql_error()); $status = mysql_query($query_status, $brewing) or die(mysql_error());
$row_status = mysql_fetch_assoc($status); $row_status = mysql_fetch_assoc($status);
@@ -597,12 +617,12 @@ $totalRows_status = mysql_num_rows($status);
// Status - multi-user // Status - multi-user
if ($row_pref['mode'] == "2") { if ($row_pref['mode'] == "2") {
mysql_select_db($database_brewing, $brewing); mysql_select_db($database_brewing, $brewing);
$countStatus = sprintf("SELECT * FROM brewing WHERE brewBrewerID = '%s' AND brewStatus NOT LIKE '%s' ORDER BY brewStatus,brewName ASC", $filter, ""); $countStatus = sprintf("SELECT * FROM brewing WHERE brewBrewerID = '%s' AND brewStatus NOT LIKE '%s' AND brewArchive NOT LIKE '%s' ORDER BY brewStatus,brewName ASC", $filter, "", "Y");
$query_count = mysql_query($countStatus, $brewing) or die(mysql_error()); $query_count = mysql_query($countStatus, $brewing) or die(mysql_error());
$total_status = mysql_num_rows($query_count); $total_status = mysql_num_rows($query_count);
mysql_select_db($database_brewing, $brewing); mysql_select_db($database_brewing, $brewing);
if ($page == "profile") $query_status = sprintf("SELECT * FROM brewing WHERE brewBrewerID = '%s' AND brewStatus NOT LIKE '%s' ORDER BY brewStatus,brewName ASC", $filter, ""); if ($page == "profile") $query_status = sprintf("SELECT * FROM brewing WHERE brewBrewerID = '%s' AND brewStatus NOT LIKE '%s' AND brewArchive NOT LIKE '%s' ORDER BY brewStatus,brewName ASC", $filter, "", "Y");
else $query_status = sprintf("SELECT * FROM brewing WHERE brewBrewerID = '%s' AND brewStatus NOT LIKE '%s' ORDER BY brewStatus,brewName,brewDate DESC", $row_log['brewBrewerID'], ""); else $query_status = sprintf("SELECT * FROM brewing WHERE brewBrewerID = '%s' AND brewStatus NOT LIKE '%s' ORDER BY brewStatus,brewName,brewDate DESC", $row_log['brewBrewerID'], "");
if ($total_status > 25) $query_status .= " LIMIT 25"; if ($total_status > 25) $query_status .= " LIMIT 25";
$status = mysql_query($query_status, $brewing) or die(mysql_error()); $status = mysql_query($query_status, $brewing) or die(mysql_error());

View File

@@ -19,6 +19,11 @@ if (isset($_GET['filter'])) {
$filter = (get_magic_quotes_gpc()) ? $_GET['filter'] : addslashes($_GET['filter']); $filter = (get_magic_quotes_gpc()) ? $_GET['filter'] : addslashes($_GET['filter']);
} }
$style = "all";
if (isset($_GET['style'])) {
$style = (get_magic_quotes_gpc()) ? $_GET['style'] : addslashes($_GET['style']);
}
$section = "default"; $section = "default";
if (isset($_GET['section'])) { if (isset($_GET['section'])) {
$section = (get_magic_quotes_gpc()) ? $_GET['section'] : addslashes($_GET['section']); $section = (get_magic_quotes_gpc()) ? $_GET['section'] : addslashes($_GET['section']);

View File

@@ -1,8 +1,10 @@
<?php mysql_select_db($database_brewing, $brewing); <?php /*
$query_styles = sprintf("SELECT * FROM styles WHERE brewStyle='%s'", $row_log['brewStyle']); mysql_select_db($database_brewing, $brewing);
$styles = mysql_query($query_styles, $brewing) or die(mysql_error()); $query_styles_filter = sprintf("SELECT * FROM styles ORDER BY brewStyleGroup,brewStyleNum);
$row_styles = mysql_fetch_assoc($styles); $styles_filter = mysql_query($query_styles_filter, $brewing) or die(mysql_error());
$totalRows_styles = mysql_num_rows($styles); $row_styles_filter = mysql_fetch_assoc($styles_filter);
$totalRows_styles_filter = mysql_num_rows($styles_filter);
*/
?> ?>
<div id="contentWide"> <div id="contentWide">
<?php <?php
@@ -20,21 +22,24 @@
<?php if ($totalRows_featured > 0) { if (($row_pref['mode'] == "1") || (($row_pref['mode'] == "2") && ($filter == "all"))) { ?><div id="headerContentAdmin">All <?php echo $dbName; ?></div><?php } } ?> <?php if ($totalRows_featured > 0) { if (($row_pref['mode'] == "1") || (($row_pref['mode'] == "2") && ($filter == "all"))) { ?><div id="headerContentAdmin">All <?php echo $dbName; ?></div><?php } } ?>
<table class="dataTable"> <table class="dataTable">
<tr> <tr>
<td colspan="9"><div id="paginate"><?php echo $total." ".$row_pref['menuBrewBlogs']." Total"; if ($total > $display) echo "&nbsp;&nbsp;&nbsp;&#8226"; if ($view == "all") echo "&nbsp;&nbsp;&nbsp;&#8226;&nbsp;&nbsp;&nbsp;"; if ($total > $display) { echo "&nbsp;&nbsp;&nbsp;"; paginate($display, $pg, $total); if ($view == "limited") { ?>&nbsp;&nbsp;&nbsp;&#8226&nbsp;&nbsp;&nbsp;<a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&view=all">Entire List of <?php if (($row_pref['mode'] == "2") && ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuBrewBlogs']; ?></a><?php } } if ($view == "all") { ?><a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&view=limited">Limited List of <?php if (($row_pref['mode'] == "2")&& ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuBrewBlogs']; ?></a><?php } ?></div></td> <?php if ($style != "all") { ?>
<td><div id="breadcrumb">Filter: <?php echo $row_log['brewStyle'];?> | <a href="<?php echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']."?page=".$page."&filter=".$filter."&style=all&sort=".$sort."&dir=".$dir."&view=".$view."&pg=".$pg; ?>">See all styles</a></div></td>
<?php } ?>
<td><div id="paginate"><?php echo $total." ".$row_pref['menuBrewBlogs']." Total"; if ($total > $display) echo "&nbsp;&nbsp;&nbsp;&#8226"; if ($view == "all") echo "&nbsp;&nbsp;&nbsp;&#8226;&nbsp;&nbsp;&nbsp;"; if ($total > $display) { echo "&nbsp;&nbsp;&nbsp;"; paginate($display, $pg, $total); if ($view == "limited") { ?>&nbsp;&nbsp;&nbsp;&#8226&nbsp;&nbsp;&nbsp;<a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=all">Entire List of <?php if (($row_pref['mode'] == "2") && ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuBrewBlogs']; ?></a><?php } } if (($view == "all") && ($total < $display)) { ?><a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=limited">Limited List of <?php if (($row_pref['mode'] == "2")&& ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuBrewBlogs']; ?></a><?php } ?></div></td>
</tr> </tr>
</table> </table>
<table class="dataTable"> <table class="dataTable">
<tr> <tr>
<?php if (isset($_SESSION["loginUsername"])) echo "<td class=\"dataList\" width=\"1%\"><img src=\"".$imageSrc."pencil.png\" border=\"0\" align=\"absmiddle\"></td>"; ?> <?php if (isset($_SESSION["loginUsername"])) echo "<td class=\"dataList\" width=\"1%\"><img src=\"".$imageSrc."pencil.png\" border=\"0\" align=\"absmiddle\"></td>"; ?>
<?php if (!checkmobile()) { ?><td class="dataHeadingList" width="1%">XML</td><?php } ?> <?php if (!checkmobile()) { ?><td class="dataHeadingList" width="1%">XML</td><?php } ?>
<td class="dataHeadingList" width="25%"><?php echo $dbName; ?><?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewName&dir=ASC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewName&dir=DESC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td> <td class="dataHeadingList" width="25%"><?php echo $dbName; ?><?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewName&dir=ASC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewName&dir=DESC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td>
<td class="dataHeadingList" width="10%">Date<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewDate&dir=ASC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewDate&dir=DESC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td> <td class="dataHeadingList" width="10%">Date<?php if (!checkmobile()) { ?>&nbsp;<a href="<?php echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; ?>?page=<?php echo $page; ?>&sort=brewDate&dir=ASC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewDate&dir=DESC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td>
<td class="dataHeadingList" width="25%">Style<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewStyle&dir=ASC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewStyle&dir=DESC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td> <td class="dataHeadingList" width="25%">Style<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewStyle&dir=ASC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewStyle&dir=DESC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td>
<td class="dataHeadingList" width="10%">Method<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewMethod&dir=ASC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewMethod&dir=DESC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td> <td class="dataHeadingList" width="10%">Method<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewMethod&dir=ASC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewMethod&dir=DESC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td>
<td class="dataHeadingList" width="10%"><?php if ($row_pref['measColor'] == "EBC") echo "EBC"; else echo "SRM"; ?>/<?php if ($row_pref['measColor'] == "EBC") echo "SRM"; else echo "EBC"; if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewLovibond&dir=ASC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewLovibond&dir=DESC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td> <td class="dataHeadingList" width="10%"><?php if ($row_pref['measColor'] == "EBC") echo "EBC"; else echo "SRM"; ?>/<?php if ($row_pref['measColor'] == "EBC") echo "SRM"; else echo "EBC"; if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewLovibond&dir=ASC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewLovibond&dir=DESC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td>
<td class="dataHeadingList" width="5%">IBU<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewBitterness&dir=ASC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewBitterness&dir=DESC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td> <td class="dataHeadingList" width="5%">IBU<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewBitterness&dir=ASC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewBitterness&dir=DESC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td>
<td class="dataHeadingList" width="5%">ABV<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewOG&dir=ASC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewOG&dir=DESC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td> <td class="dataHeadingList" width="5%">ABV<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewOG&dir=ASC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewOG&dir=DESC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td>
<?php if (($row_pref['mode'] == "2") && ($filter == "all")) { ?><td class="dataHeadingList">Contributor<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewBrewerID&dir=ASC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewBrewerID&dir=DESC&filter=<?php echo $filter; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td><?php } ?> <?php if (($row_pref['mode'] == "2") && ($filter == "all")) { ?><td class="dataHeadingList">Contributor<?php if (!checkmobile()) { ?>&nbsp;<a href="?page=<?php echo $page; ?>&sort=brewBrewerID&dir=ASC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_up.gif" border="0" alt="Sort Ascending"></a><a href="?page=<?php echo $page; ?>&sort=brewBrewerID&dir=DESC&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=<?php echo $view; ?>"><img src="<?php echo $imageSrc; ?>sort_down.gif" border="0" alt="Sort Descending"></a><?php } ?></td><?php } ?>
<td class="dataHeadingList center" width="1%"><img src="<?php echo $imageSrc; ?>medal_gold_3.png" border="0" alt="Awards/Competition Entires" align="baseline"></td> <td class="dataHeadingList center" width="1%"><img src="<?php echo $imageSrc; ?>medal_gold_3.png" border="0" alt="Awards/Competition Entires" align="baseline"></td>
</tr> </tr>
<?php do { if ($row_log['brewArchive'] != "Y") { ?> <?php do { if ($row_log['brewArchive'] != "Y") { ?>
@@ -67,7 +72,7 @@
<td class="dataList"><a href="index.php?page=<?php echo $destination; ?>&filter=<?php echo $row_log['brewBrewerID']; ?>&id=<?php echo $row_log['id']; ?>"><?php echo $row_log['brewName']; ?></a></td> <td class="dataList"><a href="index.php?page=<?php echo $destination; ?>&filter=<?php echo $row_log['brewBrewerID']; ?>&id=<?php echo $row_log['id']; ?>"><?php echo $row_log['brewName']; ?></a></td>
<td class="dataList" nowrap="nowrap"><?php $date = $row_log['brewDate']; $realdate = dateconvert2($date,3); echo $realdate; ?></td> <td class="dataList" nowrap="nowrap"><?php $date = $row_log['brewDate']; $realdate = dateconvert2($date,3); echo $realdate; ?></td>
<td class="dataList"> <td class="dataList">
<div id="moreInfo"><?php if (($totalRows_styles > 0) && (!checkmobile())) { ?><a href="#"><?php } echo $row_log['brewStyle']; if (($totalRows_styles > 0) && (!checkmobile())) { ?> <div id="moreInfo"><?php if (($totalRows_styles > 0) && (!checkmobile())) { ?><a href="<?php if ($style == "all") echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']."?page=".$page."&filter=".$filter."&style=".$row_log['brewStyle']."&sort=".$sort."&dir=".$dir."&view=".$view."&pg=1"; else echo "#"; ?>" title="Filter by style: <?php echo $row_log['brewStyle']; ?>"><?php } echo $row_log['brewStyle']; if (($totalRows_styles > 0) && (!checkmobile())) { ?>
<span> <span>
<div id="wideWrapper"> <div id="wideWrapper">
<?php include ('reference/styles.inc.php'); ?> <?php include ('reference/styles.inc.php'); ?>
@@ -98,7 +103,7 @@
<?php if ($totalRows_log > 10) { ?> <?php if ($totalRows_log > 10) { ?>
<table class="dataTable"> <table class="dataTable">
<tr> <tr>
<td colspan="9"><div id="paginate"><?php echo $total." ".$row_pref['menuBrewBlogs']." Total"; if ($total > $display) echo "&nbsp;&nbsp;&nbsp;&#8226"; if ($view == "all") echo "&nbsp;&nbsp;&nbsp;&#8226;&nbsp;&nbsp;&nbsp;"; if ($total > $display) { echo "&nbsp;&nbsp;&nbsp;"; paginate($display, $pg, $total); if ($view == "limited") { ?>&nbsp;&nbsp;&nbsp;&#8226&nbsp;&nbsp;&nbsp;<a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&view=all">Entire List of <?php if (($row_pref['mode'] == "2") && ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuBrewBlogs']; ?></a><?php } } if ($view == "all") { ?><a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&view=limited">Limited List of <?php if (($row_pref['mode'] == "2")&& ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuBrewBlogs']; ?></a><?php } ?></div></td> <td colspan="9"><div id="paginate"><?php echo $total." ".$row_pref['menuBrewBlogs']." Total"; if ($total > $display) echo "&nbsp;&nbsp;&nbsp;&#8226"; if ($view == "all") echo "&nbsp;&nbsp;&nbsp;&#8226;&nbsp;&nbsp;&nbsp;"; if ($total > $display) { echo "&nbsp;&nbsp;&nbsp;"; paginate($display, $pg, $total); if ($view == "limited") { ?>&nbsp;&nbsp;&nbsp;&#8226&nbsp;&nbsp;&nbsp;<a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=all">Entire List of <?php if (($row_pref['mode'] == "2") && ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuBrewBlogs']; ?></a><?php } } if ($view == "all") { ?><a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=limited">Limited List of <?php if (($row_pref['mode'] == "2")&& ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuBrewBlogs']; ?></a><?php } ?></div></td>
</tr> </tr>
</table> </table>
<?php } ?> <?php } ?>

View File

@@ -1282,8 +1282,7 @@ if ($row_log['brewGrain1'] != "" ) { // hide entire set of grain rows if first n
</div> </div>
<?php } ?> <?php } ?>
<?php if ((($row_log['brewYeast'] != "") && ($row_log['brewYeastProfile'] == "")) || (($row_log['brewYeast'] == "") && ($row_log['brewYeastProfile'] != ""))) { ?><div id="headerContent">Yeast</div><?php } ?> <?php if ((($row_log['brewYeast'] != "") && ($row_log['brewYeastProfile'] == "")) || (($row_log['brewYeast'] == "") && ($row_log['brewYeastProfile'] != ""))) { ?><div id="help"><a href="sections/reference.inc.php?section=yeast&source=log&KeepThis=true&TB_iframe=true&height=450&width=800" title="Yeast Reference" class="thickbox"><img src="<?php echo $imageSrc; ?>information.png" align="absmiddle" border="0" alt="Reference" /></a></div><div id="headerContent">Yeast</div><?php } ?>
<?php if ($row_log['brewYeast'] != "") { // hide Yeast section if none listed (6) ?> <?php if ($row_log['brewYeast'] != "") { // hide Yeast section if none listed (6) ?>
<div id="dataContainer"> <div id="dataContainer">
<table class="dataTable"> <table class="dataTable">

View File

@@ -1,9 +1,10 @@
<?php <?php
mysql_select_db($database_brewing, $brewing); /* mysql_select_db($database_brewing, $brewing);
$query_styles = sprintf("SELECT * FROM styles WHERE brewStyle='%s'", $row_recipeList['brewStyle']); $query_styles = sprintf("SELECT * FROM styles WHERE brewStyle='%s'", $row_recipeList['brewStyle']);
$styles = mysql_query($query_styles, $brewing) or die(mysql_error()); $styles = mysql_query($query_styles, $brewing) or die(mysql_error());
$row_styles = mysql_fetch_assoc($styles); $row_styles = mysql_fetch_assoc($styles);
$totalRows_styles = mysql_num_rows($styles); $totalRows_styles = mysql_num_rows($styles);
*/
?> ?>
<div id="contentWide"> <div id="contentWide">
<?php <?php
@@ -21,7 +22,10 @@
<?php if ($totalRows_featured > 0) { if (($row_pref['mode'] == "1") || (($row_pref['mode'] == "2") && ($filter == "all"))) { ?><div id="headerContentAdmin">All <?php echo $dbName; ?></div><?php } } ?> <?php if ($totalRows_featured > 0) { if (($row_pref['mode'] == "1") || (($row_pref['mode'] == "2") && ($filter == "all"))) { ?><div id="headerContentAdmin">All <?php echo $dbName; ?></div><?php } } ?>
<table class="dataTable"> <table class="dataTable">
<tr> <tr>
<td colspan="9"><div id="paginate"><?php echo $total." ".$row_pref['menuRecipes']." Total"; if ($total > $display) echo "&nbsp;&nbsp;&nbsp;&#8226"; if ($view == "all") echo "&nbsp;&nbsp;&nbsp;&#8226;&nbsp;&nbsp;&nbsp;"; if ($total > $display) { echo "&nbsp;&nbsp;&nbsp;"; paginate($display, $pg, $total); if ($view == "limited") { ?>&nbsp;&nbsp;&nbsp;&#8226&nbsp;&nbsp;&nbsp;<a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&view=all">Entire List of <?php if (($row_pref['mode'] == "2") && ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuRecipes']; ?></a><?php } } if ($view == "all") { ?><a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&view=limited">Limited List of <?php if (($row_pref['mode'] == "2")&& ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuRecipes']; ?></a><?php } ?></div></td> <?php if ($style != "all") { ?>
<td><div id="breadcrumb">Filter: <?php echo $row_recipeList['brewStyle'];?> | <a href="<?php echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']."?page=".$page."&filter=".$filter."&style=all&sort=".$sort."&dir=".$dir."&view=".$view."&pg=".$pg; ?>">See all styles</a></div></td>
<?php } ?>
<td><div id="paginate"><?php echo $total." ".$row_pref['menuRecipes']." Total"; if ($total > $display) echo "&nbsp;&nbsp;&nbsp;&#8226"; if ($view == "all") echo "&nbsp;&nbsp;&nbsp;&#8226;&nbsp;&nbsp;&nbsp;"; if ($total > $display) { echo "&nbsp;&nbsp;&nbsp;"; paginate($display, $pg, $total); if ($view == "limited") { ?>&nbsp;&nbsp;&nbsp;&#8226&nbsp;&nbsp;&nbsp;<a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=all">Entire List of <?php if (($row_pref['mode'] == "2") && ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuRecipes']; ?></a><?php } } if (($view == "all") && ($total < $display)) { ?><a href="?page=<?php echo $page; ?>&sort=<?php echo $sort; ?>&dir=<?php echo $dir; ?>&filter=<?php echo $filter; ?>&style=<?php echo $style; ?>&view=limited">Limited List of <?php if (($row_pref['mode'] == "2")&& ($filter != "all")) echo $row_user2['realFirstName']."'s "; echo $row_pref['menuRecipes']; ?></a><?php } ?></div></td>
</tr> </tr>
</table> </table>
<table class="dataTable"> <table class="dataTable">
@@ -66,7 +70,7 @@
<?php if (!checkmobile()) { ?><td class="dataList"><a href="#" onclick="window.open('includes/output_beer_xml.inc.php?id=<?php echo $row_recipeList['id']; ?>&source=<?php echo $source; ?>&brewStyle=<?php echo $row_recipeList['brewStyle']; ?>','','height=5,width=5, scrollbars=no, toolbar=no, resizable==no, menubar=no'); return false;"><img src="<?php echo $imageSrc; ?>page_white_code.png" title="Download BeerXML" align="absmiddle" border="0" /></a></td><?php } ?> <?php if (!checkmobile()) { ?><td class="dataList"><a href="#" onclick="window.open('includes/output_beer_xml.inc.php?id=<?php echo $row_recipeList['id']; ?>&source=<?php echo $source; ?>&brewStyle=<?php echo $row_recipeList['brewStyle']; ?>','','height=5,width=5, scrollbars=no, toolbar=no, resizable==no, menubar=no'); return false;"><img src="<?php echo $imageSrc; ?>page_white_code.png" title="Download BeerXML" align="absmiddle" border="0" /></a></td><?php } ?>
<td class="dataList"><a href="index.php?page=<?php echo $destination; ?>&filter=<?php echo $row_recipeList['brewBrewerID']; ?>&id=<?php echo $row_recipeList['id']; ?>"><?php echo $row_recipeList['brewName']; ?></a></td> <td class="dataList"><a href="index.php?page=<?php echo $destination; ?>&filter=<?php echo $row_recipeList['brewBrewerID']; ?>&id=<?php echo $row_recipeList['id']; ?>"><?php echo $row_recipeList['brewName']; ?></a></td>
<td class="dataList"> <td class="dataList">
<div id="moreInfo"><?php if (($totalRows_styles > 0) && (!checkmobile())) { ?><a href="#"><?php } echo $row_recipeList['brewStyle']; if (($totalRows_styles > 0) && (!checkmobile())) { ?> <div id="moreInfo"><?php if (($totalRows_styles > 0) && (!checkmobile())) { ?><a href="<?php if ($style == "all") echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']."?page=".$page."&filter=".$filter."&style=".$row_recipeList['brewStyle']."&sort=".$sort."&dir=".$dir."&view=".$view."&pg=1"; else echo "#"; ?>" title="Filter by style: <?php echo $row_recipeList['brewStyle']; ?>"><?php } echo $row_recipeList['brewStyle']; if (($totalRows_styles > 0) && (!checkmobile())) { ?>
<span> <span>
<div id="wideWrapper"> <div id="wideWrapper">
<?php include ('reference/styles.inc.php'); ?> <?php include ('reference/styles.inc.php'); ?>