diff --git a/www/data/images/book_img/mol_front.png b/www/data/images/book_img/mol_front.png new file mode 100644 index 0000000..1f477e4 Binary files /dev/null and b/www/data/images/book_img/mol_front.png differ diff --git a/www/data/images/book_img/mol_full.png b/www/data/images/book_img/mol_full.png new file mode 100644 index 0000000..160f25a Binary files /dev/null and b/www/data/images/book_img/mol_full.png differ diff --git a/www/data/images/book_img/mol_img1.jpg b/www/data/images/book_img/mol_img1.jpg new file mode 100644 index 0000000..718d29d Binary files /dev/null and b/www/data/images/book_img/mol_img1.jpg differ diff --git a/www/data/images/book_img/mol_img2.jpg b/www/data/images/book_img/mol_img2.jpg new file mode 100644 index 0000000..ca65130 Binary files /dev/null and b/www/data/images/book_img/mol_img2.jpg differ diff --git a/www/data/images/book_img/mol_img3.jpg b/www/data/images/book_img/mol_img3.jpg new file mode 100644 index 0000000..ef8cb31 Binary files /dev/null and b/www/data/images/book_img/mol_img3.jpg differ diff --git a/www/data/images/book_img/mol_img4.jpg b/www/data/images/book_img/mol_img4.jpg new file mode 100644 index 0000000..5e6274a Binary files /dev/null and b/www/data/images/book_img/mol_img4.jpg differ diff --git a/www/data/images/book_img/mol_img5.jpg b/www/data/images/book_img/mol_img5.jpg new file mode 100644 index 0000000..3136c7c Binary files /dev/null and b/www/data/images/book_img/mol_img5.jpg differ diff --git a/www/internals/books.php b/www/internals/books.php index f6ee97a..6e8602a 100644 --- a/www/internals/books.php +++ b/www/internals/books.php @@ -26,6 +26,8 @@ class Books $a['extraimages_paths'] []= __DIR__ . '/../data/images/book_img/' . $a['id'] . '_img' . $i . '.jpg'; } + $a['book_count'] = is_array($a['pdf']) ? count($a['pdf']) : 1; + return $a; } @@ -61,6 +63,16 @@ class Books { if (!file_exists($eipath)) return ['result'=>'err', 'message' => 'Extra-Image not found ' . $prog['title_short']]; } + + if ($prog['book_count'] <= 0) return ['result'=>'err', 'message' => 'BookCount must be greater than zero ' . $prog['title_short']]; + + if ($prog['book_count'] > 1 && !is_array($prog['pdf'])) return ['result'=>'err', 'message' => 'Attribute [pdf] must be an array ' . $prog['title_short']]; + if ($prog['book_count'] > 1 && count($prog['pdf']) !== $prog['book_count']) return ['result'=>'err', 'message' => 'Attribute [pdf] must be the correct size ' . $prog['title_short']]; + if ($prog['book_count'] === 1 && !is_string($prog['pdf'])) return ['result'=>'err', 'message' => 'Attribute [pdf] must be an string ' . $prog['title_short']]; + + if ($prog['book_count'] > 1 && !is_array($prog['pages'])) return ['result'=>'err', 'message' => 'Attribute [pages] must be an array ' . $prog['title_short']]; + if ($prog['book_count'] > 1 && count($prog['pages']) !== $prog['book_count']) return ['result'=>'err', 'message' => 'Attribute [pages] must be the correct size ' . $prog['title_short']]; + if ($prog['book_count'] === 1 && !is_string($prog['pages'])) return ['result'=>'err', 'message' => 'Attribute [pages] must be an string ' . $prog['title_short']]; } if ($warn != null) return $warn; diff --git a/www/pages/books_view.php b/www/pages/books_view.php index 26f02ba..4df3087 100644 --- a/www/pages/books_view.php +++ b/www/pages/books_view.php @@ -39,7 +39,21 @@ if ($book === NULL) httpError(404, 'Book not found');
Pages:
-
+
'; + $pagi++; + } + } + ?>
Author:
@@ -64,12 +78,23 @@ if ($book === NULL) httpError(404, 'Book not found'); Homepage - - - - - PDF - + + + + + + PDF + + + + + + + + PDF (Buch ) + + + diff --git a/www/statics/books/__all.php b/www/statics/books/__all.php index 73402dd..dab9efd 100644 --- a/www/statics/books/__all.php +++ b/www/statics/books/__all.php @@ -71,4 +71,28 @@ return 'size' => [12.5, 19.0], 'imagecount' => 4, ], + + [ + 'id' => 'mol', + 'title' => 'Mother of Learning', + 'title_short' => 'Mother of Learning', + 'date' => '2019-11-24', + 'repository' => 'https://github.com/Mikescher/Mother-of-Learning-Lyx', + 'pages' => ['298', '328', '330', '362', '372', '346', '396', /*'???'*/], + 'pdf' => + [ + 'https://github.com/Mikescher/Mother-of-Learning-Lyx/blob/master/build/Book_1_1.pdf', + 'https://github.com/Mikescher/Mother-of-Learning-Lyx/blob/master/build/Book_1_2.pdf', + 'https://github.com/Mikescher/Mother-of-Learning-Lyx/blob/master/build/Book_2_1.pdf', + 'https://github.com/Mikescher/Mother-of-Learning-Lyx/blob/master/build/Book_2_2.pdf', + 'https://github.com/Mikescher/Mother-of-Learning-Lyx/blob/master/build/Book_3_1.pdf', + 'https://github.com/Mikescher/Mother-of-Learning-Lyx/blob/master/build/Book_3_2.pdf', + 'https://github.com/Mikescher/Mother-of-Learning-Lyx/blob/master/build/Book_3_3.pdf', + //'https://github.com/Mikescher/Mother-of-Learning-Lyx/blob/master/build/Book_3_4.pdf', + ], + 'online' => 'https://www.fictionpress.com/s/2961893', + 'author' => 'Domagoj Kurmaic', + 'size' => [12.5, 19.0], + 'imagecount' => 5, + ], ];