2008-03-14 11:32:00 +01:00
|
|
|
<?php
|
2010-09-27 00:06:31 +02: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 08:25:04 +01:00
|
|
|
/* Service creation: only useful services are created */
|
2010-09-27 00:06:31 +02:00
|
|
|
$searchhistoryservice = SemanticScuttle_Service_Factory::get('SearchHistory');
|
2008-03-14 11:32:00 +01:00
|
|
|
|
2010-09-27 00:06:31 +02:00
|
|
|
$lastSearches = $searchhistoryservice->getAllSearches(
|
|
|
|
'all', NULL, 3, NULL, true, false
|
|
|
|
);
|
2008-03-14 11:32:00 +01:00
|
|
|
|
|
|
|
if ($lastSearches && count($lastSearches) > 0) {
|
|
|
|
?>
|
|
|
|
|
|
|
|
<h2><?php echo T_('Last Searches'); ?></h2>
|
|
|
|
<div id="searches">
|
2010-09-27 00:07:36 +02:00
|
|
|
<table>
|
2008-03-14 11:32:00 +01:00
|
|
|
<?php
|
|
|
|
foreach ($lastSearches as $row) {
|
2010-09-27 00:07:36 +02:00
|
|
|
echo ' <tr><td>';
|
2010-09-27 00:06:31 +02:00
|
|
|
echo '<a href="'
|
|
|
|
. htmlspecialchars(createURL('search', $range.'/'.$row['shTerms']))
|
|
|
|
. '">';
|
2010-10-09 12:09:25 +02:00
|
|
|
echo htmlspecialchars($row['shTerms']);
|
2008-03-14 11:32:00 +01:00
|
|
|
echo '</a>';
|
2010-09-27 00:06:31 +02:00
|
|
|
echo ' <span title="'
|
|
|
|
. T_('Number of bookmarks for this query')
|
|
|
|
. '">(' . $row['shNbResults'] . ')</span>';
|
|
|
|
echo '</td></tr>' . "\n";
|
2008-03-14 11:32:00 +01:00
|
|
|
}
|
|
|
|
//echo '<tr><td><a href="'.createURL('users').'">...</a></td></tr>';
|
|
|
|
?>
|
|
|
|
|
2010-09-27 00:07:36 +02:00
|
|
|
</table>
|
2008-03-14 11:32:00 +01:00
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|