- Add videodb PHP/MySQL media collection manager (Blu-ray, DVD, CD) - Dockerfile: PHP 8.1 + Apache with GD/mysqli/exif extensions - docker-compose.yml: app on port 6761 + MySQL 8.0 with health checks - docker-entrypoint.sh: auto-generates config.inc.php from env vars, waits for MySQL, initializes DB schema idempotently - init-db.php: CLI schema installer using app's own prefix_query() logic - Persistent volumes for DB, cache, and cover images Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
991 B
PHP
45 lines
991 B
PHP
<?php
|
|
/**
|
|
* Help Page
|
|
*
|
|
* Browses the manual
|
|
*
|
|
* @package videoDB
|
|
* @author Andreas Gohr <a.gohr@web.de>
|
|
* @version $Id: help.php,v 1.10 2004/09/20 15:15:41 andig2 Exp $
|
|
*/
|
|
|
|
require_once './core/functions.php';
|
|
|
|
function _replace_anchors_callback($matches)
|
|
{
|
|
if (!preg_match('=^https?://=',$matches[2]))
|
|
{
|
|
$matches[2] = 'help.php?page='.$matches[2];
|
|
}
|
|
return $matches[1].$matches[2].$matches[3];
|
|
}
|
|
|
|
/**
|
|
* input
|
|
*/
|
|
$page = req_string('page');
|
|
|
|
if (empty($page) || !preg_match('#^([a-z]{3,20})\.html$#', $page, $match)) $page = 'index.html';
|
|
$page = 'doc/manual/' . $page;
|
|
if (!file_exists($page)) $page = 'doc/manual/index.html';
|
|
|
|
$html = file_get_contents($page);
|
|
$html = preg_replace_callback("/(<a\s+.*?href\s*=\s*\")(.*?)(\".*?>)/is", '_replace_anchors_callback', $html);
|
|
preg_match('=<body.*?>(.*)</body>=is',$html,$matches);
|
|
$html = $matches[1];
|
|
|
|
// prepare templates
|
|
tpl_page();
|
|
|
|
$smarty->assign('helptext', $html);
|
|
|
|
// display templates
|
|
tpl_display('help.tpl');
|
|
|