Added isbn image, premade Letter selector receiver on results

This commit is contained in:
Mattia Mascarello 2021-11-08 18:32:06 +01:00 committed by GitHub
parent 557063d077
commit 15bd367762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
<?php <?php
require("common.php"); require("common.php");
require("isbnImage.php");
function main($pdo, $pageN) function main($pdo, $pageN)
{ {
@ -73,6 +74,15 @@ function main($pdo, $pageN)
$query .= " Titolo LIKE ('%' || :Titolo || '%')"; $query .= " Titolo LIKE ('%' || :Titolo || '%')";
$arrayQ[":Titolo"] = $_POST["Titolo"]; $arrayQ[":Titolo"] = $_POST["Titolo"];
} }
if (!empty($_POST["Letter"])) {
if (!$flag) {
$flag = true;
} else {
$query .= " AND ";
}
$query .= " Titolo LIKE (:Letter || '%')";
$arrayQ[":Letter"] = $_POST["Letter"];
}
if (!empty($_POST["Autore"])) { if (!empty($_POST["Autore"])) {
if (!$flag) { if (!$flag) {
$flag = true; $flag = true;
@ -183,6 +193,7 @@ function main($pdo, $pageN)
} }
?> ?>
<div class="resultD w3-panel w3-card"> <div class="resultD w3-panel w3-card">
<img src="<?php echo isbnImage($data["ISBN"]); ?>" style="width:10vw;" />
<table> <table>
<tr> <tr>
<th>Titolo</th> <th>Titolo</th>