VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/webtrees/resources/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/webtrees/resources/views/fact-place.phtml
<?php

declare(strict_types=1);

use Fisharebest\Webtrees\Date;
use Fisharebest\Webtrees\Fact;
use Fisharebest\Webtrees\GedcomRecord;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Module\ModuleMapLinkInterface;
use Fisharebest\Webtrees\Place;
use Fisharebest\Webtrees\Registry;
use Fisharebest\Webtrees\Services\ModuleService;

/**
 * @var bool         $cal_link
 * @var Fact         $fact
 * @var GedcomRecord $record
 * @var bool         $time
 */

?>
<div class="wt-fact-place">
    <?php if (preg_match('/\n(2 PLAC.*(?:\n[3-9].*)*)/', $fact->gedcom(), $match) === 1) : ?>
        <?php $placerec = $match[1]; ?>
        <?= $fact->place()->fullName($fact->id() !== 'histo') ?>

        <?php if (preg_match_all('/\n3 (?:_HEB|ROMN|FONE) (.+)/', $placerec, $matches) === 1) : ?>
            <?php foreach ($matches[1] as $match) : ?>
                — <?= (new Place($match, $record->tree()))->fullName() ?>
            <?php endforeach ?>
        <?php endif ?>

        <?php if ($fact->latitude() !== null && $fact->longitude() !== null) : ?>
            <div class="wt-fact-coordinates">
                <span class="label"><?= I18N::translate('Latitude') ?>: </span><?= $fact->latitude() ?>
                <span class="label"><?= I18N::translate('Longitude') ?>: </span><?= $fact->longitude()?>
                <?= app(ModuleService::class)->findByInterface(ModuleMapLinkInterface::class)->map(fn (ModuleMapLinkInterface $module): string => ' ' . $module->mapLink($fact))->implode('') ?>
            </div>
        <?php endif ?>

        <?php if (preg_match_all('/\n(3 NOTE\b.*(?:\n[^3].*)*)/', $placerec, $matches, PREG_SET_ORDER) > 0) : ?>
            <?php foreach ($matches as $match) : ?>
                <?= view('fact-gedcom-fields', ['gedcom' => $match[1], 'parent' => $fact->tag() . ':PLAC:NOTE', 'tree' => $record->tree()]) ?>
            <?php endforeach ?>
        <?php endif ?>
    <?php endif ?>

    <?php if (preg_match('/2 TEMP (.+)/', $fact->gedcom(), $match)) : ?>
        <?= Registry::elementFactory()->make($fact->tag() . ':TEMP')->labelValue($match[1], $record->tree()) ?>
    <?php endif ?>

    <?php if (preg_match('/2 STAT (.+)/', $fact->gedcom(), $match)) : ?>
        <?= Registry::elementFactory()->make($fact->tag() . ':STAT')->labelValue($match[1], $record->tree()) ?>

        <?php if (preg_match('/3 DATE (.+)/', $fact->gedcom(), $match)) : ?>
            <?= Registry::elementFactory()->make($fact->tag() . ':STAT:DATE')->labelValue((new Date($match[1]))->display(), $record->tree()) ?>
        <?php endif ?>
    <?php endif ?>
</div>

VaKeR 2022