44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
PHP
<?php
|
|
\defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\HTML\HTMLHelper;
|
|
use Joomla\CMS\Router\Route;
|
|
use Joomla\CMS\Language\Text;
|
|
use Joomla\CMS\Session\Session;
|
|
|
|
?>
|
|
|
|
<form action="<?php echo Route::_('index.php?option=com_eis&task=display.scan'); ?>" method="post" name="adminForm" id="adminForm">
|
|
<div class="form-horizontal">
|
|
<fieldset class="adminform">
|
|
<legend><?php echo Text::_('COM_EIS_DOCUMENT_PATH'); ?></legend>
|
|
|
|
</fieldset>
|
|
<div>
|
|
<button class="btn btn-primary" type="submit"><?php echo Text::_('COM_EIS_SCAN_DOCUMENTS'); ?></button>
|
|
</div>
|
|
</div>
|
|
<?php echo HTMLHelper::_('form.token'); ?>
|
|
</form>
|
|
<?php if (!empty($this->data)) : ?>
|
|
<hr>
|
|
<h3><?php echo Text::_('COM_EIS_PDF_TREE'); ?></h3>
|
|
<ul>
|
|
<?php echo renderTree($this->data); ?>
|
|
</ul>
|
|
<?php endif; ?>
|
|
|
|
<?php
|
|
function renderTree($items)
|
|
{
|
|
$html = '';
|
|
foreach ($items as $item) {
|
|
if (isset($item['children'])) {
|
|
$html .= '<li><strong>' . htmlspecialchars($item['name']) . '</strong><ul>' . renderTree($item['children']) . '</ul></li>';
|
|
} else {
|
|
$html .= '<li>' . htmlspecialchars($item['name']) . '</li>';
|
|
}
|
|
}
|
|
return $html;
|
|
}
|
|
?>
|