deleting crumbles
parent
7d819c580d
commit
685c052428
@ -1,5 +1,94 @@
|
||||
<?php
|
||||
session_start();
|
||||
require("model/db.php");
|
||||
require("controller/listLatest.php");
|
||||
require("view/mainContent/userButtons.php");
|
||||
|
||||
print_r($_GET);
|
||||
header("location: index.php");
|
||||
|
||||
require("view/header.php");
|
||||
require("view/sidebar.php");
|
||||
|
||||
echo "<div class=\"content\">";
|
||||
|
||||
if($_GET["type"]=="tag"){
|
||||
$array=listBeersByTag($pdo, $tag);
|
||||
}
|
||||
if($_GET["type"]=="beer"){
|
||||
$name=$_GET["keyword"];
|
||||
$array=listBeersByName($pdo, $name);
|
||||
foreach($arrayOfBeers as $row):
|
||||
echo "
|
||||
<div class=\"box\">
|
||||
<article>
|
||||
<a href=\"beer.php?id=";
|
||||
echo $row["id"];
|
||||
echo "\"><h2>";
|
||||
echo $row["name"];
|
||||
echo " ";
|
||||
echo $row["degree"];
|
||||
echo "˚</h2></a>";
|
||||
echo "</br>";
|
||||
echo "</article>
|
||||
</div>";
|
||||
endforeach;
|
||||
}
|
||||
if($_GET["type"]=="brewery"){
|
||||
$name=$_GET["keyword"];
|
||||
$array=listBreweryByName($pdo, $name);
|
||||
|
||||
}
|
||||
if($_GET["type"]=="article"){
|
||||
$name=$_GET["keyword"];
|
||||
$array=listArticleByName($pdo, $name);
|
||||
foreach($array as $row) :
|
||||
echo "<div class=\"box\">";
|
||||
echo "<article>";
|
||||
echo "<a href=\"article.php?id=";
|
||||
echo $row["id"];
|
||||
echo "?>\" ><h2>";
|
||||
echo $row['title'];
|
||||
echo "?></h2></a>";
|
||||
echo "Published on:<time pubdate=\"pubdate\">";
|
||||
echo $row['time'];
|
||||
echo "</time>";
|
||||
echo "<p><em>";
|
||||
echo substr($row['body'],0 ,120);
|
||||
echo "...</em></p> ";
|
||||
echo "<a/rticle>";
|
||||
echo "</div>";
|
||||
endforeach;
|
||||
}
|
||||
if($_GET["type"]=="all"){
|
||||
$name=$_GET["keyword"];
|
||||
$array=listArticleByName($pdo, $name);
|
||||
foreach($arrayOfBeers as $row):
|
||||
foreach($array as $row) :
|
||||
echo "<div class=\"box\">";
|
||||
echo "<article>";
|
||||
echo "<a href=\"article.php?id=";
|
||||
echo $row["id"];
|
||||
echo "?>\" ><h2>";
|
||||
echo $row['title'];
|
||||
echo "?></h2></a>";
|
||||
echo "Published on:<time pubdate=\"pubdate\">";
|
||||
echo $row['time'];
|
||||
echo "</time>";
|
||||
echo "<p><em>";
|
||||
echo substr($row['body'],0 ,120);
|
||||
echo "...</em></p> ";
|
||||
echo "<a/rticle>";
|
||||
echo "</div>";
|
||||
endforeach;
|
||||
|
||||
$array=listBreweryByName($pdo, $name);
|
||||
|
||||
$array=listBeersByName($pdo, $name);
|
||||
|
||||
$array=listBeersByTag($pdo, $tag);
|
||||
}
|
||||
|
||||
|
||||
echo "</div>";
|
||||
include("view/footer.php");
|
||||
//header("location: index.php");
|
Loading…
Reference in New Issue