From d9e8bc3347ae3bad5dd60f0c221f3d42f5c47bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ho=CC=88rler?= Date: Thu, 2 Mar 2017 13:59:32 +0100 Subject: [PATCH] suche erstellt und verschiedene kleine anpassungen an der darstellung --- Website/profile.php | 8 +++++--- Website/style.css | 10 +++++++--- Website/suche.php | 28 +++++++++++++++++++++++++--- 3 files changed, 37 insertions(+), 9 deletions(-) diff --git a/Website/profile.php b/Website/profile.php index 6b280d6..5d0c8e5 100644 --- a/Website/profile.php +++ b/Website/profile.php @@ -30,8 +30,9 @@ Typ Menge Qualität - Lieferdatum - Günstigstes Angebot + Lieferung + Angebot + Günstigstes Angebot query("SELECT * FROM nachfrager LEFT JOIN anbieter @@ -44,6 +45,7 @@ "" . htmlentities($row['nachfr_menge']) . " " . "" . "" . htmlentities($row['nachfr_quali']) . " " . "" . "" . htmlentities($row['nachfr_lieferdatum']) . " " . "" . + "" . substr(htmlentities($row['angebot_datum']),0,10) . " " . "" . ""; if (!empty(htmlentities($row['angebot_preis']))) {echo "Fr. " . htmlentities($row['angebot_preis']) . " " . ""; @@ -62,7 +64,7 @@ "" . ""; } - } + } ?> diff --git a/Website/style.css b/Website/style.css index 0827e72..7ea6db7 100644 --- a/Website/style.css +++ b/Website/style.css @@ -51,7 +51,11 @@ nav{ .btn{ font-size: 14px; height:45px; - +} +.sbtn{ + font-size: 12px; + height:30px; + padding: 0px 0px 0px 0px; } .signin-form, .body-container { @@ -112,6 +116,7 @@ th{ } td{ font-size: 14px; + word-wrap:break-word; } th, td { border-bottom: 1px solid #ddd; @@ -131,7 +136,6 @@ div > .eingabe{ .table{ width:730px; table-layout:fixed; - word-wrap:break-word; } .table-unvsible{ @@ -140,6 +144,6 @@ div > .eingabe{ width:730px; } caption{ - padding: 15px 0px 15px 0px; + padding: 15px 0px 15px 0px; font-size: 24px; } diff --git a/Website/suche.php b/Website/suche.php index b1d8ce4..bb18dff 100644 --- a/Website/suche.php +++ b/Website/suche.php @@ -11,6 +11,22 @@ $stmt->execute(array(":user_id"=>$user_id)); $userRow=$stmt->fetch(PDO::FETCH_ASSOC); + +//collect Search +if (isset($_GET['keywords'])) { + $keywords = $_GET['keywords']; + $query = $db->query(" + SELECT * + FROM nachfrager + WHERE nachfr_typ LIKE '%{$keywords}%' + OR nachfr_beschr LIKE '%{$keywords}%' + "); +} else { + $query = $db->query(" + SELECT * + FROM nachfrager + "); +} ?> @@ -26,7 +42,11 @@

Suchen

Suchen Sie ein Teil?

-

grenzen Sie die Liste ein: < - suche - >

+

grenzen Sie die Liste ein:

+
" > + + +
@@ -37,7 +57,8 @@ query("SELECT * FROM nachfrager") as $row) { + if ($query->rowCount()) { + while ($row = $query->fetch()) { echo "" . "" . @@ -48,7 +69,8 @@ "" . ""; } - ?> + } + ?>
Qualität Lieferdatum
" . substr(htmlentities($row['nachfr_datum']),0,10) . " " . "" . " Details --> " . "