<?php
  /**************************************************************************\
  * phpGroupWare - phpgw_brewer                                              *
  * http://www.phpgroupware.org                                              *
  * Written by Joseph Engo <jengo@phpgroupware.org>                          *
  * --------------------------------------------                             *
  *  This program is free software; you can redistribute it and/or modify it *
  *  under the terms of the GNU General Public License as published by the   *
  *  Free Software Foundation; either version 2 of the License, or (at your  *
  *  option) any later version.                                              *
  \**************************************************************************/

  /* $Id: index.php,v 1.2 2001/09/11 12:38:28 milosch Exp $ */

	$GLOBALS['phpgw_info']['flags'] = array(
		'noheader'    => True,
		'nonavbar'    => True,
		'noappheader' => True,
		'currentapp'  => 'brewer'
	);
	include('../header.inc.php');

	if($mode)
	{
		$link = 'mode=select&id=' . $id;
	}
	if ($type)
	{
		$redir = $type .'s.php';
		if (file_exists(PHPGW_APP_ROOT . SEP . $type . 'es.php'))
		{
			$redir = $type .'es.php';
		}
		Header('Location: ' . $GLOBALS['phpgw']->link('/brewer/' . $redir));
	}

	$GLOBALS['phpgw']->common->phpgw_header();
	echo parse_navbar();

	echo '<br>' . lang('Brewer') . '<br><br>' . "\n";
	echo '<table>' . "\n";

	if(!$link)
	{
		echo '  <tr>' . "\n";
		echo '    <td>' . "\n";
		echo '<a href="' . $GLOBALS['phpgw']->link('/brewer/styles.php') . '">' . lang('Styles') . '</a>' . "\n";
		echo '    </td>' . "\n";
		echo '  </tr>' . "\n";

		echo '  <tr>' . "\n";
		echo '    <td>' . "\n";
		echo '<a href="' . $GLOBALS['phpgw']->link('/brewer/recipes.php') . '">' . lang('Recipes') . '</a>' . "\n";
		echo '    </td>' . "\n";
		echo '  </tr>' . "\n";
/*
		echo '  <tr>' . "\n";
		echo '    <td>' . "\n";
		echo '<a href="' . $GLOBALS['phpgw']->link('/brewer/batches.php') . '">' . lang('Batches') . '</a>' . "\n";
		echo '    </td>' . "\n";
		echo '  </tr>' . "\n";*/
	}

	echo '  <tr>' . "\n";
	echo '    <td>' . "\n";
	echo '<a href="' . $GLOBALS['phpgw']->link('/brewer/malts.php',$link) . '">' . lang('Malts') . '</a>' . "\n";
	echo '    </td>' . "\n";
	echo '  </tr>' . "\n";

	echo '  <tr>' . "\n";
	echo '    <td>' . "\n";
	echo '<a href="' . $GLOBALS['phpgw']->link('/brewer/yeasts.php',$link) . '">' . lang('Yeasts') . '</a>' . "\n";
	echo '    </td>' . "\n";
	echo '  </tr>' . "\n";

	echo '  <tr>' . "\n";
	echo '    <td>' . "\n";
	echo '<a href="' . $GLOBALS['phpgw']->link('/brewer/hops.php',$link) . '">' . lang('Hops') . '</a>' . "\n";
	echo '    </td>' . "\n";
	echo '  </tr>' . "\n";
	echo '</table>' . "\n";

	$GLOBALS['phpgw']->common->phpgw_footer();
?>
