2018-01-27 14:21:34 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
global $OPTIONS;
|
|
|
|
|
|
|
|
require_once (__DIR__ . '/../internals/base.php');
|
2018-01-27 18:13:38 +01:00
|
|
|
require_once (__DIR__ . '/../internals/books.php');
|
2018-01-27 14:21:34 +01:00
|
|
|
require_once (__DIR__ . '/../internals/programs.php');
|
|
|
|
|
|
|
|
$cmd = $OPTIONS['cmd'];
|
|
|
|
|
|
|
|
if ($cmd === 'createProgramThumbnails')
|
|
|
|
{
|
|
|
|
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"/>';
|
2019-11-02 17:54:22 +01:00
|
|
|
echo '<meta http-equiv="refresh" content="3;url=/admin;"/>';
|
2018-01-27 14:21:34 +01:00
|
|
|
echo '</head>';
|
|
|
|
echo '<body>';
|
|
|
|
|
|
|
|
foreach (Programs::listAll() as $prog)
|
|
|
|
{
|
|
|
|
echo 'Create preview for ' . $prog['name'] . '<br/>' . "\n";
|
|
|
|
Programs::createPreview($prog);
|
|
|
|
}
|
|
|
|
echo 'Finished.' . '<br/>' . "\n";
|
|
|
|
|
|
|
|
echo '<script>setTimeout(function () { window.location.href = "/admin"; }, 3000);</script>';
|
|
|
|
echo '</body>';
|
|
|
|
echo '</html>';
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($cmd === 'createBookThumbnails')
|
|
|
|
{
|
2018-01-27 18:13:38 +01:00
|
|
|
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>';
|
2018-01-27 14:21:34 +01:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
die('Wrong command.');
|