summaryrefslogtreecommitdiff
path: root/prefs.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-16 18:13:01 +0100
committerAndrew Dolgov <[email protected]>2005-11-16 18:13:01 +0100
commitf2188a89bcdcecdaa7ed914188269f9fa37dcb73 (patch)
tree7ae2d4825aaabae31b8339259200596472ea71e0 /prefs.php
parent4062022e0fd5eda07e4230cc3f39b91e77465ff2 (diff)
sql-ize prefs.php
Diffstat (limited to 'prefs.php')
-rw-r--r--prefs.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/prefs.php b/prefs.php
index 12853389e..92413e341 100644
--- a/prefs.php
+++ b/prefs.php
@@ -12,11 +12,16 @@
<body onload="init()">
-<? require_once "version.php" ?>
-<? require_once "config.php" ?>
+<?
+ require_once "version.php";
+ require_once "config.php";
+ require_once "db-prefs.php";
+
+ $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
+?>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
-<? if (DISPLAY_HEADER) { ?>
+<? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
<tr>
<td colspan="2">
<table cellspacing="0" cellpadding="0" width="100%"><tr>
@@ -36,7 +41,7 @@
onclick="selectTab('feedConfig')">
<input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering"
onclick="selectTab('filterConfig')">
- <? if (ENABLE_LABELS) { ?>
+ <? if (get_pref($link, 'ENABLE_LABELS')) { ?>
<input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor"
onclick="selectTab('labelConfig')">
<? } ?>
@@ -52,11 +57,11 @@
</td>
</tr>
-<? if (DISPLAY_FOOTER) { ?>
+<? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
<tr>
<td class="footer" colspan="2">
<a href="http://bah.spb.su/~fox/tt-rss/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
- <? if (WEB_DEMO_MODE) { ?>
+ <? if (get_pref($link, 'WEB_DEMO_MODE')) { ?>
<br>Running in demo mode, some functionality is disabled.
<? } ?>
</td>