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

20
admin/init_db.php Normal file
View file

@ -0,0 +1,20 @@
<?php
$db = new SQLite3(__DIR__ . '/../mentalnet_funnies.db');
// Check if the table already exists
$result = $db->querySingle("SELECT name FROM sqlite_master WHERE type='table' AND name='comics'");
if ($result) {
echo " Table 'comics' already exists.";
} else {
$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
)");
echo "✅ Table 'comics' created.";
}
?>