2012-12-14 07:53:13 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Implementation of IndexInfo view
|
|
|
|
*
|
|
|
|
* @category DMS
|
2013-02-14 11:10:53 +00:00
|
|
|
* @package SeedDMS
|
2012-12-14 07:53:13 +00:00
|
|
|
* @license GPL 2
|
|
|
|
* @version @version@
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
|
|
|
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
|
|
|
* 2010-2012 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Include parent class
|
|
|
|
*/
|
2021-04-18 05:08:00 +00:00
|
|
|
//require_once("class.Bootstrap.php");
|
2012-12-14 07:53:13 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class which outputs the html page for IndexInfo view
|
|
|
|
*
|
|
|
|
* @category DMS
|
2013-02-14 11:10:53 +00:00
|
|
|
* @package SeedDMS
|
2012-12-14 07:53:13 +00:00
|
|
|
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
|
|
|
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
|
|
|
* 2010-2012 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
2021-04-18 05:08:00 +00:00
|
|
|
class SeedDMS_View_IndexInfo extends SeedDMS_Theme_Style {
|
2012-12-14 07:53:13 +00:00
|
|
|
|
|
|
|
function show() { /* {{{ */
|
|
|
|
$dms = $this->params['dms'];
|
|
|
|
$user = $this->params['user'];
|
|
|
|
$index = $this->params['index'];
|
|
|
|
|
|
|
|
$this->htmlStartPage(getMLText('fulltext_info'));
|
|
|
|
$this->globalNavigation();
|
|
|
|
$this->contentStart();
|
|
|
|
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
|
|
|
$this->contentHeading(getMLText("fulltext_info"));
|
|
|
|
|
|
|
|
$numDocs = $index->count();
|
2014-03-25 17:51:08 +00:00
|
|
|
echo "<legend>".$numDocs." ".getMLText('documents')."</legend>";
|
|
|
|
$this->contentContainerStart();
|
2012-12-14 07:53:13 +00:00
|
|
|
for ($id = 0; $id < $numDocs; $id++) {
|
|
|
|
if (!$index->isDeleted($id)) {
|
2020-09-10 13:26:40 +00:00
|
|
|
if($hit = $index->getDocument($id))
|
|
|
|
echo "<span title=\"".$hit->document_id."\">".htmlspecialchars($hit->title)."</span>\n";
|
2012-12-14 07:53:13 +00:00
|
|
|
}
|
|
|
|
}
|
2014-03-25 17:51:08 +00:00
|
|
|
$this->contentContainerEnd();
|
2012-12-14 07:53:13 +00:00
|
|
|
|
|
|
|
$terms = $index->terms();
|
2014-03-25 17:51:08 +00:00
|
|
|
echo "<legend>".count($terms)." Terms</legend>";
|
|
|
|
// echo "<pre>";
|
|
|
|
$field = '';
|
2012-12-14 07:53:13 +00:00
|
|
|
foreach($terms as $term) {
|
2014-03-25 17:51:08 +00:00
|
|
|
if($field != $term->field) {
|
|
|
|
if($field)
|
|
|
|
$this->contentContainerEnd();
|
|
|
|
echo "<h5>".htmlspecialchars($term->field)."</h5>";
|
|
|
|
$this->contentContainerStart();
|
|
|
|
$field = $term->field;
|
|
|
|
}
|
2020-09-12 10:53:56 +00:00
|
|
|
echo htmlspecialchars($term->text)."\n";
|
|
|
|
// echo "<span title=\"".$term->_occurrence."\">".htmlspecialchars($term->text)."</span>\n";
|
2012-12-14 07:53:13 +00:00
|
|
|
}
|
|
|
|
$this->contentContainerEnd();
|
2014-03-25 17:51:08 +00:00
|
|
|
// echo "</pre>";
|
|
|
|
|
2016-03-15 07:30:53 +00:00
|
|
|
$this->contentEnd();
|
2012-12-14 07:53:13 +00:00
|
|
|
$this->htmlEndPage();
|
|
|
|
} /* }}} */
|
|
|
|
}
|
|
|
|
?>
|