]> git.wh0rd.org - tt-rss.git/commitdiff
made prefs.php aware of compact stylesheet, close db link at the end of prefs.php...
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 17 Nov 2005 07:25:29 +0000 (08:25 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 17 Nov 2005 07:25:29 +0000 (08:25 +0100)
prefs.php
tt-rss.php

index a2e7ac31c2a88f61cdde0fe23a76f1f2ee94a66e..b4d7922d2c6776899cb76531c82b315f2fd0815a 100644 (file)
--- a/prefs.php
+++ b/prefs.php
@@ -1,7 +1,27 @@
+<?
+       require_once "version.php"; 
+       require_once "config.php";
+       require_once "db-prefs.php";
+
+       $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); 
+?>
 <html>
 <head>
        <title>Tiny Tiny RSS : Preferences</title>
        <link rel="stylesheet" href="tt-rss.css" type="text/css">
+
+       <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
+
+               <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
+
+       <? } else { ?>
+
+               <link title="Compact Stylesheet" rel="alternate stylesheet" 
+                       type="text/css" href="tt-rss_compact.css"/> 
+
+       <? } ?>
+
+       
        <script type="text/javascript" src="functions.js"></script>
        <script type="text/javascript" src="prefs.js"></script>
 
 
 <body onload="init()">
 
-<?
-       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 (get_pref($link, 'DISPLAY_HEADER')) { ?>
 <tr>
@@ -72,6 +84,7 @@
 <? } ?>
 </table>
 
+<? db_close($link); ?>
 
 </body>
 </html>
index a6a1842c6e70b7961b5d092e7f090ecba608f687..5bf78563048f41351abc7ce0d2aa3dd3a09fc33b 100644 (file)
 <? } ?>
 </table>
 
+<? db_close($link); ?>
 
 </body>
 </html>