2024-04-04 23:15:58 +00:00
|
|
|
<?php
|
2024-04-06 02:14:24 +00:00
|
|
|
spl_autoload_register(function ($class) {
|
|
|
|
$file = implode(DIRECTORY_SEPARATOR, [ __DIR__, 'lib', "$class.php" ]);
|
|
|
|
if (file_exists($file)) {
|
|
|
|
require $file;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
});
|
2024-04-04 23:15:58 +00:00
|
|
|
|
2024-04-06 02:14:24 +00:00
|
|
|
require 'user-config.php';
|
2024-04-04 23:15:58 +00:00
|
|
|
|
2024-04-06 02:14:24 +00:00
|
|
|
Data::ensureDb();
|
2024-04-05 00:49:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Render the page title
|
|
|
|
* @param string $title The title of the page being displayed
|
|
|
|
*/
|
|
|
|
function page_head(string $title): void {
|
|
|
|
?><!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<title><?=$title?> | Feed Reader Central</title>
|
|
|
|
</head>
|
|
|
|
<body><?php
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render the end of the page
|
|
|
|
*/
|
|
|
|
function page_foot(): void {
|
|
|
|
?></body></html><?php
|
|
|
|
}
|