2017-12-30 23:11:51 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<?php
|
|
|
|
require_once (__DIR__ . '/../internals/base.php');
|
|
|
|
require_once (__DIR__ . '/../internals/blog.php');
|
|
|
|
|
|
|
|
|
|
|
|
$id = $OPTIONS['id'];
|
|
|
|
$subview = $OPTIONS['subview'];
|
|
|
|
|
|
|
|
$post = Blog::getBlogpost($id);
|
|
|
|
|
2018-01-03 17:28:08 +01:00
|
|
|
if ($post === NULL) httpError(404, 'Blogpost not found');
|
2017-12-30 23:11:51 +01:00
|
|
|
|
2018-01-27 18:13:38 +01:00
|
|
|
$isSubEuler = ($post['type'] === 'euler' && $subview !== '');
|
|
|
|
$isBaseEuler = ($post['type'] === 'euler');
|
|
|
|
|
2018-01-26 22:27:22 +01:00
|
|
|
$eulerproblem = null;
|
|
|
|
if ($isSubEuler)
|
|
|
|
{
|
|
|
|
require_once(__DIR__ . '/../internals/euler.php');
|
|
|
|
$eulerproblem = Euler::getEulerProblemFromStrIdent($subview);
|
|
|
|
}
|
|
|
|
if ($eulerproblem === null) $isSubEuler = false;
|
|
|
|
|
2017-12-30 23:11:51 +01:00
|
|
|
?>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2018-01-26 22:27:22 +01:00
|
|
|
<title>Mikescher.com - <?php echo ($isSubEuler ? $eulerproblem['title'] : $post['title']); ?></title>
|
2017-12-30 23:11:51 +01:00
|
|
|
<meta name="google-site-verification" content="pZOhmjeJcQbRMNa8xRLam4dwJ2oYwMwISY1lRKreSSs"/>
|
|
|
|
<link rel="icon" type="image/png" href="/data/images/favicon.png"/>
|
2018-01-03 17:28:08 +01:00
|
|
|
<?php printCSS(); ?>
|
2018-01-26 22:27:22 +01:00
|
|
|
<?php echo '<link rel="canonical" href="' . ($isSubEuler ? $eulerproblem['canonical'] : $post['canonical']) . '"/>'; ?>
|
2018-01-02 19:41:41 +01:00
|
|
|
|
2017-12-30 23:11:51 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="mastercontainer">
|
|
|
|
|
2018-01-27 18:13:38 +01:00
|
|
|
<?php $HEADER_ACTIVE = (($isSubEuler || $isBaseEuler) ? 'euler' : 'blog'); include (__DIR__ . '/../fragments/header.php'); ?>
|
2017-12-30 23:11:51 +01:00
|
|
|
|
|
|
|
<div id="content" class="content-responsive">
|
|
|
|
|
|
|
|
<div class="blockcontent">
|
|
|
|
|
|
|
|
<div class="contentheader"><h1><?php echo htmlspecialchars($post['title']); ?></h1><hr/></div>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
if ($post['type'] === 'plain') {
|
|
|
|
|
|
|
|
include (__DIR__ . '/../fragments/blogview_plain.php');
|
|
|
|
|
|
|
|
} elseif ($post['type'] === 'markdown') {
|
|
|
|
|
|
|
|
include (__DIR__ . '/../fragments/blogview_markdown.php');
|
|
|
|
|
2017-12-31 02:05:50 +01:00
|
|
|
} elseif ($post['type'] === 'bfjoust') {
|
2017-12-30 23:11:51 +01:00
|
|
|
|
2017-12-31 02:05:50 +01:00
|
|
|
include (__DIR__ . '/../fragments/blogview_bfjoust.php');
|
2017-12-30 23:11:51 +01:00
|
|
|
|
|
|
|
} elseif ($post['type'] === 'euler') {
|
|
|
|
|
2017-12-31 17:53:59 +01:00
|
|
|
if ($subview === '') include (__DIR__ . '/../fragments/blogview_euler_list.php');
|
|
|
|
else include (__DIR__ . '/../fragments/blogview_euler_single.php');
|
2017-12-30 23:11:51 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php include (__DIR__ . '/../fragments/footer.php'); ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|