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>Typ</th>
|
||||||
<th>Menge</th>
|
<th>Menge</th>
|
||||||
<th>Qualität</th>
|
<th>Qualität</th>
|
||||||
<th>Lieferdatum</th>
|
<th>Lieferung</th>
|
||||||
<th>Günstigstes Angebot</th>
|
<th>Angebot</th>
|
||||||
|
<th colspan="2">Günstigstes Angebot</th>
|
||||||
<?php
|
<?php
|
||||||
foreach ($db->query("SELECT * FROM nachfrager
|
foreach ($db->query("SELECT * FROM nachfrager
|
||||||
LEFT JOIN anbieter
|
LEFT JOIN anbieter
|
||||||
|
@ -44,6 +45,7 @@
|
||||||
"<td>" . htmlentities($row['nachfr_menge']) . " " . "</td>" .
|
"<td>" . htmlentities($row['nachfr_menge']) . " " . "</td>" .
|
||||||
"<td>" . htmlentities($row['nachfr_quali']) . " " . "</td>" .
|
"<td>" . htmlentities($row['nachfr_quali']) . " " . "</td>" .
|
||||||
"<td>" . htmlentities($row['nachfr_lieferdatum']) . " " . "</td>" .
|
"<td>" . htmlentities($row['nachfr_lieferdatum']) . " " . "</td>" .
|
||||||
|
"<td>" . substr(htmlentities($row['angebot_datum']),0,10) . " " . "</td>" .
|
||||||
"<td>"; if (!empty(htmlentities($row['angebot_preis'])))
|
"<td>"; if (!empty(htmlentities($row['angebot_preis'])))
|
||||||
{echo
|
{echo
|
||||||
"Fr. " . htmlentities($row['angebot_preis']) . " " . "</td>";
|
"Fr. " . htmlentities($row['angebot_preis']) . " " . "</td>";
|
||||||
|
@ -62,7 +64,7 @@
|
||||||
"</td>" .
|
"</td>" .
|
||||||
"</tr>";
|
"</tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -51,7 +51,11 @@ nav{
|
||||||
.btn{
|
.btn{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
height:45px;
|
height:45px;
|
||||||
|
}
|
||||||
|
.sbtn{
|
||||||
|
font-size: 12px;
|
||||||
|
height:30px;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
}
|
}
|
||||||
.signin-form, .body-container
|
.signin-form, .body-container
|
||||||
{
|
{
|
||||||
|
@ -112,6 +116,7 @@ th{
|
||||||
}
|
}
|
||||||
td{
|
td{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
word-wrap:break-word;
|
||||||
}
|
}
|
||||||
th, td {
|
th, td {
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
|
@ -131,7 +136,6 @@ div > .eingabe{
|
||||||
.table{
|
.table{
|
||||||
width:730px;
|
width:730px;
|
||||||
table-layout:fixed;
|
table-layout:fixed;
|
||||||
word-wrap:break-word;
|
|
||||||
}
|
}
|
||||||
.table-unvsible{
|
.table-unvsible{
|
||||||
|
|
||||||
|
@ -140,6 +144,6 @@ div > .eingabe{
|
||||||
width:730px;
|
width:730px;
|
||||||
}
|
}
|
||||||
caption{
|
caption{
|
||||||
padding: 15px 0px 15px 0px;
|
padding: 15px 0px 15px 0px;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,22 @@
|
||||||
$stmt->execute(array(":user_id"=>$user_id));
|
$stmt->execute(array(":user_id"=>$user_id));
|
||||||
|
|
||||||
$userRow=$stmt->fetch(PDO::FETCH_ASSOC);
|
$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>
|
<!DOCTYPE html>
|
||||||
|
@ -26,7 +42,11 @@
|
||||||
<h1>Suchen</h1>
|
<h1>Suchen</h1>
|
||||||
<p>Suchen Sie ein Teil?
|
<p>Suchen Sie ein Teil?
|
||||||
</p>
|
</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>
|
||||||
<div class="inhalt">
|
<div class="inhalt">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -37,7 +57,8 @@
|
||||||
<th>Qualität</th>
|
<th>Qualität</th>
|
||||||
<th>Lieferdatum</th>
|
<th>Lieferdatum</th>
|
||||||
<?php
|
<?php
|
||||||
foreach ($db->query("SELECT * FROM nachfrager") as $row) {
|
if ($query->rowCount()) {
|
||||||
|
while ($row = $query->fetch()) {
|
||||||
echo
|
echo
|
||||||
"<tr>" .
|
"<tr>" .
|
||||||
"<td>" . substr(htmlentities($row['nachfr_datum']),0,10) . " " . "</td>" .
|
"<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>" .
|
"<td>" . "<a href='angebot.php?id=" . $row['erfassungs_id'] . "'> Details --> </a>" . "</td>" .
|
||||||
"</tr>";
|
"</tr>";
|
||||||
}
|
}
|
||||||
?>
|
}
|
||||||
|
?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue