mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-02 08:23:13 +00:00
Adding Json config
This commit is contained in:
parent
8713a6321a
commit
b261368a9b
18 changed files with 285 additions and 519 deletions
29
app/settings/settings.php
Normal file
29
app/settings/settings.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
/*
|
||||
|-------------------------------------------------------------
|
||||
| Settings (decode)
|
||||
|-------------------------------------------------------------
|
||||
| This is for decoding the settings Json, used throughout
|
||||
| most of the website. Used for settings things such as
|
||||
| the default background and accent colour
|
||||
|-------------------------------------------------------------
|
||||
*/
|
||||
$user_import = file_get_contents("app/settings/user_settings.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 ($website->debug as $debug) {
|
||||
|
||||
}
|
||||
foreach ($website->plugins as $plugins) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
$database = $user_settings["website"]["database"];
|
||||
$debug = $user_settings["website"]["debug"];
|
||||
$plugins = $user_settings["website"]["plugins"];
|
Loading…
Add table
Add a link
Reference in a new issue