From 92eeb27bab730aee27239665979f918c1ef8d418 Mon Sep 17 00:00:00 2001 From: flejk Date: Thu, 10 Feb 2022 13:52:00 +0100 Subject: [PATCH] KAPPA --- controller/listLatest.php | 4 +- search.bak | 92 ++++++++++++++++++++++++++++++++++++++ search.php | 93 +-------------------------------------- view/sidebar.php | 10 +---- 4 files changed, 97 insertions(+), 102 deletions(-) create mode 100644 search.bak diff --git a/controller/listLatest.php b/controller/listLatest.php index 6f332da..ba9e458 100644 --- a/controller/listLatest.php +++ b/controller/listLatest.php @@ -1,6 +1,6 @@ getMessage(); } return $arrayOfBreweries; -}*/ +} function listLatestUsers($pdo, $where){ $conn = $pdo; diff --git a/search.bak b/search.bak new file mode 100644 index 0000000..4a4441c --- /dev/null +++ b/search.bak @@ -0,0 +1,92 @@ +"; + +if($_GET["type"]=="tag"){ + $array=listBeersByTag($pdo, $tag); +} +if($_GET["type"]=="beer"){ + $name=$_GET["keyword"]; + $array=listBeersByName($pdo, $name); + foreach($arrayOfBeers as $row): + echo " +
+ +
"; + 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 "
"; + echo "
"; + endforeach; +} +if($_GET["type"]=="all"){ + $name=$_GET["keyword"]; + $array=listArticleByName($pdo, $name); + foreach($array as $row) : + echo "
"; + echo "
"; + endforeach; + + $array=listBreweryByName($pdo, $name); + + $array=listBeersByName($pdo, $name); + + $array=listBeersByTag($pdo, $tag); +} + + +echo ""; +include("view/footer.php");*/ \ No newline at end of file diff --git a/search.php b/search.php index 2d2aa33..87664e9 100755 --- a/search.php +++ b/search.php @@ -1,93 +1,2 @@ "; - -if($_GET["type"]=="tag"){ - $array=listBeersByTag($pdo, $tag); -} -if($_GET["type"]=="beer"){ - $name=$_GET["keyword"]; - $array=listBeersByName($pdo, $name); - foreach($arrayOfBeers as $row): - echo " -
- -
"; - 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 "
"; - echo "
"; - endforeach; -} -if($_GET["type"]=="all"){ - $name=$_GET["keyword"]; - $array=listArticleByName($pdo, $name); - foreach($array as $row) : - echo "
"; - echo "
"; - endforeach; - - $array=listBreweryByName($pdo, $name); - - $array=listBeersByName($pdo, $name); - - $array=listBeersByTag($pdo, $tag); -} - - -echo ""; -include("view/footer.php"); -//header("location: index.php"); \ No newline at end of file +header("location: index.php"); diff --git a/view/sidebar.php b/view/sidebar.php index 9fa6df7..ce31c48 100755 --- a/view/sidebar.php +++ b/view/sidebar.php @@ -1,21 +1,15 @@ - -