books_list + books_panel
This commit is contained in:
@@ -9,14 +9,17 @@ require_once (__DIR__ . '/../internals/euler.php');
|
||||
require_once (__DIR__ . '/../internals/highscores.php');
|
||||
require_once (__DIR__ . '/../internals/mikeschergitgraph.php');
|
||||
require_once (__DIR__ . '/../internals/programs.php');
|
||||
require_once (__DIR__ . '/../internals/books.php');
|
||||
|
||||
Database::connect();
|
||||
|
||||
$consistency_blog = Blog::checkConsistency();
|
||||
$consistency_prog = Programs::checkConsistency();
|
||||
$consistency_euler = Euler::checkConsistency();
|
||||
$consistency_books = Books::checkConsistency();
|
||||
$consistency_egh = MikescherGitGraph::checkConsistency();
|
||||
$consistency_progimg = Programs::checkThumbnails();
|
||||
$consistency_bookimg = Books::checkThumbnails();
|
||||
|
||||
?>
|
||||
<?php
|
||||
@@ -68,12 +71,13 @@ function dumpConsistency($c) {
|
||||
|
||||
<div class="bc_data">
|
||||
<div class="keyvaluelist kvl_200">
|
||||
<div><span>Program thumbnails:</span> <?php dumpConsistency($consistency_progimg); ?></div>
|
||||
<div><span>ExtendedGitGraph:</span> <?php dumpConsistency($consistency_egh); ?></div>
|
||||
<div><span>Book thumbnails:</span> <span>?</span></div>
|
||||
<div><span>Program thumbnails:</span> <?php dumpConsistency($consistency_progimg); ?></div>
|
||||
<div><span>ExtendedGitGraph:</span> <?php dumpConsistency($consistency_egh); ?></div>
|
||||
<div><span>Book thumbnails:</span> <?php dumpConsistency($consistency_bookimg); ?></div>
|
||||
<div><span>Blog data:</span> <?php dumpConsistency($consistency_blog); ?></div>
|
||||
<div><span>Euler data:</span> <?php dumpConsistency($consistency_euler); ?></div>
|
||||
<div><span>Programs data:</span> <?php dumpConsistency($consistency_prog); ?></div>
|
||||
<div><span>Books data:</span> <?php dumpConsistency($consistency_books); ?></div>
|
||||
</div>
|
||||
<br/>
|
||||
<a class="button" href="/admin/cmd/createProgramThumbnails">Update Program Thumbnails</a>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
global $OPTIONS;
|
||||
|
||||
require_once (__DIR__ . '/../internals/base.php');
|
||||
require_once (__DIR__ . '/../internals/books.php');
|
||||
require_once (__DIR__ . '/../internals/programs.php');
|
||||
|
||||
$cmd = $OPTIONS['cmd'];
|
||||
@@ -35,7 +36,27 @@ if ($cmd === 'createProgramThumbnails')
|
||||
|
||||
if ($cmd === 'createBookThumbnails')
|
||||
{
|
||||
//TODO
|
||||
echo '<!DOCTYPE html>';
|
||||
echo '<html lang="en">';
|
||||
echo '<head>';
|
||||
echo '<meta charset="utf-8">';
|
||||
echo '<title>Mikescher.com - AdminExec</title>';
|
||||
echo '<link rel="icon" type="image/png" href="/data/images/favicon.png"/>';
|
||||
echo '<link rel="canonical" href="https://www.mikescher.com/logout"/>';
|
||||
echo '<meta http-equiv="refresh" content="3; url=/admin; ?>" />';
|
||||
echo '</head>';
|
||||
echo '<body>';
|
||||
|
||||
foreach (Books::listAll() as $book)
|
||||
{
|
||||
echo 'Create preview for ' . $book['title'] . '<br/>' . "\n";
|
||||
Books::createPreview($book);
|
||||
}
|
||||
echo 'Finished.' . '<br/>' . "\n";
|
||||
|
||||
echo '<script>setTimeout(function () { window.location.href = "/admin"; }, 3000);</script>';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,9 @@ $post = Blog::getBlogpost($id);
|
||||
|
||||
if ($post === NULL) httpError(404, 'Blogpost not found');
|
||||
|
||||
$isSubEuler = ($post['type'] === 'euler' && $subview !== '');
|
||||
$isSubEuler = ($post['type'] === 'euler' && $subview !== '');
|
||||
$isBaseEuler = ($post['type'] === 'euler');
|
||||
|
||||
$eulerproblem = null;
|
||||
if ($isSubEuler)
|
||||
{
|
||||
@@ -34,7 +36,7 @@ if ($eulerproblem === null) $isSubEuler = false;
|
||||
<body>
|
||||
<div id="mastercontainer">
|
||||
|
||||
<?php $HEADER_ACTIVE = ($isSubEuler ? 'euler' : 'none'); include (__DIR__ . '/../fragments/header.php'); ?>
|
||||
<?php $HEADER_ACTIVE = (($isSubEuler || $isBaseEuler) ? 'euler' : 'blog'); include (__DIR__ . '/../fragments/header.php'); ?>
|
||||
|
||||
<div id="content" class="content-responsive">
|
||||
|
||||
|
||||
62
www/pages/books_list.php
Normal file
62
www/pages/books_list.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<?php
|
||||
require_once (__DIR__ . '/../internals/base.php');
|
||||
require_once (__DIR__ . '/../internals/books.php');
|
||||
|
||||
$allbooks = Books::listAllNewestFirst();
|
||||
|
||||
?>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Mikescher.com - Converted Books</title>
|
||||
<link rel="icon" type="image/png" href="/data/images/favicon.png"/>
|
||||
<link rel="canonical" href="https://www.mikescher.com/books"/>
|
||||
<?php printCSS(); ?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mastercontainer">
|
||||
|
||||
<?php $HEADER_ACTIVE = 'books'; include (__DIR__ . '/../fragments/header.php'); ?>
|
||||
|
||||
<div id="content" class="content-responsive">
|
||||
|
||||
<div class="blockcontent booklst_content">
|
||||
|
||||
<div class="contentheader"><h1>Books/<wbr>Webserials I self-printed</h1><hr/></div>
|
||||
|
||||
<p>
|
||||
These are some books I read but that do not have an official print version.<br />
|
||||
So I type-setted them myself (mostly in <a href="http://www.lyx.org/">LyX</a>) and printed them <a href="https://www.epubli.de/">online</a>.<br />
|
||||
I do <b>not</b> own the rights of any of these books.<br />
|
||||
The LyX files and generated PDF's are public and everyone who wants can print them on his own.
|
||||
</p>
|
||||
|
||||
<?php
|
||||
|
||||
echo '<div class="booklst_parent">' . "\n";
|
||||
foreach ($allbooks as $book)
|
||||
{
|
||||
echo '<a class="booklst_entry" href="'.$book['url'].'">';
|
||||
echo ' <div class="booklst_left">';
|
||||
echo ' <img src="' . $book['preview_url'] . '" alt="Thumbnail ' . $book['title'] . '" />';
|
||||
echo ' </div>';
|
||||
echo ' <div class="booklst_right">';
|
||||
echo ' <div class="booklst_date"><span>' . $book['date'] . '</span></div>';
|
||||
echo ' <div class="booklst_title">' . htmlspecialchars($book['title']) . '</div>';
|
||||
echo ' </div>';
|
||||
echo '</a>' . "\n";
|
||||
}
|
||||
echo '</div>' . "\n";
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php include (__DIR__ . '/../fragments/footer.php'); ?>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
<?php include (__DIR__ . '/../fragments/panel_blog.php'); ?>
|
||||
|
||||
<?php include (__DIR__ . '/../fragments/panel_books.php'); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php include (__DIR__ . '/../fragments/footer.php'); ?>
|
||||
|
||||
21
www/pages/programs_download.php
Normal file
21
www/pages/programs_download.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
require_once (__DIR__ . '/../internals/base.php');
|
||||
require_once (__DIR__ . '/../internals/programs.php');
|
||||
require_once (__DIR__ . '/../internals/ParsedownCustom.php');
|
||||
|
||||
$internalname = $OPTIONS['id'];
|
||||
|
||||
$prog = Programs::getProgramByInternalName($internalname);
|
||||
if ($prog === NULL) httpError(404, 'Program not found');
|
||||
|
||||
// This page is only for old links.
|
||||
// Current version does use direct links
|
||||
|
||||
foreach (Programs::getURLs($prog) as $xurl)
|
||||
{
|
||||
if ($xurl['type'] === 'download') { header('Location: ' . $xurl['href']); exit; }
|
||||
if ($xurl['type'] === 'playstore') { header('Location: ' . $xurl['href']); exit; }
|
||||
if ($xurl['type'] === 'amazonappstore') { header('Location: ' . $xurl['href']); exit; }
|
||||
if ($xurl['type'] === 'windowsstore') { header('Location: ' . $xurl['href']); exit; }
|
||||
if ($xurl['type'] === 'itunesstore') { header('Location: ' . $xurl['href']); exit; }
|
||||
}
|
||||
Reference in New Issue
Block a user