]> git.wh0rd.org Git - tt-rss.git/blob - prefs.php
only append time() to scripts when using dev. version
[tt-rss.git] / prefs.php
1 <?
2         require_once "functions.php"; 
3
4         basic_nosid_redirect_check();
5
6         require_once "sessions.php";
7
8         require_once "sanity_check.php";
9         require_once "version.php"; 
10         require_once "config.php";
11         require_once "db-prefs.php";
12
13         $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); 
14
15         login_sequence($link);
16
17         $dt_add = get_script_dt_add();
18
19 ?>
20 <html>
21 <head>
22         <title>Tiny Tiny RSS : Preferences</title>
23         <link rel="stylesheet" href="tt-rss.css" type="text/css">
24
25         <?      $user_theme = $_SESSION["theme"];
26                 if ($user_theme) { ?>
27                 <link rel="stylesheet" type="text/css" href="themes/<?= $user_theme ?>/theme.css">
28         <? } ?>
29
30         <? $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
31         <? if ($user_css_url) { ?>
32                 <link type="text/css" href="<?= $user_css_url ?>"/> 
33         <? } ?>
34
35         <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
36
37                 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
38
39         <? } else { ?>
40
41                 <link title="Compact Stylesheet" rel="alternate stylesheet" 
42                         type="text/css" href="tt-rss_compact.css"/> 
43
44         <? } ?>
45
46         
47         <script type="text/javascript" src="functions.js?<?= $dt_add ?>"></script>
48         <script type="text/javascript" src="prefs.js?<?= $dt_add ?>"></script>
49
50         <!--[if gte IE 5.5000]>
51                 <script type="text/javascript" src="pngfix.js"></script>
52         <![endif]-->
53         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
54
55         <script type="text/javascript">
56                 if (navigator.userAgent.match("Opera")) {
57                         document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
58                 }
59         </script>
60 </head>
61
62 <body>
63
64 <div id="piggie" class="invisible">&nbsp;</div>
65
66 <script type="text/javascript">
67 if (document.addEventListener) {
68         document.addEventListener("DOMContentLoaded", init, null);
69 }
70 window.onload = init;
71 </script>
72
73 <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
74 <? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
75 <tr>
76         <td colspan="2">
77                 <table cellspacing="0" cellpadding="0" width="100%"><tr>
78                         <td rowspan="2" class="header" valign="middle"> 
79                                 <img src="images/ttrss_logo.png" alt="logo">    
80                         </td>
81                         <td valign="top" class="notifyBox">
82                                 <div id="notify"><span id="notify_body">&nbsp;</span></div>
83                         </td>
84                 </tr><tr><td class="welcomePrompt">
85                         <? if (!SINGLE_USER_MODE) { ?>
86                                 Hello, <b><?= $_SESSION["name"] ?></b>
87                                 (<a href="logout.php">Logout</a>)
88                         <? } ?>
89                         </td>
90                 </tr></table>
91         </td>
92 </tr>
93 <? } else { ?>
94 <tr>
95         <td class="small">
96                 <div id="notify"><span id="notify_body">&nbsp;</span></div>
97                 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
98         </td><td class="welcomePrompt">
99                 <? if (!SINGLE_USER_MODE) { ?>
100                         Hello, <b><?= $_SESSION["name"] ?></b>
101                         (<a href="logout.php">Logout</a>)
102                 <? } ?>
103 </td></tr>
104 <? } ?>
105 <tr>
106         <td class="prefsTabs" align="left" valign="bottom">
107                 <input id="genConfigTab" class="prefsTab" type="submit" value="Preferences"
108                         onclick="selectTab('genConfig')">
109                 <input id="feedConfigTab" class="prefsTab" type="submit" value="Feed Configuration"
110                         onclick="selectTab('feedConfig')">
111                 <? if (ENABLE_FEED_BROWSER) { ?>
112                 <input id="feedBrowserTab" class="prefsTab" type="submit" value="Feed Browser"
113                         onclick="selectTab('feedBrowser')">
114                 <? } ?>
115                 <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering"
116                         onclick="selectTab('filterConfig')">
117                 <? if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) { ?>
118                 <input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor"
119                         onclick="selectTab('labelConfig')">
120                 <? } ?>
121                 <? if ($_SESSION["access_level"] >= 10) { ?>
122                 <input id="userConfigTab" class="prefsTab" type="submit" value="User Manager"
123                         onclick="selectTab('userConfig')">
124                 <? } ?>         
125         </td>
126         <td class="prefsToolbar" valign="middle" align="right"> 
127                 <input type="submit" onclick="gotoMain()" class="button" value="Return to main">
128         </td>
129         </tr>
130 </tr>
131         <td id="prefContent" class="prefContent" valign="top" colspan="2">
132
133                 <p>Loading, please wait...</p>
134
135         </td>
136 </tr>
137 <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
138 <tr>
139         <td class="footer" colspan="2">
140                 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005-2006 Andrew Dolgov
141                 <? if (WEB_DEMO_MODE) { ?>
142                 <br>Running in demo mode, some functionality is disabled.
143                 <? } ?>
144         </td>
145 </td>
146 <? } ?>
147 </table>
148
149 <? db_close($link); ?>
150
151 <script type="text/javascript">
152         /* for IE */
153         function statechange() {
154                 if (document.readyState == "interactive") init();
155         }
156
157         if (document.readyState) {      
158                 if (document.readyState == "interactive" || document.readyState == "complete") {
159                         init();
160                 } else {
161                         document.onreadystatechange = statechange;
162                 }
163         }
164 </script>
165
166 </body>
167 </html>