1<?php 2/** 3 * webtrees: online genealogy 4 * Copyright (C) 2019 webtrees development team 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */ 16namespace Fisharebest\Webtrees; 17 18use Fisharebest\Webtrees\Controller\HourglassController; 19 20define('WT_SCRIPT_NAME', 'hourglass_ajax.php'); 21require './includes/session.php'; 22 23$controller = new HourglassController; 24 25header('Content-type: text/html; charset=UTF-8'); 26 27if (Filter::get('type') === 'desc') { 28 $controller->dgenerations = 1; 29 $controller->printDescendency($controller->root, 0, false); 30} else { 31 $controller->generations = 1; 32 $controller->printPersonPedigree($controller->root, 0); 33} 34