'; echo $i; echo '
'; } } echo ''; ?>
$event) : ?> value(); $gdate = $event->date(); $date = $gdate->minimumDate(); $date = $date->convertToCalendar('gregorian'); $year = $date->year(); $month = max(1, $date->month()); $day = max(1, $date->day()); $xoffset = 0 + 22; $yoffset = 0 + (($year - $baseyear) * $scale) - ($scale); $yoffset = $yoffset + (($month / 12) * $scale); $yoffset = $yoffset + (($day / 30) * ($scale / 12)); $yoffset = (int) ($yoffset); $place = (int) ($yoffset / $bheight); $i = 1; $j = 0; $tyoffset = 0; while (isset($placements[$place])) { if ($i === $j) { $tyoffset = $bheight * $i; $i++; } else { $tyoffset = -1 * $bheight * $j; $j++; } $place = (int) (($yoffset + $tyoffset) / $bheight); } $yoffset += $tyoffset; $xoffset += abs($tyoffset); $placements[$place] = $yoffset; echo "
'; echo '
'; echo ''; } else { echo 'right: 3px;">'; } $col = array_search($event->record(), $individuals); if ($col === false) { // Marriage event - use the color of the husband $col = array_search($event->record()->husband(), $individuals); } if ($col === false) { // Marriage event - use the color of the wife $col = array_search($event->record()->wife(), $individuals); } $col = $col % 6; echo ''; if (count($individuals) > 6) { // We only have six colours, so show naes if more than this number echo $event->record()->fullName() . ' — '; } $record = $event->record(); echo $event->label(); echo ' — '; if ($record instanceof Individual) { echo FunctionsPrint::formatFactDate($event, $record, false, false); } elseif ($record instanceof Family) { echo $gdate->display(); if ($record->husband() && $record->husband()->getBirthDate()->isOK()) { $ageh = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->husband()->getBirthDate(), $gdate)); } else { $ageh = null; } if ($record->wife() && $record->wife()->getBirthDate()->isOK()) { $agew = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->wife()->getBirthDate(), $gdate)); } else { $agew = null; } if ($ageh && $agew) { echo ' ', I18N::translate('Husband’s age'), ' ', $ageh, ' ', I18N::translate('Wife’s age'), ' ', $agew, ''; } elseif ($ageh) { echo ' ', I18N::translate('Age'), ' ', $ageh, ''; } elseif ($agew) { echo ' ', I18N::translate('Age'), ' ', $ageh, ''; } } echo ' ' . e($desc); if ($event->place()->gedcomName() !== '') { echo ' — ' . $event->place()->shortName(); } // Print spouses names for family events if ($event->record() instanceof Family) { echo ' — ', $event->record()->fullName(), ''; } echo '
'; echo '
'; if (I18N::direction() === 'ltr') { $img = asset('css/images/dline2.png'); $ypos = '0%'; } else { $img = asset('css/images/dline.png'); $ypos = '100%'; } $dyoffset = ($yoffset - $tyoffset) + $bheight / 3; if ($tyoffset < 0) { $dyoffset = $yoffset + $bheight / 3; if (I18N::direction() === 'ltr') { $img = asset('css/images/dline.png'); $ypos = '100%'; } else { $img = asset('css/images/dline2.png'); $ypos = '0%'; } } ?>
$indi) : ?>