diff options
author | Malf Furious <m@lfurio.us> | 2016-01-01 16:58:34 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-01-01 16:58:34 -0500 |
commit | 03dd6556041ec11efe86f36d53db38c02d4362a7 (patch) | |
tree | e2565c1e1dc7ba5de7342b7b6199d970c60dae94 /app/class/setting.class.php | |
parent | c36269f976cb8287f1b6e17d4b0a958e4e9741da (diff) | |
parent | 0a92a484554f214d0e499c872807e6b0a3e865ad (diff) | |
download | scrott-03dd6556041ec11efe86f36d53db38c02d4362a7.tar.gz scrott-03dd6556041ec11efe86f36d53db38c02d4362a7.zip |
Merge branch 'datastructures' into dev
Diffstat (limited to 'app/class/setting.class.php')
-rw-r--r-- | app/class/setting.class.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/app/class/setting.class.php b/app/class/setting.class.php new file mode 100644 index 0000000..ea5fac3 --- /dev/null +++ b/app/class/setting.class.php @@ -0,0 +1,28 @@ +<?php + +require_once "class/framework.class.php"; + +/* + * Scrott administrative settings + */ +class Setting extends Framework +{ + /* + * Helper function for getting setting values from the database + */ + static function getValue($key) + { + $db = parent::getDbConnection(); + $escdKey = $db->esc($key); + + $query = "SELECT `value` FROM `setting` WHERE `key` = '" . $escdKey . "'"; + $res = $db->query($query); + + if (count($res) == 0) + return false; + + return $res[0]['value']; + } +} + +?> |