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

index 38382193d7661e93048ea5efb4f5e0c7865a0838..7ff64a89c9d9abfab0cc2509cd598e89a767590b 100644 (file)
@@ -1,4 +1,5 @@
 <?
+       // TODO cache last query results
 
        require_once "config.php";
        require_once "db.php";
index e1e9045bf66f487bcd220d1c1add50fbcdd0bc6b..8582f257ce131ee4001f7748cbfeb7bce79c50cb 100644 (file)
--- a/error.php
+++ b/error.php
@@ -1,7 +1,10 @@
-<? 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); 
+
        $ERRORS[0] = "Unknown error";
 
        $ERRORS[1] = "This program requires XmlHttpRequest " .
@@ -32,7 +35,7 @@
 </head>
 
 <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>
@@ -55,7 +58,7 @@
 
        </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