| 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/www/cropandweed/search/ |
Upload File : |
<?php
require_once('../header.php');
echo $page_content;
$keyword = isset($_GET['q']) ? strip_tags(sanitize(escape($_GET['q']))) : NULL;
if($keyword):
$like = "%$keyword%";
$stmt = $mysqli->prepare("SELECT archivesid, doi, doistatus, year, volume, issue, title, abstract, file, lockfile, pagenumber, locked, views, downloads FROM archives WHERE (refnumber = ? OR STRIP_TAGS(title) LIKE ? OR authorname LIKE ? OR abstract LIKE ?) AND (status = ?) ORDER BY creation DESC") or die("An error occurred. Please try after some time.");
$stmt->bind_param('sssss', $keyword, $like, $like, $like, $article_status);
$stmt->execute();
$stmt->store_result();
$count_rows = $stmt->num_rows();
else:
$count_rows = 0;
endif;
if($count_rows > 0):
echo '<div class="fluid">Results: <b>' . number_format($count_rows, 0) . '</b>, Query: <b>' . $keyword . '</b></div>';
echo <<<EOJ
<table border="0" cellpadding="0" cellspacing="2" class="fluid articles">
<tr>
<th align="center" valign="middle" class="xs">S. No.</th>
<th align="left" valign="middle">Index Table</th>
<th align="center" valign="middle" class="sm">Abstract</th>
<th align="center" valign="middle" class="sm">Download PDF</th>
</tr>
EOJ;
$snum = 1;
$stmt->bind_result($archivesid, $doi, $doistatus, $year, $volume, $issue, $title, $abstract, $file, $lockfile, $pagenumber, $locked, $views, $downloads);
while($stmt->fetch()):
$title = strip_tags(html_entity_decode($title), '<i><em><sup><sub><img>');
$abstractlink = ($abstract) ? '<a href="'.$baseurl.'archives/?year='.$year.'&vol='.$volume.'&issue='.$issue.'&article_id='.$archivesid.'">Abstract</a>' : '';
$abstractlink = $locked == 'disabled' ? $abstractlink : 'Locked';
$params = $year.'/vol'.$volume.'issue'.$issue.'/';
$filelink = (($file && file_exists($archiveuploadpath.$params.$file))) ? '<a href="'.$archivesdir.$params.$file.'" id="'.$archivesid.'" class="download" target="_blank">PDF</a>' : '';
$filelink = ($lockfile == 'Y') ? 'Locked' : $filelink;
echo '<tr>';
echo '<td align="center" valign="top">'.$snum++.'</td>';
echo '<td align="left" valign="top">';
echo $title;
if($doi && $doistatus === 'enabled'):
echo '<div class="body" style="margin-top:10px"><b>DOI:</b> <a href="https://doi.org/'.$doi.'" target="_blank">'.$doi.'</a></div>';
endif;
echo '<div class="foot">Pages: '.$pagenumber.' | Views: '.$views.' | Downloads: '.$downloads.'</div>';
echo '<div class="foot"><b>'.$year.'</b>, Vol. <b>'.$volume.'</b>, Issue <b>'.$issue.'</b></div>';
echo '</td>';
echo '<td align="center" valign="top">'.$abstractlink.'</td>';
echo '<td align="center" valign="top">'.$filelink.'</td>';
echo '</tr>';
endwhile;
$stmt->close();
echo '</table>';
else:
echo 'Sorry, nothing matched your search terms. Please try again with different keywords.';
endif;
require_once('../footer.php');
?>