|
|
|
<?php
|
|
|
|
session_start();
|
|
|
|
require_once("model/db.php");
|
|
|
|
require_once("controller/getRecord.php");
|
|
|
|
require_once("controller/listLatest.php");
|
|
|
|
|
|
|
|
require("view/header.php");
|
|
|
|
require("view/sidebar.php");
|
|
|
|
|
|
|
|
$record = getRecord($pdo, "brewery", $_GET["id"] );
|
|
|
|
$title = $record["name"];
|
|
|
|
$description = $record["description"];
|
|
|
|
$date = $record["time"];
|
|
|
|
$region = $record["region"];
|
|
|
|
|
|
|
|
$array = listBeersByBrewery($pdo, $_GET["id"]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
require("view/mainContent/mainContent.php");
|
|
|
|
|
|
|
|
require("view/mainContent/breweryExtraInfo.php");
|
|
|
|
|
|
|
|
$title = "Beers from $title";
|
|
|
|
$what = "beer";
|
|
|
|
|
|
|
|
require("view/sidebar/sidebarLister.php");
|
|
|
|
|
|
|
|
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
|
|
|
|
if(isThisBound($pdo, "follow", $_GET["id"], $_SESSION["id"])){
|
|
|
|
unfollowButton($pdo, "follow", $_GET["id"], $_SESSION["id"]);
|
|
|
|
|
|
|
|
} else followButton($pdo, "follow", $_GET["id"], $_SESSION["id"]);
|
|
|
|
}
|
|
|
|
|
|
|
|
include("view/footer.php");
|