Initial Commit
This commit is contained in:
22
admin/config.php
Normal file
22
admin/config.php
Normal 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);
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user