<?php // Autoload classes \\ $_dir = rtrim(dirname(__FILE__), '\\/') . DIRECTORY_SEPARATOR; require $_dir . '../vendor/autoload.php'; require $_dir . 'constants.php'; use App\About; use App\PostgresDbWrapper; use App\RegExp; // Database connection & Required Functionality Checking \\ try { if (PHP_OS === 'WINNT') { $inipath = 'in/to ' . php_ini_loaded_file() . ' then restart ' . About::getServerSoftware(); } if (About::iniGet('short_open_tag') !== true) { throw new Exception("Short open tags (<?) are disabled\nUncomment/add the line <strong>short_open_tag=On</strong> {$inipath} to fix"); } if (!function_exists('curl_init')) { throw new Exception("cURL extension is disabled or not installed\n" . (PHP_OS !== 'WINNT' ? "Run <strong>sudo apt-get install php7.0-curl</strong>" : "Uncomment/add the line <strong>extension=php_curl.dll</strong> {$inipath}") . ' to fix'); } if (!function_exists('imagecreatefrompng')) { throw new Exception("GD extension is disabled or not installed" . (PHP_OS !== 'WINNT' ? "\nRun <strong>sudo apt-get install php7.0-gd</strong> to fix" : "")); } if (!class_exists('DOMDocument', false)) { throw new Exception("XML extension is disabled or not installed" . (PHP_OS !== 'WINNT' ? "\nRun <strong>sudo apt-get install php7.0-xml</strong> to fix" : '')); } if (!function_exists('mb_substr') || !function_exists('mb_strlen')) { throw new Exception("mbstring extension is disabled or not installed" . (PHP_OS !== 'WINNT' ? "\nRun <strong>sudo apt-get install php7.0-mbstring</strong> to fix" : '')); } if (!function_exists('pdo_drivers')) { throw new Exception("PDO extension is disabled or not installed\nThe site requires PHP 7.0+ to function, please upgrade your server.");
<div id="content"> <img src="/img/logo.svg" alt="MLP Vector Club Website Logo"> <h1><a href="http://mlp-vectorclub.deviantart.com/">MLP-VectorClub</a> Website</h1> <p>Handling requests, reservations & the Color Guide since 2015</p> <?php use App\About; use App\CoreUtils; $about = file_get_contents(INCPATH . 'views/about.html'); if (!empty($about)) { echo str_replace(GITHUB_URL . '/blob/master/www', '', $about); $osver = About::getServerOS(); $phpver = About::getPHPVersion(); $server = About::getServerSoftware(); $pgver = About::getPostgresVersion(); $esver = About::getElasticSearchVersion(); $elastic = isset($esver) ? ", ElasticSearch {$esver}" : ''; echo <<<HTML <strong>Server Software:</strong> {$osver}, PHP {$phpver}, {$server}, PostgreSQL {$pgver}{$elastic}<br> </section> HTML; } else { echo CoreUtils::notice('warn', 'This section went missing due to a bug, and will be restored ASAP. Until then the section\'s contents are available at <a href="' . GITHUB_URL . '#attributions">' . GITHUB_URL . '#attributions</a>'); } ?> <section> <h2>Statistics</h2> <p>Here you can see various graphs about the site. The information below is cached to reduce server load, you can see when each graph was last updated below their title.</p> <div id="stats"> <div class="stats-posts"> <h3>Posts in the last 2 months</h3> <div class="stats-wrapper">