]> git.wh0rd.org Git - tt-rss.git/commitdiff
sql-ize prefs.php
authorAndrew Dolgov <fox@bah.spb.su>
Wed, 16 Nov 2005 17:13:01 +0000 (18:13 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Wed, 16 Nov 2005 17:13:01 +0000 (18:13 +0100)
prefs.php

index 12853389ec4a9d7d0bc186cb85453c6dbb32920b..92413e3417afa51883c1f7606bc2794c07586d21 100644 (file)
--- a/prefs.php
+++ b/prefs.php
 
 <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')">
                <? } ?>
 
        </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>