suche erstellt und verschiedene kleine anpassungen an der darstellung
This commit is contained in:
parent
d8239f4122
commit
d9e8bc3347
|
@ -30,8 +30,9 @@
|
|||
<th>Typ</th>
|
||||
<th>Menge</th>
|
||||
<th>Qualität</th>
|
||||
<th>Lieferdatum</th>
|
||||
<th>Günstigstes Angebot</th>
|
||||
<th>Lieferung</th>
|
||||
<th>Angebot</th>
|
||||
<th colspan="2">Günstigstes Angebot</th>
|
||||
<?php
|
||||
foreach ($db->query("SELECT * FROM nachfrager
|
||||
LEFT JOIN anbieter
|
||||
|
@ -44,6 +45,7 @@
|
|||
"<td>" . htmlentities($row['nachfr_menge']) . " " . "</td>" .
|
||||
"<td>" . htmlentities($row['nachfr_quali']) . " " . "</td>" .
|
||||
"<td>" . htmlentities($row['nachfr_lieferdatum']) . " " . "</td>" .
|
||||
"<td>" . substr(htmlentities($row['angebot_datum']),0,10) . " " . "</td>" .
|
||||
"<td>"; if (!empty(htmlentities($row['angebot_preis'])))
|
||||
{echo
|
||||
"Fr. " . htmlentities($row['angebot_preis']) . " " . "</td>";
|
||||
|
@ -62,7 +64,7 @@
|
|||
"</td>" .
|
||||
"</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
");
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
@ -26,7 +42,11 @@
|
|||
<h1>Suchen</h1>
|
||||
<p>Suchen Sie ein Teil?
|
||||
</p>
|
||||
<p>grenzen Sie die Liste ein: < - suche - > </p>
|
||||
<p>grenzen Sie die Liste ein:</p>
|
||||
<form method="GET" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" >
|
||||
<input type="search" name="keywords" autocomplete="off" placeholder="suche" onkeydown="searchq();"/>
|
||||
<input type="submit" value=">>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="inhalt">
|
||||
<table class="table">
|
||||
|
@ -37,7 +57,8 @@
|
|||
<th>Qualität</th>
|
||||
<th>Lieferdatum</th>
|
||||
<?php
|
||||
foreach ($db->query("SELECT * FROM nachfrager") as $row) {
|
||||
if ($query->rowCount()) {
|
||||
while ($row = $query->fetch()) {
|
||||
echo
|
||||
"<tr>" .
|
||||
"<td>" . substr(htmlentities($row['nachfr_datum']),0,10) . " " . "</td>" .
|
||||
|
@ -48,7 +69,8 @@
|
|||
"<td>" . "<a href='angebot.php?id=" . $row['erfassungs_id'] . "'> Details --> </a>" . "</td>" .
|
||||
"</tr>";
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue