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\PageController; 19use Michelf\MarkdownExtra; 20 21define('WT_SCRIPT_NAME', 'admin_site_readme.php'); 22 23require './includes/session.php'; 24 25$controller = new PageController; 26$controller 27 ->restrictAccess(Auth::isAdmin()) 28 ->setPageTitle(I18N::translate('README documentation')) 29 ->pageHeader(); 30 31// The readme file contains code-quality badges before the first header 32$readme = file_get_contents('README.md'); 33$readme = preg_replace('/.*(?=# webtrees)/s', '', $readme); 34 35?> 36<ol class="breadcrumb small"> 37 <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li> 38 <li class="active"><?php echo $controller->getPageTitle(); ?></li> 39</ol> 40 41<h1><?php echo $controller->getPageTitle(); ?></h1> 42 43<div class="markdown" dir="ltr" lang="en"> 44 <?php echo MarkdownExtra::defaultTransform($readme); ?> 45</div> 46