1
0
www.mikescher.com/www/commands/site_createBookThumbnails.php

35 lines
1.1 KiB
PHP
Raw Normal View History

<?php
2020-01-16 13:21:14 +01:00
require_once (__DIR__ . '/../internals/website.php');
2020-01-16 13:21:14 +01:00
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
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>';
2020-01-16 13:21:14 +01:00
foreach ($SITE->modules->Books()->listAll() as $book)
{
echo 'Create preview for ' . $book['title'] . '<br/>' . "\n";
2022-10-15 17:13:55 +02:00
try {
$SITE->modules->Books()->createPreview($book);
} catch (Exception $e) {
echo '<strong>Failed to create preview for ' . $book['title'] . ':' . $e->getMessage() . '</strong><br/>' . "\n";
}
}
echo 'Finished.' . '<br/>' . "\n";
echo '<script>setTimeout(function () { window.location.href = "/admin"; }, 3000);</script>';
echo '</body>';
2019-12-29 00:02:38 +01:00
echo '</html>';