Initial Commit

This commit is contained in:
mrkmntal 2025-10-25 15:10:38 -04:00
commit 1d85bf6663
7 changed files with 377 additions and 0 deletions

22
admin/config.php Normal file
View file

@ -0,0 +1,22 @@
<?php
// --- basic config ---
$db_file = __DIR__ . '/../mentalnet_funnies.db';
// password hash (generate with: php -r "echo password_hash('yourpassword', PASSWORD_DEFAULT);")
$ADMIN_PASS_HASH = 'pwhashgoeshere';
// create db if not exists
if (!file_exists($db_file)) {
$db = new SQLite3($db_file);
$db->exec("CREATE TABLE comics (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
filename TEXT NOT NULL,
description TEXT,
date_added DATETIME DEFAULT CURRENT_TIMESTAMP
)");
} else {
$db = new SQLite3($db_file);
}
?>