diff --git a/addKatalog.php b/addKatalog.php index 33797da..995433a 100644 --- a/addKatalog.php +++ b/addKatalog.php @@ -81,22 +81,23 @@ "lendTime"=>$_POST["LendTime"], "lendType"=>$_POST["LendType"]); $json = json_encode($form); + //echo $form["title"]; $context = stream_context_create(array( 'http' => array( - 'method' => 'POST', 'header' => "Content-type: application/json\r\n", + 'method' => "POST", 'content' => $json ) )); // Send the request - $response= file_get_contents('http://localhost:5000/api/katalog/buch', false, $context); + $response= file_get_contents('http://localhost:5000/api/katalog/buch', true, $context); echo $response; // Check for errors if($response === FALSE){ - die('Error'); + echo('Error!'); } // Decode the response @@ -150,16 +151,16 @@ diff --git a/findInventar.htm b/findInventar.htm deleted file mode 100644 index 63db450..0000000 --- a/findInventar.htm +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Inventar - - - -
- -

Inventar

-
-
-

Eingabe

-
- - -
-
- - -
-

Ausgabe

- - - - - - - - - -
ItemId
BookId
-
- - \ No newline at end of file diff --git a/findInventar.php b/findInventar.php new file mode 100644 index 0000000..b7f9fd3 --- /dev/null +++ b/findInventar.php @@ -0,0 +1,61 @@ + 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); + + } +?> + + + + + + + + Inventar + + + +
+ +

Inventar

+
+
+

Eingabe

+
+ + +
+
+ + +
+

Ausgabe

+ + + + + + + + + +
ItemId
BookId
+
+ + \ No newline at end of file diff --git a/findVerleih.htm b/findVerleih.htm deleted file mode 100644 index d994ff5..0000000 --- a/findVerleih.htm +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - Verleih - - - -
- -

Verleih

-
-
-

Eingabe

-
- - -
-
- -
-

Ausgabe

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ProductId
Titel
Autor
Erscheinungsland
Link
Sprache
Seitenzahl
Erscheinungsjahr
Kategorie
Bildlink
Verleihdauer
Verleihtyp
-
- - \ No newline at end of file diff --git a/findVerleih.php b/findVerleih.php new file mode 100644 index 0000000..e78ed75 --- /dev/null +++ b/findVerleih.php @@ -0,0 +1,73 @@ + 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); + + } + +?> + + + + + + + Verleih + + + +
+ +

Verleih

+
+
+

Eingabe

+
+ + +
+
+ +
+

Ausgabe

+ + + + + + + + + + + + + + + + + + + + + +
Id
ItemId
ReturnDate
Customer
Returned
+
+ + \ No newline at end of file diff --git a/index.html b/index.html index 382c187..f911caa 100644 --- a/index.html +++ b/index.html @@ -21,8 +21,8 @@ - - + +
@@ -32,9 +32,9 @@
@@ -44,9 +44,9 @@