2008-03-14 10:32:00 +00:00
|
|
|
<?php
|
2010-09-26 22:06:31 +00:00
|
|
|
/**
|
|
|
|
* Show a list of the last searches.
|
|
|
|
*
|
|
|
|
* SemanticScuttle - your social bookmark manager.
|
|
|
|
*
|
|
|
|
* PHP version 5.
|
|
|
|
*
|
|
|
|
* @category Bookmarking
|
|
|
|
* @package SemanticScuttle
|
|
|
|
* @subcategory Templates
|
|
|
|
* @author Benjamin Huynh-Kim-Bang <mensonge@users.sourceforge.net>
|
|
|
|
* @author Christian Weiske <cweiske@cweiske.de>
|
|
|
|
* @author Eric Dane <ericdane@users.sourceforge.net>
|
|
|
|
* @license GPL http://www.gnu.org/licenses/gpl.html
|
|
|
|
* @link http://sourceforge.net/projects/semanticscuttle
|
|
|
|
*/
|
2008-12-05 07:25:04 +00:00
|
|
|
/* Service creation: only useful services are created */
|
2010-09-26 22:06:31 +00:00
|
|
|
$searchhistoryservice = SemanticScuttle_Service_Factory::get('SearchHistory');
|
2008-03-14 10:32:00 +00:00
|
|
|
|
2010-09-26 22:06:31 +00:00
|
|
|
$lastSearches = $searchhistoryservice->getAllSearches(
|
|
|
|
'all', NULL, 3, NULL, true, false
|
|
|
|
);
|
2008-03-14 10:32:00 +00:00
|
|
|
|
|
|
|
if ($lastSearches && count($lastSearches) > 0) {
|
|
|
|
?>
|
|
|
|
|
|
|
|
<h2><?php echo T_('Last Searches'); ?></h2>
|
|
|
|
<div id="searches">
|
2010-09-26 22:07:36 +00:00
|
|
|
<table>
|
2008-03-14 10:32:00 +00:00
|
|
|
<?php
|
|
|
|
foreach ($lastSearches as $row) {
|
2010-09-26 22:07:36 +00:00
|
|
|
echo ' <tr><td>';
|
2010-09-26 22:06:31 +00:00
|
|
|
echo '<a href="'
|
|
|
|
. htmlspecialchars(createURL('search', $range.'/'.$row['shTerms']))
|
|
|
|
. '">';
|
2010-10-09 10:09:25 +00:00
|
|
|
echo htmlspecialchars($row['shTerms']);
|
2008-03-14 10:32:00 +00:00
|
|
|
echo '</a>';
|
2010-09-26 22:06:31 +00:00
|
|
|
echo ' <span title="'
|
|
|
|
. T_('Number of bookmarks for this query')
|
|
|
|
. '">(' . $row['shNbResults'] . ')</span>';
|
|
|
|
echo '</td></tr>' . "\n";
|
2008-03-14 10:32:00 +00:00
|
|
|
}
|
|
|
|
//echo '<tr><td><a href="'.createURL('users').'">...</a></td></tr>';
|
|
|
|
?>
|
|
|
|
|
2010-09-26 22:07:36 +00:00
|
|
|
</table>
|
2008-03-14 10:32:00 +00:00
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|