Compare commits
21 Commits
Author | SHA1 | Date |
---|---|---|
Naumann | 560252464b | |
Naumann | 438122dbc9 | |
Naumann | cbcc2d9217 | |
Naumann | 9069b58ae2 | |
Naumann | bc5ab4adc9 | |
Naumann | 4bf926b8e3 | |
Naumann | f3551ee100 | |
Naumann | 26069bb314 | |
Naumann | e244196c4b | |
Naumann | 085c62f199 | |
Naumann | e70c6210b0 | |
Naumann | 9d9bc2c1e1 | |
Naumann | 5425028d5f | |
Naumann | c6ba2a9ec5 | |
Naumann | fb411e2db4 | |
Naumann | 55f68639b8 | |
David Renner | 4b44a540a6 | |
David Renner | 104a749340 | |
David Renner | 17c99c1e4c | |
David Renner | 5bcfce5caa | |
David Renner | b1526d2b42 |
|
@ -0,0 +1,113 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Katalog</title>
|
||||
<link rel="stylesheet" type="text/css" href="scss/Style.css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="Titel">
|
||||
<h1>Katalog</h1>
|
||||
</div>
|
||||
<!--
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<textarea name="Titel" class="text" placeholder="Titel"></textarea>
|
||||
<textarea name="Author" class="text" placeholder="Author"></textarea>
|
||||
<textarea name="Country" class="text" placeholder="Country"></textarea>
|
||||
<textarea name="Link" class="text" placeholder="Link"></textarea>
|
||||
<textarea name="Language" class="text" placeholder="Language"></textarea>
|
||||
<textarea name="Pages" class="text" type="number" placeholder="Pages"></textarea>
|
||||
<textarea name="Year" class="text" type="number" placeholder="Year"></textarea>
|
||||
<textarea name="Category" class="text" placeholder="Category"></textarea>
|
||||
<textarea name="ImageLink" class="text" placeholder="ImageLink"></textarea>
|
||||
<textarea name="LendTime" class="text" type="number" placeholder="LendTime"></textarea>
|
||||
<textarea name="LendType" class="text" placeholder="LendType"></textarea>
|
||||
|
||||
<button id="go">Go</button>
|
||||
</div>
|
||||
Das war die alte version. -->
|
||||
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form action="./php/catalogue_search.php" method="POST">
|
||||
<input type="text" name="Title" id="input" placeholder="Titel">
|
||||
<input type="text" name="Author" id="input" placeholder="Autor">
|
||||
<input type="text" name="Country" id="input" placeholder="Herkunft">
|
||||
<input type="url" name="Link" id="input" placeholder="Link">
|
||||
<input type="text" name="Language" id="input" placeholder="Sprache">
|
||||
<input type="number" name="Pages" id="input" placeholder="Seiten">
|
||||
<input type="date" name="Year" id="input" placeholder="Erscheinungsjahr"> <!-- Nur YYYY-->
|
||||
<input list="categories" name="Category" id="input" placeholder="Kategorie"> <!-- Nur Auswahl (per select?) -->
|
||||
<datalist id="categories">
|
||||
<option value="Buch">
|
||||
<option value="Magazin">
|
||||
<option value="E-Book">
|
||||
<option value="e-Magazin">
|
||||
</datalist>
|
||||
<input type="url" name="ImageLink" id="input" placeholder="Bild">
|
||||
<input type="number" name="LendTime" id="input" placeholder="Verteihdauer">
|
||||
<input list="types" name="LendType" id="input" placeholder="Verleihtyp">
|
||||
<datalist id="types">
|
||||
<option value="Physisch">
|
||||
<option value="Virtuell">
|
||||
</datalist>
|
||||
<input type="submit" name="go" id="go">
|
||||
</form>
|
||||
</div>
|
||||
<div class="Ausgabe">
|
||||
<h2>Ausgabe</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td class ="fix">ProductId</td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Titel</td>
|
||||
<td>Die Bibel 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Author</td>
|
||||
<td>Mr. IchBinEinAuthor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Contry</td>
|
||||
<td>Atlantis</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Link</td>
|
||||
<td>lmgtfy.de</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Language</td>
|
||||
<td>latein</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Pages</td>
|
||||
<td>42</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Year</td>
|
||||
<td>2021</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Category</td>
|
||||
<td>Dies ist ein Beispiel für einen viiiiiiiiiiiiiiiiieeeeeeeeeeeeeeeellllllllllllllllllll zzzzzuuuuuuuuu llllllllllllaaaaaaaaannnnnnnnnnggeeeeeeeennnnnnn TTTTTTeeeeeeeeeeeeeeexxxxxxxxxxxxt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">ImageLink</td>
|
||||
<td>DiesIstEinBild.png</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">LendTime</td>
|
||||
<td>30</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">LendType</td>
|
||||
<td>Buch</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
if(isset($_GET['test'])) {
|
||||
$link = "https://localhost:5000/api/katalog/42";
|
||||
|
||||
//remove protocol, we're assuming its http
|
||||
if(strstr($link, '://') != false){
|
||||
$link = substr($link, strpos($link,'://') + strlen('://'));
|
||||
}
|
||||
|
||||
//split the url into host (www.example.com) and requested page (index.php) on the first slash
|
||||
$host = substr($link, 0, strpos($link, '/'));
|
||||
$request = substr($link, strpos($link, '/'));
|
||||
|
||||
//open a socket connection to the site on port 80 (http protocol port)
|
||||
$fp = @fsockopen($host, 80, $errno, $errstr);
|
||||
|
||||
if($fp == false){
|
||||
$response = $errno . " " . $errstr;
|
||||
}
|
||||
else {
|
||||
//create the request headers
|
||||
$headers = array();
|
||||
$headers[] = 'HEAD ' . $request . ' HTTP/1.1';
|
||||
$headers[] = 'Host: ' . $host;
|
||||
//$headers[] = 'Content-Length: 0';
|
||||
$headers[] = 'Connection: close';
|
||||
$headers[] = 'Content-Type: text/html';
|
||||
$headers = implode("\r\n", $headers) . "\r\n\r\n";
|
||||
|
||||
//send our request
|
||||
if (!fwrite($fp, $headers)) {
|
||||
fclose($fp);
|
||||
$response = "Could not access webpage specified.";
|
||||
}
|
||||
else {
|
||||
//read the response
|
||||
$rsp = '';
|
||||
while(!feof($fp)) { $rsp .= fgets($fp,8192); }
|
||||
fclose($fp);
|
||||
echo $rsp;
|
||||
/*
|
||||
$hunks = explode("\r\n\r\n",trim($rsp));
|
||||
$headers = explode("\n", $hunks[count($hunks) - 1]);
|
||||
$response = trim($headers[0]);
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test Link</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php if(isset($response)) { echo $response; } ?>
|
||||
<form method="get">
|
||||
<input type="submit" name="list">
|
||||
</form>
|
||||
<button method= "get" type="button" name="test">Don't!!</button>
|
||||
</body>
|
||||
</html>
|
|
@ -14,14 +14,14 @@
|
|||
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form action="catalogue_search.php">
|
||||
<form action="php/pasta.php" method="POST">
|
||||
<input type="text" name="Title" class="input" placeholder="Titel">
|
||||
<input type="text" name="Author" class="input" placeholder="Autor">
|
||||
<input type="text" name="Country" class="input" placeholder="Herkunft">
|
||||
<input type="url" name="Link" class="input" placeholder="Link">
|
||||
<input type="text" name="Language" class="input" placeholder="Sprache">
|
||||
<input type="number" name="Pages" class="input" placeholder="Seiten" min="0">
|
||||
<input type="date" name="Year" class="input" placeholder="Erscheinungsjahr"> <!-- Nur YYYY--> <!--funktioniert nur über ein Skript, alternativ type="number" mit min und max restrictions-->
|
||||
<input type="number" name="Year" class="input" placeholder="Erscheinungsjahr" min="0">
|
||||
<select class="input" name="Category">
|
||||
<option>Book</option>
|
||||
<option>Magazin</option>
|
||||
|
|
|
@ -0,0 +1,222 @@
|
|||
<?php /*
|
||||
if(isset($_POST["go"]))
|
||||
{
|
||||
$form = array(
|
||||
"Title"=>$_POST["Title"],
|
||||
"Author"=>$_POST["Author"]);
|
||||
$json = json_encode($form);
|
||||
//echo $json;
|
||||
|
||||
// Dieser Schritt dient nur um die Daten wieder in der Ausgabe anzeigen zu lassen,
|
||||
//muss später noch an eine andere Stelle gepackt werden (z.B. nach dem Empfang von Daten aus der API)
|
||||
$json2= json_decode($json, true);
|
||||
} */
|
||||
?>
|
||||
|
||||
<?php
|
||||
/*fsockopen('www.google.com', 80);
|
||||
|
||||
//Zugriff auf API
|
||||
if(isset($_POST["go"]))
|
||||
{
|
||||
$Title= $_POST['Title'];
|
||||
$url= "https://localhost:5001/api/katalog"; // stimmt die URL?
|
||||
$client = curl_init($url);
|
||||
$result= file_get_contents($url);
|
||||
//$fp = @fsockopen($client, 80, $errno, $errstr);
|
||||
$response=curl_exec($url);
|
||||
echo $errstr;
|
||||
//echo $fp;
|
||||
echo $response;
|
||||
|
||||
|
||||
|
||||
$result = json_decode($response);
|
||||
echo $result;
|
||||
$form = array(
|
||||
"Title"=>$_POST["Title"],
|
||||
"Author"=>$_POST["Author"]);
|
||||
$json = json_encode($form);
|
||||
|
||||
|
||||
// Dieser Schritt dient nur um die Daten wieder in der Ausgabe anzeigen zu lassen,
|
||||
//muss später noch an eine andere Stelle gepackt werden 8z.B. nach dem Empfang von Daten aus der API)
|
||||
$json2= json_decode($json, true);
|
||||
}*/
|
||||
?>
|
||||
|
||||
<?php /*
|
||||
//nur zum Test einer GET-Methode
|
||||
if(isset($_GET["test"]))
|
||||
{
|
||||
$url= "http://localhost:5000/api/katalog/1";
|
||||
$contents = file_get_contents($url);
|
||||
if($contents !== false){
|
||||
//Print out the contents.
|
||||
echo $contents;
|
||||
}
|
||||
|
||||
//$client = curl_init($url);
|
||||
//$response=curl_exec($client);
|
||||
$Title= $_GET['Title'];
|
||||
$result = json_decode($response);
|
||||
echo $result['title'];
|
||||
}*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
if(isset($_POST["go"]))
|
||||
{
|
||||
|
||||
$form = array(
|
||||
"title"=>$_POST["Title"],
|
||||
"author"=>$_POST["Author"],
|
||||
"country"=>$_POST["Country"],
|
||||
"link"=>$_POST["Link"],
|
||||
"language"=>$_POST["Language"],
|
||||
"pages"=>$_POST["Pages"],
|
||||
"year"=>$_POST["Year"],
|
||||
"category"=>$_POST["Category"],
|
||||
"imageLink"=>$_POST["ImageLink"],
|
||||
"lendTime"=>$_POST["LendTime"],
|
||||
"lendType"=>$_POST["LendType"]);
|
||||
$json = json_encode($form);
|
||||
//echo $form["title"];
|
||||
|
||||
$context = stream_context_create(array(
|
||||
'http' => array(
|
||||
'header' => "Content-type: application/json\r\n",
|
||||
'method' => "POST",
|
||||
'content' => $json
|
||||
)
|
||||
));
|
||||
|
||||
// Send the request
|
||||
|
||||
$response= file_get_contents('http://localhost:5000/api/katalog/buch', true, $context);
|
||||
echo $response;
|
||||
// Check for errors
|
||||
if($response === FALSE){
|
||||
echo('Error!');
|
||||
}
|
||||
|
||||
// Decode the response
|
||||
$responseData = json_decode($response, TRUE);
|
||||
|
||||
// Print the date from the response
|
||||
echo $responseData['productId'];
|
||||
|
||||
//$data = $form;
|
||||
/*
|
||||
// use key 'http' even if you send the request to https://...
|
||||
$options = array(
|
||||
'http' => array(
|
||||
'header' => "Content-type: application/json\r\n",
|
||||
'method' => 'POST',
|
||||
'content' => http_build_query($form),
|
||||
),
|
||||
);
|
||||
$context = stream_context_create($options);
|
||||
//echo $context;
|
||||
// $result = file_get_contents('http://localhost:5000/api/katalog/');
|
||||
//$bloed= file_put_contents('http://localhost:5000/api/katalog/', $form, FILE_APPEND);
|
||||
*/
|
||||
// http://www.php.net/manual/en/context.http.php
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Katalog</title>
|
||||
<link rel="stylesheet" type="text/css" href="scss/style.css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="Titel">
|
||||
<a href="index.html"><button id= "zurueck">zurück</button></a>
|
||||
<h1>Katalog</h1>
|
||||
</div>
|
||||
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form method="post">
|
||||
<input type="text" name="Title" class="input" placeholder="Titel">
|
||||
<input type="text" name="Author" class="input" placeholder="Autor">
|
||||
<input type="text" name="Country" class="input" placeholder="Herkunft">
|
||||
<input type="url" name="Link" class="input" placeholder="Link">
|
||||
<input type="text" name="Language" class="input" placeholder="Sprache">
|
||||
<input type="number" name="Pages" class="input" placeholder="Seiten" min="0">
|
||||
<input type="number" name="Year" class="input" placeholder="Erscheinungsjahr" min="0">
|
||||
<select class="input" name="Category">
|
||||
<option value="0">Book</option>
|
||||
<option value="1">Magazin</option>
|
||||
<option value="2" >EBook</option>
|
||||
<option value="3">EPaper</option>
|
||||
</select>
|
||||
<input type="url" name="ImageLink" class="input" placeholder="Bild">
|
||||
<input type="number" name="LendTime" class="input" placeholder="Verteihdauer" min="0">
|
||||
<select class="input" name="LendType">
|
||||
<option value="0">Physical</option>
|
||||
<option value="1">Virtual</option>
|
||||
</select>
|
||||
<input type="submit" name="go" id="go">
|
||||
</form>
|
||||
</div>
|
||||
<div class="Ausgabe">
|
||||
<h2>Ausgabe</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td class ="fix">ProductId</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Titel</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json2['Title']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Autor</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json2['Author']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Land</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Link</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Sprache</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Seitenzahl</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Erscheinungsjahr</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Kategorie</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Bildlink</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Verleihdauer</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Verleihtyp</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form action="catalogue_search.php">
|
||||
<form action="php/catalogue_search.php" method="POST">
|
||||
<input type="text" name="Title" class="input" placeholder="Titel">
|
||||
<input type="text" name="Author" class="input" placeholder="Autor">
|
||||
<input type="text" name="Country" class="input" placeholder="Herkunft">
|
||||
|
@ -23,14 +23,14 @@
|
|||
<input type="number" name="Pages" class="input" placeholder="Seiten" min="0">
|
||||
<input type="date" name="Year" class="input" placeholder="Erscheinungsjahr"> <!-- Nur YYYY--> <!--funktioniert nur über ein Skript, alternativ type="number" mit min und max restrictions-->
|
||||
<select class="input" name="Category">
|
||||
<option>Book</option>
|
||||
<option>Magazin</option>
|
||||
<option>EBook</option>
|
||||
<option>EPaper</option>
|
||||
<option value="Book">Book</option>
|
||||
<option value="Magazin">Magazin</option>
|
||||
<option value="EBook">EBook</option>
|
||||
<option value="EPaper">EPaper</option>
|
||||
</select>
|
||||
<input type="url" name="ImageLink" class="input" placeholder="Bild">
|
||||
<input type="number" name="LendTime" class="input" placeholder="Verteihdauer"min ="0">
|
||||
<select class="input" name="Category">
|
||||
<input type="number" name="LendTime" class="input" placeholder="Verteihdauer" min ="0">
|
||||
<select class="input" name="LendType">
|
||||
<option>Physical</option>
|
||||
<option>Virtual</option>
|
||||
</select>
|
||||
|
|
|
@ -1,24 +1,45 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Verleih</title>
|
||||
<title>Katalog</title>
|
||||
<link rel="stylesheet" type="text/css" href="scss/style.css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="Titel">
|
||||
<a href="index.html"><button id= "zurueck">zurück</button></a>
|
||||
<h1>Verleih</h1>
|
||||
</div>
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form action="lend_search.php">
|
||||
<input type="number" name="VerleihId" class="input" placeholder="Geben sie die gesuchte VerleihId an" min= "0">
|
||||
<input type="submit" name="go" id="go">
|
||||
</form>
|
||||
<h1>Katalog</h1>
|
||||
</div>
|
||||
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form action="php/catalogue_search.php" method="POST">
|
||||
<input type="text" name="Title" class="input" placeholder="Titel">
|
||||
<input type="text" name="Author" class="input" placeholder="Autor">
|
||||
<input type="text" name="Country" class="input" placeholder="Herkunft">
|
||||
<input type="url" name="Link" class="input" placeholder="Link">
|
||||
<input type="text" name="Language" class="input" placeholder="Sprache">
|
||||
<input type="number" name="Pages" class="input" placeholder="Seiten" min="0">
|
||||
<input type="date" name="Year" class="input" placeholder="Erscheinungsjahr"> <!-- Nur YYYY--> <!--funktioniert nur über ein Skript, alternativ type="number" mit min und max restrictions-->
|
||||
<select class="input" name="Category">
|
||||
<option value="Book">Book</option>
|
||||
<option value="Magazin">Magazin</option>
|
||||
<option value="EBook">EBook</option>
|
||||
<option value="EPaper">EPaper</option>
|
||||
</select>
|
||||
<input type="url" name="ImageLink" class="input" placeholder="Bild">
|
||||
<input type="number" name="LendTime" class="input" placeholder="Verteihdauer" min ="0">
|
||||
<select class="input" name="LendType">
|
||||
<option>Physical</option>
|
||||
<option>Virtual</option>
|
||||
</select>
|
||||
<!--<input type="submit" name="go" id="go">-->
|
||||
<input type="button" name="test" >
|
||||
</form>
|
||||
</div>
|
||||
<div class="Ausgabe">
|
||||
<h2>Ausgabe</h2>
|
||||
<table>
|
||||
|
@ -35,7 +56,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Erscheinungsland</td>
|
||||
<td class="fix">Land</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -51,7 +72,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Erscheinungsjahr</td>
|
||||
<td class="fix">Jahr</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
|
@ -1,3 +1,9 @@
|
|||
<?php
|
||||
$form = array("Title"=>$_POST["Title"],"Author"=>$_POST["Author"]);
|
||||
$form = json_encode($form);
|
||||
echo $form
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
|
@ -11,14 +17,32 @@
|
|||
<a href="index.html"><button id= "zurueck">zurück</button></a>
|
||||
<h1>Katalog</h1>
|
||||
</div>
|
||||
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form action="catalogue_search.php">
|
||||
<input type="number" name="ProductId" class="input" placeholder="Geben sie die gesuchte ProduktId an" min= "0">
|
||||
<form action="php/catalogue_search.php" method="POST">
|
||||
<input type="text" name="Title" class="input" placeholder="Titel">
|
||||
<input type="text" name="Author" class="input" placeholder="Autor">
|
||||
<input type="text" name="Country" class="input" placeholder="Herkunft">
|
||||
<input type="url" name="Link" class="input" placeholder="Link">
|
||||
<input type="text" name="Language" class="input" placeholder="Sprache">
|
||||
<input type="number" name="Pages" class="input" placeholder="Seiten" min="0">
|
||||
<input type="date" name="Year" class="input" placeholder="Erscheinungsjahr"> <!-- Nur YYYY--> <!--funktioniert nur über ein Skript, alternativ type="number" mit min und max restrictions-->
|
||||
<select class="input" name="Category">
|
||||
<option value="Book">Book</option>
|
||||
<option value="Magazin">Magazin</option>
|
||||
<option value="EBook">EBook</option>
|
||||
<option value="EPaper">EPaper</option>
|
||||
</select>
|
||||
<input type="url" name="ImageLink" class="input" placeholder="Bild">
|
||||
<input type="number" name="LendTime" class="input" placeholder="Verteihdauer" min ="0">
|
||||
<select class="input" name="LendType">
|
||||
<option>Physical</option>
|
||||
<option>Virtual</option>
|
||||
</select>
|
||||
<input type="submit" name="go" id="go">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="Ausgabe">
|
||||
<h2>Ausgabe</h2>
|
||||
<table>
|
||||
|
@ -35,7 +59,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Erscheinungsland</td>
|
||||
<td class="fix">Land</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -51,7 +75,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Erscheinungsjahr</td>
|
||||
<td class="fix">Jahr</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -67,7 +91,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Verleihart</td>
|
||||
<td class="fix">Verleihtyp</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
|
@ -1,37 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Inventar</title>
|
||||
<link rel="stylesheet" type="text/css" href="scss/style.css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="Titel">
|
||||
<a href="index.html"><button id= "zurueck">zurück</button></a>
|
||||
<h1>Inventar</h1>
|
||||
</div>
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form action="inventar_search.php">
|
||||
<input type="number" name="ProductId" class="input" placeholder="Geben Sie die gesuchte Id an" min= "0">
|
||||
<input type="submit" name="go" id="go">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Ausgabe">
|
||||
<h2>Ausgabe</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td class ="fix">ItemId</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">BookId</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
if(isset($_POST["go"]))
|
||||
{
|
||||
|
||||
$url = 'localhost:5000/api/inventar';
|
||||
|
||||
|
||||
// use key 'http' even if you send the request to https://...
|
||||
$options = array(
|
||||
'http' => array(
|
||||
'header' => "Content-type: application/json\r\n",
|
||||
'method' => 'POST'
|
||||
),
|
||||
);
|
||||
$context = stream_context_create($options);
|
||||
//echo $context;
|
||||
$id= $_POST["ItemId"];
|
||||
$result = file_get_contents('http://localhost:5000/api/inventar/'.$id);
|
||||
$json= json_decode($result, true);
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Inventar</title>
|
||||
<link rel="stylesheet" type="text/css" href="scss/style.css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="Titel">
|
||||
<a href="index.html"><button id= "zurueck">zurück</button></a>
|
||||
<h1>Inventar</h1>
|
||||
</div>
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form method="post">
|
||||
<input type="number" name="ItemId" class="input" placeholder="Geben Sie die gesuchte Id an" min= "1">
|
||||
<input type="submit" name="go" id="go">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Ausgabe">
|
||||
<h2>Ausgabe</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td class ="fix">ItemId</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['itemId']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">BookId</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['bookId']; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,102 @@
|
|||
<?php
|
||||
if(isset($_POST["go"]))
|
||||
{
|
||||
|
||||
$url = 'localhost:5000/api/katalog';
|
||||
|
||||
|
||||
// use key 'http' even if you send the request to https://...
|
||||
$options = array(
|
||||
'http' => array(
|
||||
'header' => "Content-type: application/json\r\n",
|
||||
'method' => 'POST'
|
||||
),
|
||||
);
|
||||
$context = stream_context_create($options);
|
||||
//echo $context;
|
||||
$id= $_POST["ProductId"];
|
||||
$result = file_get_contents('http://localhost:5000/api/katalog/'.$id);
|
||||
//echo $result;
|
||||
$json= json_decode($result, true);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Katalog</title>
|
||||
<link rel="stylesheet" type="text/css" href="scss/style.css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="Titel">
|
||||
<a href="index.html"><button id= "zurueck">zurück</button></a>
|
||||
<h1>Katalog</h1>
|
||||
</div>
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form method="post">
|
||||
<input type="number" name="ProductId" class="input" placeholder="Geben Sie die gesuchte ProduktId an" min= "1" required>
|
||||
<input type="submit" name="go" id="go">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="Ausgabe">
|
||||
<h2>Ausgabe</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td class ="fix">ProductId</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['productId']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Titel</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['title']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Autor</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['author']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Erscheinungsland</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['country']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Link</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['link']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Sprache</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['language']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Seitenzahl</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['pages']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Erscheinungsjahr</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['year']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Kategorie</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['category']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Bildlink</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['imageLink']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Verleihdauer</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['lendTime']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Verleihart</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['lendType']; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
if(isset($_POST["go"]))
|
||||
{
|
||||
|
||||
$url = 'localhost:5000/api/leihvorgang';
|
||||
|
||||
|
||||
// use key 'http' even if you send the request to https://...
|
||||
$options = array(
|
||||
'http' => array(
|
||||
'header' => "Content-type: application/json\r\n",
|
||||
'method' => 'POST'
|
||||
),
|
||||
);
|
||||
$context = stream_context_create($options);
|
||||
//echo $context;
|
||||
$id= $_POST["id"];
|
||||
$result = file_get_contents('http://localhost:5000/api/leihvorgang/'.$id);
|
||||
//echo $result;
|
||||
$json= json_decode($result, true);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Verleih</title>
|
||||
<link rel="stylesheet" type="text/css" href="scss/style.css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="Titel">
|
||||
<a href="index.html"><button id= "zurueck">zurück</button></a>
|
||||
<h1>Verleih</h1>
|
||||
</div>
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form methode="post">
|
||||
<input type="number" name="id" class="input" placeholder="Geben sie die gesuchte VerleihId an" min= "0">
|
||||
<input type="submit" name="go" id="go">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="Ausgabe">
|
||||
<h2>Ausgabe</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td class ="fix">Id</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['id']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">ItemId</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['itemId']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">ReturnDate</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['returnDate']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Customer</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['customer']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Returned</td>
|
||||
<td><?php if(isset($_POST["go"])) echo $json['returned']; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
20
index.html
20
index.html
|
@ -19,10 +19,10 @@
|
|||
|
||||
<select name="selection" id="selection" onchange="location.assign(this.value);">
|
||||
<option></option>
|
||||
<option value=findKatalog.htm>Finden</option>
|
||||
<Option value="addKatalog.htm">Hinzufügen</Option>
|
||||
<option value="changeKatalog.htm">Bearbeiten</option>
|
||||
<option value="deleteKatalog.htm">Löschen</option>
|
||||
<option value=findKatalog.php>Finden</option>
|
||||
<Option value="addKatalog.php">Hinzufügen</Option>
|
||||
<option value="changeKatalog.php">Bearbeiten</option>
|
||||
<option value="deleteKatalog.php">Löschen</option>
|
||||
</select>
|
||||
</dd>
|
||||
<dt>
|
||||
|
@ -32,9 +32,9 @@
|
|||
|
||||
<select name="selection" id="selection" onchange="location.assign(this.value);">
|
||||
<option></option>
|
||||
<option value=findInventar.htm>Finden</option>
|
||||
<Option value="addInventar.htm">Hinzufügen</Option>
|
||||
<option value="deleteInventar.htm">Löschen</option>
|
||||
<option value=findInventar.php>Finden</option>
|
||||
<Option value="addInventar.php">Hinzufügen</Option>
|
||||
<option value="deleteInventar.php">Löschen</option>
|
||||
</select>
|
||||
</dd>
|
||||
<dt>
|
||||
|
@ -44,9 +44,9 @@
|
|||
|
||||
<select name="selection" id="selection" onchange="location.assign(this.value);">
|
||||
<option></option>
|
||||
<option value=findVerleih.htm>Finden</option>
|
||||
<Option value="addVerleih.htm">Hinzufügen</Option>
|
||||
<option value="changeVerleih.htm">Bearbeiten</option>
|
||||
<option value=findVerleih.php>Finden</option>
|
||||
<Option value="addVerleih.php">Hinzufügen</Option>
|
||||
<option value="changeVerleih.php">Bearbeiten</option>
|
||||
</select>
|
||||
</dd>
|
||||
</form>
|
||||
|
|
|
@ -0,0 +1,142 @@
|
|||
<?php
|
||||
if(isset($_POST['link'])) {
|
||||
$link = $_POST['link'];
|
||||
|
||||
//remove protocol, we're assuming its http
|
||||
if(strstr($link, '://') != false){
|
||||
$link = substr($link, strpos($link,'://') + strlen('://'));
|
||||
}
|
||||
|
||||
//split the url into host (www.example.com) and requested page (index.php) on the first slash
|
||||
$host = substr($link, 0, strpos($link, '/'));
|
||||
$request = substr($link, strpos($link, '/'));
|
||||
|
||||
//open a socket connection to the site on port 80 (http protocol port)
|
||||
$fp = @fsockopen($host, 80, $errno, $errstr);
|
||||
|
||||
if($fp == false){
|
||||
$response = $errno . " " . $errstr;
|
||||
}
|
||||
else {
|
||||
//create the request headers
|
||||
$headers = array();
|
||||
$headers[] = 'HEAD ' . $request . ' HTTP/1.1';
|
||||
$headers[] = 'Host: ' . $host;
|
||||
$headers[] = 'Content-Length: 0';
|
||||
$headers[] = 'Connection: close';
|
||||
$headers[] = 'Content-Type: text/html';
|
||||
$headers = implode("\r\n", $headers) . "\r\n\r\n";
|
||||
|
||||
//send our request
|
||||
if (!fwrite($fp, $headers)) {
|
||||
fclose($fp);
|
||||
$response = "Could not access webpage specified.";
|
||||
}
|
||||
else {
|
||||
//read the response
|
||||
$rsp = '';
|
||||
while(!feof($fp)) { $rsp .= fgets($fp,8192); }
|
||||
fclose($fp);
|
||||
$hunks = explode("\r\n\r\n",trim($rsp));
|
||||
$headers = explode("\n", $hunks[count($hunks) - 1]);
|
||||
$response = trim($headers[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Katalog</title>
|
||||
<link rel="stylesheet" type="text/css" href="scss/style.css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="Titel">
|
||||
<a href="index.html"><button id= "zurueck">zurück</button></a>
|
||||
<h1>Katalog</h1>
|
||||
</div>
|
||||
|
||||
<div class="Eingabe">
|
||||
<h2>Eingabe</h2>
|
||||
<form method="POST">
|
||||
<input type="text" name="Title" class="input" placeholder="Titel">
|
||||
<input type="text" name="Author" class="input" placeholder="Autor">
|
||||
<input type="text" name="Country" class="input" placeholder="Herkunft">
|
||||
<input type="url" name="Link" class="input" placeholder="Link">
|
||||
<input type="text" name="Language" class="input" placeholder="Sprache">
|
||||
<input type="number" name="Pages" class="input" placeholder="Seiten" min="0">
|
||||
<input type="number" name="Year" class="input" placeholder="Erscheinungsjahr" min="0">
|
||||
<select class="input" name="Category">
|
||||
<option>Book</option>
|
||||
<option>Magazin</option>
|
||||
<option>EBook</option>
|
||||
<option>EPaper</option>
|
||||
</select>
|
||||
<input type="url" name="ImageLink" class="input" placeholder="Bild">
|
||||
<input type="number" name="LendTime" class="input" placeholder="Verteihdauer" min="0">
|
||||
<select class="input" name="Category">
|
||||
<option>Physical</option>
|
||||
<option>Virtual</option>
|
||||
</select>
|
||||
<input type="submit" name="go" id="go">
|
||||
</form>
|
||||
<?php if(isset($response)) { echo $response; } ?>
|
||||
</div>
|
||||
<div class="Ausgabe">
|
||||
<h2>Ausgabe</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td class ="fix">ProductId</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Titel</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Autor</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Land</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Link</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Sprache</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Seitenzahl</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Erscheinungsjahr</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Kategorie</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Bildlink</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Verleihdauer</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fix">Verleihtyp</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,11 @@
|
|||
<html>
|
||||
<?php
|
||||
$obj = $_POST;
|
||||
$form = json_decode($obj);
|
||||
foreach($form as $key=>$value){
|
||||
echo $key.": ".$value."[br]";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$form = array(
|
||||
"Title"=>$_POST["Title"],
|
||||
"Author"=>$_POST["Author"]);
|
||||
$json = json_encode($form);
|
||||
echo $json;
|
||||
?>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
if(isset($_GET['link'])) {
|
||||
$link = $_GET['link'];
|
||||
|
||||
//remove protocol, we're assuming its http
|
||||
if(strstr($link, '://') != false){
|
||||
$link = substr($link, strpos($link,'://') + strlen('://'));
|
||||
}
|
||||
|
||||
//split the url into host (www.example.com) and requested page (index.php) on the first slash
|
||||
$host = substr($link, 0, strpos($link, '/'));
|
||||
$request = substr($link, strpos($link, '/'));
|
||||
|
||||
//open a socket connection to the site on port 80 (http protocol port)
|
||||
$fp = @fsockopen($host, 80, $errno, $errstr);
|
||||
|
||||
if($fp == false){
|
||||
$response= "Hallo";
|
||||
$response = $errno . " " . $errstr;
|
||||
}
|
||||
else {
|
||||
//create the request headers
|
||||
$headers = array();
|
||||
$headers[] = 'HEAD ' . $request . ' HTTP/1.1';
|
||||
$headers[] = 'Host: ' . $host;
|
||||
//$headers[] = 'Content-Length: 0';
|
||||
$headers[] = 'Connection: close';
|
||||
$headers[] = 'Content-Type: application/json; charset=utf-8';
|
||||
$headers = implode("\r\n", $headers) . "\r\n\r\n";
|
||||
|
||||
//send our request
|
||||
if (!fwrite($fp, $headers)) {
|
||||
fclose($fp);
|
||||
$response = "Hallo.";
|
||||
}
|
||||
else {
|
||||
//read the response
|
||||
$rsp = '';
|
||||
while(!feof($fp)) { $rsp .= fgets($fp,8192); }
|
||||
fclose($fp);
|
||||
/*
|
||||
$hunks = explode("\r\n\r\n",trim($rsp));
|
||||
$headers = explode("\n", $hunks[count($hunks) - 1]);
|
||||
$response = trim($headers[0]);*/
|
||||
$response= $rsp;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test Link</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php if(isset($response)) { echo $response; } ?>
|
||||
<form method="get">
|
||||
<label for="link">Link</label>
|
||||
<input id="link" type="text" name="link" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -31,7 +31,8 @@ body
|
|||
resize: none;
|
||||
overflow: auto;
|
||||
width: 90%;
|
||||
height: 3%;
|
||||
height: 5%;
|
||||
margin-top: 10px;
|
||||
margin-left: 5%;
|
||||
}
|
||||
#go
|
||||
|
|
Loading…
Reference in New Issue