64 lines
1.9 KiB
PHP
64 lines
1.9 KiB
PHP
<?php
|
|
|
|
require_once("session.php");
|
|
include 'config.php';
|
|
require_once("class.user.php");
|
|
$auth_user = new USER();
|
|
|
|
$user_id = $_SESSION['user_session'];
|
|
|
|
$stmt = $auth_user->runQuery("SELECT * FROM benutzer WHERE benutzer_id=:user_id");
|
|
$stmt->execute(array(":user_id"=>$user_id));
|
|
|
|
$userRow=$stmt->fetch(PDO::FETCH_ASSOC);
|
|
|
|
//ID auslesen, welche vom Link mittels GET mitgegeben wurde
|
|
$id=$_GET['id']
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
|
<title>Hallo <?php print($userRow['benutzer_name']); ?></title>
|
|
</head>
|
|
<body>
|
|
<?php include 'nav.php';?>
|
|
<h1>Angebot abgeben:</h1>
|
|
<p>Sie können zum gewählten Objekt nun ein Angebot abgeben.<br/>
|
|
Bitte seien Sie sich bewusst dass der Nachfrager auf das Lieferdatum
|
|
zählen wird. <?php echo $id ?>
|
|
</p>
|
|
<div class="inhalt">
|
|
<table class="table">
|
|
<caption>Nachgefragte Teile:</caption>
|
|
<th>Eintrag</th>
|
|
<th>Typ</th>
|
|
<th>Menge</th>
|
|
<th>Qualität</th>
|
|
<th>Lieferdatum</th>
|
|
<?php
|
|
foreach ($db->query("SELECT * FROM nachfrager WHERE erfassungs_id = $id") as $row) {
|
|
echo
|
|
"<tr>" .
|
|
"<td>" . substr(htmlentities($row['nachfr_datum']),0,10) . " " . "</td>" .
|
|
"<td>" . htmlentities($row['nachfr_typ']) . " " . "</td>" .
|
|
"<td>" . htmlentities($row['nachfr_menge']) . " " . "</td>" .
|
|
"<td>" . htmlentities($row['nachfr_quali']) . " " . "</td>" .
|
|
"<td>" . htmlentities($row['nachfr_lieferdatum']) . " " .
|
|
"</td>" .
|
|
"</tr>" .
|
|
"<tr>" .
|
|
"<td colspan='5' class='titel'>" . "Beschreibung:" .
|
|
"</td>" .
|
|
"</tr>" .
|
|
"<tr>" .
|
|
"<td colspan='5' class='beschreibung'>" . htmlentities($row['nachfr_beschr']) . "</td>" .
|
|
"</tr>";
|
|
}
|
|
?>
|
|
</table>
|
|
</div>
|
|
</body>
|
|
</html>
|