Hooked up title search.
This commit is contained in:
@ -11,7 +11,7 @@ $db = new SQLite3('metadata.sqlite');
|
|||||||
$titlequery = $db->query("SELECT
|
$titlequery = $db->query("SELECT
|
||||||
books.id AS id,
|
books.id AS id,
|
||||||
books.title AS title,
|
books.title AS title,
|
||||||
SUBSTR(comments.text,10,120) AS excerpt
|
SUBSTR(comments.text,0,120) AS excerpt
|
||||||
FROM books
|
FROM books
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
comments ON comments.book = books.id
|
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>
|
<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">
|
<div class="fh5co-bio">
|
||||||
<figure>
|
<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>
|
</figure>
|
||||||
<h3 class="heading">About Me</h3>
|
<h3 class="heading">About the Project</h3>
|
||||||
<h2>Emily Tran Le</h2>
|
<a href="index.php"><h2>Infopump</h2></a>
|
||||||
<p>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. </p>
|
<p>A bibliographic management and display system.</p>
|
||||||
<ul class="fh5co-social">
|
<ul class="fh5co-social">
|
||||||
<li><a href="#"><i class="icon-twitter"></i></a></li>
|
<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-facebook"></i></a></li>
|
||||||
<li><a href="#"><i class="icon-instagram"></i></a></li>
|
<li><a href="#"><i class="icon-instagram"></i></a></li>-->
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -103,18 +103,18 @@ ORDER BY books.title ASC");
|
|||||||
<div class="fh5co-box">
|
<div class="fh5co-box">
|
||||||
<h3 class="heading">Categories</h3>
|
<h3 class="heading">Categories</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#">Travel</a></li>
|
<li><a href="#">Books</a></li>
|
||||||
<li><a href="#">Style</a></li>
|
<li><a href="#">Movies</a></li>
|
||||||
<li><a href="#">Photography</a></li>
|
<li><a href="#">Television</a></li>
|
||||||
<li><a href="#">Food & Drinks</a></li>
|
<li><a href="#">Video Games</a></li>
|
||||||
<li><a href="#">Culture</a></li>
|
<li><a href="#">Other</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="fh5co-box">
|
<div class="fh5co-box">
|
||||||
<h3 class="heading">Search</h3>
|
<h3 class="heading">Search</h3>
|
||||||
<form action="#">
|
<form action="basictitlesearch.php" method="get">
|
||||||
<div class="form-group">
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -128,11 +128,11 @@ ORDER BY books.title ASC");
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="#" class="js-fh5co-nav-toggle fh5co-nav-toggle"><i></i></a>
|
<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-twitter"></i></a></li>
|
||||||
<li><a href="#"><i class="icon-facebook"></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-instagram"></i></a></li>
|
||||||
</ul>
|
</ul> -->
|
||||||
<div class="col-lg-12 col-md-12 text-center">
|
<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>
|
<h1 id="fh5co-logo"><a href="index.html">Search Results: <?php echo $titlesearch; ?></a></h1>
|
||||||
</div>
|
</div>
|
||||||
@ -155,7 +155,7 @@ ORDER BY books.title ASC");
|
|||||||
$row_title = $row['title'];
|
$row_title = $row['title'];
|
||||||
$row_excerpt = $row['excerpt'];
|
$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>
|
</div>
|
||||||
@ -167,7 +167,7 @@ ORDER BY books.title ASC");
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer id="fh5co-footer">
|
<footer id="fh5co-footer">
|
||||||
<p><small>© 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>© Creative Commons By-NC-SA<br> Design by <a href="http://freehtml5.co" target="_blank">FREEHTML5.co</a></small></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
|
17
index.php
17
index.php
@ -81,14 +81,14 @@ LIMIT 4');
|
|||||||
<a href="#" class="fh5co-close-offcanvas js-fh5co-close-offcanvas"><span><i class="icon-cross3"></i> <span>Close</span></span></a>
|
<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">
|
<div class="fh5co-bio">
|
||||||
<figure>
|
<figure>
|
||||||
<img src="images/avatar.jpg" alt="Infopump Avatar" class="img-responsive">
|
<a href="index.php"><img src="images/avatar.jpg" alt="Infopump Avatar" class="img-responsive"></a>
|
||||||
</figure>
|
</figure>
|
||||||
<h3 class="heading">About the Project</h3>
|
<h3 class="heading">About the Project</h3>
|
||||||
<h2>Infopump</h2>
|
<a href="index.php"><h2>Infopump</h2></a>
|
||||||
<p>A bibliographic management and display system.</p>
|
<p>A bibliographic management and display system.</p>
|
||||||
<ul class="fh5co-social">
|
<ul class="fh5co-social">
|
||||||
<li><a href="#"><i class="icon-twitter"></i></a></li>
|
<!--<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-facebook"></i></a></li>
|
||||||
<li><a href="#"><i class="icon-instagram"></i></a></li>-->
|
<li><a href="#"><i class="icon-instagram"></i></a></li>-->
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -106,9 +106,9 @@ LIMIT 4');
|
|||||||
</div>
|
</div>
|
||||||
<div class="fh5co-box">
|
<div class="fh5co-box">
|
||||||
<h3 class="heading">Search</h3>
|
<h3 class="heading">Search</h3>
|
||||||
<form action="#">
|
<form action="basictitlesearch.php" method="get">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="text" class="form-control" placeholder="This doesn't work yet">
|
<input type="text" class="form-control" name="titlesearch" placeholder="Basic title search">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -122,12 +122,13 @@ LIMIT 4');
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="#" class="js-fh5co-nav-toggle fh5co-nav-toggle"><i></i></a>
|
<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-twitter"></i></a></li>
|
||||||
<!--<li><a href="#"><i class="icon-facebook"></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-instagram"></i></a></li>-->
|
||||||
</ul>
|
</ul>
|
||||||
<div class="col-lg-12 col-md-12 text-center">
|
<div class="col-lg-12 col-md-12 text-center">
|
||||||
<h1 id="fh5co-logo"><a href="index.php">Infopump - Cyberpunk Culture Database</a></h1>
|
<h1 id="fh5co-logo"><a href="index.php">Infopump - Cyberpunk Culture Database</a></h1>
|
||||||
|
<h3>Latest Additions</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// Get and use an item record ID (ItemRecordID) to use for a data pull
|
// Get and use an item record ID (ItemRecordID) to use for a data pull
|
||||||
$ItemID = htmlspecialchars($_GET["itemid"]);
|
$ItemID = htmlspecialchars($_GET["itemid"]);
|
||||||
|
|
||||||
// -------------------- END DATABASE QUERIES --------------------
|
// -------------------- BEGIN DATABASE QUERIES --------------------
|
||||||
|
|
||||||
// Establish atabase connection
|
// Establish atabase connection
|
||||||
$db = new SQLite3('metadata.sqlite');
|
$db = new SQLite3('metadata.sqlite');
|
||||||
@ -151,14 +151,14 @@ while ($row = $type->fetchArray()) {
|
|||||||
<a href="#" class="fh5co-close-offcanvas js-fh5co-close-offcanvas"><span><i class="icon-cross3"></i> <span>Close</span></span></a>
|
<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">
|
<div class="fh5co-bio">
|
||||||
<figure>
|
<figure>
|
||||||
<img src="images/avatar.jpg" alt="Infopump Avatar" class="img-responsive">
|
<a href="index.php"><img src="images/avatar.jpg" alt="Infopump Avatar" class="img-responsive"></a>
|
||||||
</figure>
|
</figure>
|
||||||
<h3 class="heading">About the Project</h3>
|
<h3 class="heading">About the Project</h3>
|
||||||
<h2>Infopump</h2>
|
<a href="index.php"><h2>Infopump</h2></a>
|
||||||
<p>A bibliographic management and display system.</p>
|
<p>A bibliographic management and display system.</p>
|
||||||
<ul class="fh5co-social">
|
<ul class="fh5co-social">
|
||||||
<li><a href="#"><i class="icon-twitter"></i></a></li>
|
<!--<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-facebook"></i></a></li>
|
||||||
<li><a href="#"><i class="icon-instagram"></i></a></li>-->
|
<li><a href="#"><i class="icon-instagram"></i></a></li>-->
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -176,9 +176,9 @@ while ($row = $type->fetchArray()) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="fh5co-box">
|
<div class="fh5co-box">
|
||||||
<h3 class="heading">Search</h3>
|
<h3 class="heading">Search</h3>
|
||||||
<form action="#">
|
<form action="basictitlesearch.php" method="get">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="text" class="form-control" placeholder="This doesn't work yet">
|
<input type="text" class="form-control" name="titlesearch" placeholder="Basic title search">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -193,9 +193,9 @@ while ($row = $type->fetchArray()) {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="#" class="js-fh5co-nav-toggle fh5co-nav-toggle"><i></i></a>
|
<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-twitter"></i></a></li>
|
||||||
<li><a href="#"><i class="icon-facebook"></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-instagram"></i></a></li>-->
|
||||||
</ul>
|
</ul>
|
||||||
<div class="col-lg-12 col-md-12 text-center">
|
<div class="col-lg-12 col-md-12 text-center">
|
||||||
<?php echo '<h1 id="fh5co-logo">Item Record '.$ItemID.'</h1>';?>
|
<?php echo '<h1 id="fh5co-logo">Item Record '.$ItemID.'</h1>';?>
|
||||||
|
Reference in New Issue
Block a user