Files
EIS/com_eis/tmpl/main/default.php
2025-07-29 10:33:26 +02:00

49 lines
1.6 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>
<div class="control-group">
<label class="control-label" for="docpath"><?php echo Text::_('COM_EIS_DOCUMENT_PATH_LABEL'); ?></label>
<div class="controls">
<input type="text" name="docpath" id="docpath" size="60" value="/var/www/vhosts/ts-it24.net/stbv.ts-it24.net/pdf/" />
</div>
</div>
</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;
}
?>