funnies/admin/config.php

22 lines
587 B
PHP
Raw Normal View History

2025-10-25 15:10:38 -04:00
<?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);
}
?>