Json config file

This commit is contained in:
Michał Gdula 2022-09-20 15:47:23 +00:00
parent 7f5aab165e
commit 1d4c25af28
10 changed files with 76 additions and 150 deletions

View file

@ -0,0 +1,33 @@
{
"website_name": "Only Legs",
"website_description": "A simple PHP gallery with multiple users in mind",
"tos": "When making an account and interacting with the login/signup page, you agree to have your IP logged for banning purposes.",
"welcome_msg": [
"*internal screaming*",
"Don't forget to drink water!",
"Bruh",
"Fluffy made this!",
"maybe",
"I'm gay",
"I wish we were better strangers.",
"<span style='color:#ffff00;'>Just like Minecraft!</span>",
"If I were you, I'd run now",
"This is the part where I kill you",
"SILICA GEL \"DO NOT EAT\".",
"This was supposed to be a simple project",
"AAAAAAAAAAAAAAAAAAAA",
"Let me out",
"nice",
"I'm glad you're here",
"The weather is dry",
"Need me a man 👀",
"Gods die too.",
"Eat hotchip and lie",
"The world will not be destroyed by those who do evil, but by those who watch them and do nothing."
],
"license":"GPL 3.0",
"version": "22.09.20",
"user_name": "Michal",
"is_testing": true,
"upload_max": "20"
}

View file

@ -8,22 +8,13 @@
| the default background and accent colour
|-------------------------------------------------------------
*/
$user_import = file_get_contents("app/settings/user_settings.json");
$user_import = file_get_contents(__DIR__."/manifest.json");
$user_settings = json_decode($user_import, true);
foreach ($user_settings->data as $settings_list) {
foreach ($settings_list->website as $website) {
foreach ($website->database as $database) {
foreach ($user_settings->data as $website) {
foreach ($website->debug as $debug) {
}
foreach ($website->debug as $debug) {
}
foreach ($website->plugins as $plugins) {
}
}
}
$database = $user_settings["website"]["database"];
$debug = $user_settings["website"]["debug"];
$plugins = $user_settings["website"]["plugins"];

View file

@ -1,50 +0,0 @@
{
"website": {
"name": "Only Legs",
"description": "A simple gallery with multiple users in mind",
"welcome_msg": [
"*internal screaming*",
"Don't forget to drink water!",
"Bruh",
"Fluffy made this!",
"maybe",
"I'm gay",
"I wish we were better strangers.",
"<span style='color:#ffff00;'>Just like Minecraft!</span>",
"If I were you, I'd run now",
"This is the part where I kill you",
"SILICA GEL \"DO NOT EAT\".",
"This was supposed to be a simple project",
"AAAAAAAAAAAAAAAAAAAA",
"Let me out",
"nice",
"I'm glad you're here",
"The weather is dry",
"Need me a man 👀",
"Gods die too.",
"Eat hotchip and lie",
"The world will not be destroyed by those who do evil, but by those who watch them and do nothing."
],
"license":"GPL 3.0",
"database": {
"ip": "192.168.0.79:3306",
"username": "uwu",
"password": "fennec621",
"database": "gallery"
},
"debug": {
"testing": true,
"version": "22.09.12"
}
},
"plugins": {
"sniffle": {
"location": "Sniffle/sniffle.js",
"using": true
},
"flyout": {
"location": "Flyout/flyout.js",
"using": true
}
}
}