| Server IP : 192.169.170.185 / Your IP : 216.73.216.97 Web Server : Apache System : Linux p3plmcpnl495852.prod.phx3.secureserver.net 4.18.0-553.52.1.lve.el8.x86_64 #1 SMP Wed May 21 15:31:29 UTC 2025 x86_64 User : akhilnew ( 1712764) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/akhilnew/public_html/ |
Upload File : |
<?php
require_once('header.php');
$keyword = isset($_GET['q']) ? strip_tags(htmlentities($_GET['q'])) : null;
echo '<div class="row head main"><div class="col s12 m12 l12 center-align"><h1>Keyword: '.$keyword.'</h1></div></div>';
$productsubjects = productsubjects('Book');
if($keyword):
echo <<<EOJ
<div class="row body">
<div class="col s12 m12 l3 hide-on-med-and-down sidebar">
<ul class="collection"><li class="collection-item main">Browse By Subject</li>{$productsubjects}</ul>
</div>
<div class="col s12 m12 l9">
EOJ;
$keyword = "%$keyword%";$status = 'enabled';
$stmt = $mysqli->prepare("SELECT productid, productcode, title, volume, image, link FROM products WHERE (title LIKE ? OR chiefeditor LIKE ? OR editors LIKE ? OR coeditor LIKE ? OR author LIKE ? OR number LIKE ? OR REPLACE(number, '-', '') LIKE ? OR hardbound_isbn LIKE ? OR REPLACE(hardbound_isbn, '-', '') LIKE ? OR paperback_isbn LIKE ? OR REPLACE(paperback_isbn, '-', '') LIKE ? OR ebook_isbn LIKE ? OR REPLACE(ebook_isbn, '-', '') LIKE ? OR unitid LIKE ?) AND (status = ?) ORDER BY productid DESC") or die('An error occurred. Please try after some time.');
$stmt->bind_param('sssssssssssssss', $keyword, $keyword, $keyword, $keyword, $keyword, $keyword, $keyword, $keyword, $keyword, $keyword, $keyword, $keyword, $keyword, $keyword, $status);
$stmt->execute();
$stmt->store_result();
if($stmt->num_rows() > 0):
echo '<div class="row books 4b">';
$stmt->bind_result($id, $productcode, $title, $volume, $image, $link);
while($stmt->fetch()):
if(!$image || !file_exists($uploadpath.$image)):
$image = 'product-ico.png';
endif;
echo '<div class="col s6 m3 l3 book">';
echo '<a href="'.$baseurl.'products/'.$id.'/'.$link.'" title="'.$title.'" class="center-align truncate"><img src="'.$imageurl.$image.'" alt="'.$title.'" /><br clear="all">'.$title.'</a>';
echo '</div>';
endwhile;
echo '</div>';
else:
echo 'Sorry, nothing matched your search terms. Please try again with different keywords.';
endif;
$stmt->close();
echo <<<EOJ
</div>
<div class="col s12 m12 l3 show-on-medium-and-down sidebar" style="display:none">
<ul class="collection"><li class="collection-item main">Browse By Subject</li>{$productsubjects}</ul>
</div>
</div>
EOJ;
else:
echo 'Sorry, nothing matched your search terms. Please try again with different keywords.';
endif;
require_once('footer.php');
?>