Hooked up title search.

This commit is contained in:
2022-10-18 12:34:57 -05:00
parent 9ba4362de0
commit 85084141ed
3 changed files with 37 additions and 36 deletions

View File

@ -11,7 +11,7 @@ $db = new SQLite3('metadata.sqlite');
$titlequery = $db->query("SELECT
books.id AS id,
books.title AS title,
SUBSTR(comments.text,10,120) AS excerpt
SUBSTR(comments.text,0,120) AS excerpt
FROM books
INNER JOIN
comments ON comments.book = books.id
@ -87,15 +87,15 @@ ORDER BY books.title ASC");
<a href="#" class="fh5co-close-offcanvas js-fh5co-close-offcanvas"><span><i class="icon-cross3"></i> <span>Close</span></span></a>
<div class="fh5co-bio">
<figure>
<img src="images/person1.jpg" alt="Free HTML5 Bootstrap Template" class="img-responsive">
<a href="index.php"><img src="images/avatar.jpg" alt="Infopump Avatar" class="img-responsive"></a>
</figure>
<h3 class="heading">About Me</h3>
<h2>Emily Tran Le</h2>
<p>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. </p>
<h3 class="heading">About the Project</h3>
<a href="index.php"><h2>Infopump</h2></a>
<p>A bibliographic management and display system.</p>
<ul class="fh5co-social">
<li><a href="#"><i class="icon-twitter"></i></a></li>
<li><a href="#"><i class="icon-facebook"></i></a></li>
<li><a href="#"><i class="icon-instagram"></i></a></li>
<!--<li><a href="#"><i class="icon-facebook"></i></a></li>
<li><a href="#"><i class="icon-instagram"></i></a></li>-->
</ul>
</div>
@ -103,18 +103,18 @@ ORDER BY books.title ASC");
<div class="fh5co-box">
<h3 class="heading">Categories</h3>
<ul>
<li><a href="#">Travel</a></li>
<li><a href="#">Style</a></li>
<li><a href="#">Photography</a></li>
<li><a href="#">Food &amp; Drinks</a></li>
<li><a href="#">Culture</a></li>
<li><a href="#">Books</a></li>
<li><a href="#">Movies</a></li>
<li><a href="#">Television</a></li>
<li><a href="#">Video Games</a></li>
<li><a href="#">Other</a></li>
</ul>
</div>
<div class="fh5co-box">
<h3 class="heading">Search</h3>
<form action="#">
<form action="basictitlesearch.php" method="get">
<div class="form-group">
<input type="text" class="form-control" placeholder="Type a keyword">
<input type="text" class="form-control" name="titlesearch" placeholder="Basic title search">
</div>
</form>
</div>
@ -128,11 +128,11 @@ ORDER BY books.title ASC");
<div class="row">
<a href="#" class="js-fh5co-nav-toggle fh5co-nav-toggle"><i></i></a>
<ul class="fh5co-social">
<!-- <ul class="fh5co-social">
<li><a href="#"><i class="icon-twitter"></i></a></li>
<li><a href="#"><i class="icon-facebook"></i></a></li>
<li><a href="#"><i class="icon-instagram"></i></a></li>
</ul>
</ul> -->
<div class="col-lg-12 col-md-12 text-center">
<h1 id="fh5co-logo"><a href="index.html">Search Results: <?php echo $titlesearch; ?></a></h1>
</div>
@ -155,7 +155,7 @@ ORDER BY books.title ASC");
$row_title = $row['title'];
$row_excerpt = $row['excerpt'];
echo '<p style="padding:10px 0 10px 0;"><img style="float:left; max-height: 75px; padding: 5px 10px" src="images/'.$row_id.'.jpg"><strong><em><a href="itemrecord.php?itemid='.$row_id.'">'.$row_title.'</em></a> :</strong> '.strip_tags($row_excerpt).'...</p>';
echo '<p style="padding:25px 0 35px 0;"><img style="float:left; max-height: 120px; padding: 10px 10px" src="images/'.$row_id.'.jpg"><strong><em><a href="itemrecord.php?itemid='.$row_id.'">'.$row_title.'</em></a> :</strong> '.strip_tags($row_excerpt).'...</p>';
}
?>
</div>
@ -167,7 +167,7 @@ ORDER BY books.title ASC");
</div>
<footer id="fh5co-footer">
<p><small>&copy; 2016. Magazine Free HTML5. All Rights Reserverd. <br> Designed by <a href="http://freehtml5.co" target="_blank">FREEHTML5.co</a> Demo Images: <a href="http://unsplash.com/" target="_blank">Unsplash</a></small></p>
<p><small>&copy; Creative Commons By-NC-SA<br> Design by <a href="http://freehtml5.co" target="_blank">FREEHTML5.co</a></small></p>
</footer>
<!-- jQuery -->