header("location:index.php"); } require_once 'includes/conn.php'; require_once '../includes/config_names.php'; require_once 'includes/html_helper.php'; require_once 'includes/functions.php'; require_once 'includes/models/keg.php'; require_once 'includes/models/kegType.php'; require_once 'includes/models/kegStatus.php'; require_once 'includes/managers/keg_manager.php'; require_once 'includes/managers/kegStatus_manager.php'; require_once 'includes/managers/kegType_manager.php'; $htmlHelper = new HtmlHelper(); $kegManager = new KegManager(); $kegStatusManager = new KegStatusManager(); $kegTypeManager = new KegTypeManager(); if ($_SERVER['REQUEST_METHOD'] === 'POST') { $keg = new Keg(); $keg->setFromArray($_POST); $kegManager->Save($keg); redirect('keg_list.php'); } if (isset($_GET['id'])) { $keg = $kegManager->GetById($_GET['id']); } else { $keg = new Keg(); } $kegStatusList = $kegStatusManager->GetAll(); $kegTypeList = $kegTypeManager->GetAll(); ?>
header("location:index.php"); } require_once __DIR__ . '/includes/conn.php'; require_once __DIR__ . '/../includes/config_names.php'; require_once __DIR__ . '/includes/html_helper.php'; require_once __DIR__ . '/includes/functions.php'; require_once __DIR__ . '/includes/models/keg.php'; require_once __DIR__ . '/includes/models/kegType.php'; require_once __DIR__ . '/includes/models/kegStatus.php'; require_once __DIR__ . '/includes/managers/keg_manager.php'; require_once __DIR__ . '/includes/managers/kegStatus_manager.php'; require_once __DIR__ . '/includes/managers/kegType_manager.php'; $htmlHelper = new HtmlHelper(); $kegManager = new KegManager(); $kegStatusManager = new KegStatusManager(); $kegTypeManager = new KegTypeManager(); if (isset($_POST['inactivateKeg'])) { $kegManager->Inactivate($_POST['id']); } $kegs = $kegManager->GetAllActive(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>RaspberryPints</title> <link href="styles/layout.css" rel="stylesheet" type="text/css" /> <link href="styles/wysiwyg.css" rel="stylesheet" type="text/css" /> <!-- Theme Start --> <link href="styles.css" rel="stylesheet" type="text/css" />
require_once __DIR__ . '/../includes/config_names.php'; require_once __DIR__ . '/includes/html_helper.php'; require_once __DIR__ . '/includes/functions.php'; require_once __DIR__ . '/includes/models/tap.php'; require_once __DIR__ . '/includes/models/beer.php'; require_once __DIR__ . '/includes/models/keg.php'; require_once __DIR__ . '/includes/models/kegType.php'; require_once __DIR__ . '/includes/managers/beer_manager.php'; require_once __DIR__ . '/includes/managers/keg_manager.php'; require_once __DIR__ . '/includes/managers/kegType_manager.php'; require_once __DIR__ . '/includes/managers/tap_manager.php'; $htmlHelper = new HtmlHelper(); $tapManager = new TapManager(); $beerManager = new BeerManager(); $kegManager = new KegManager(); $kegTypeManager = new KegTypeManager(); if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_POST['saveTap'])) { $tap = new Tap(); $tap->setFromArray($_POST); $tapManager->Save($tap); } redirect('tap_list.php'); } $beerList = $beerManager->GetAllActive(); $kegList = $kegManager->GetAllAvailable(); $tapNumber = $_GET['tapNumber']; if (isset($_GET['id'])) { $tap = $tapManager->GetById($_GET['id']); if (!array_key_exists($tap->get_kegId(), $kegList)) { $kegList[$tap->get_kegId()] = $kegManager->GetById($tap->get_kegId());