]> git.wh0rd.org - tt-rss.git/blob - prefs.php
rework hideOrShowFeeds(): now hides empty categories should be compatible with brows...
[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 <? if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?>
31
32 <? $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
33 <? if ($user_css_url) { ?>
34 <link type="text/css" href="<?= $user_css_url ?>"/>
35 <? } ?>
36
37 <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
38
39 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
40
41 <? } else { ?>
42
43 <link title="Compact Stylesheet" rel="alternate stylesheet"
44 type="text/css" href="tt-rss_compact.css"/>
45
46 <? } ?>
47
48 <script type="text/javascript" src="prototype.js"></script>
49
50 <script type="text/javascript" src="functions.js?<?= $dt_add ?>"></script>
51 <script type="text/javascript" src="prefs.js?<?= $dt_add ?>"></script>
52
53 <div id="infoBoxShadow"><div id="infoBox">BAH</div></div>
54
55 <!--[if gte IE 5.5000]>
56 <script type="text/javascript" src="pngfix.js"></script>
57 <link rel="stylesheet" type="text/css" href="tt-rss-ie.css">
58 <![endif]-->
59 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
60
61 <script type="text/javascript">
62 if (navigator.userAgent.match("Opera")) {
63 document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
64 }
65 if (navigator.userAgent.match("Gecko") && !navigator.userAgent.match("KHTML")) {
66 document.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
67 }
68 </script>
69 </head>
70
71 <body>
72
73 <div id="piggie" class="invisible">&nbsp;</div>
74
75 <script type="text/javascript">
76 if (document.addEventListener) {
77 document.addEventListener("DOMContentLoaded", init, null);
78 }
79 window.onload = init;
80 </script>
81
82 <ul id="debug_output"></ul>
83
84 <div id="fatal_error"><div id="fatal_error_inner">
85 <h1>Fatal Error</h1>
86 <div id="fatal_error_msg">Unknown Error</div>
87 </div></div>
88
89 <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
90 <? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
91 <tr>
92 <td colspan="2">
93 <table cellspacing="0" cellpadding="0" width="100%"><tr>
94 <td rowspan="2" class="header" valign="middle">
95 <img src="<?= $theme_image_path ?>images/ttrss_logo.png" alt="logo">
96 </td>
97 <td valign="top" class="notifyBox">
98 <div id="notify"><span id="notify_body">&nbsp;</span></div>
99 </td>
100 </tr><tr><td class="welcomePrompt">
101 <? if (!SINGLE_USER_MODE) { ?>
102 Hello, <b><?= $_SESSION["name"] ?></b>
103 (<a href="logout.php">Logout</a>)
104 <? } ?>
105 </td>
106 </tr></table>
107 </td>
108 </tr>
109 <? } else { ?>
110 <tr>
111 <td class="small">
112 <div id="notify"><span id="notify_body">&nbsp;</span></div>
113 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
114 </td><td class="welcomePrompt">
115 <? if (!SINGLE_USER_MODE) { ?>
116 Hello, <b><?= $_SESSION["name"] ?></b>
117 (<a href="logout.php">Logout</a>)
118 <? } ?>
119 </td></tr>
120 <? } ?>
121 <tr>
122 <td class="prefsTabs" align="left" valign="bottom">
123 <input id="genConfigTab" class="prefsTab" type="submit" value="Preferences"
124 onclick="selectTab('genConfig')">
125 <input id="feedConfigTab" class="prefsTab" type="submit" value="My Feeds"
126 onclick="selectTab('feedConfig')">
127 <? if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) { ?>
128 <input id="feedBrowserTab" class="prefsTab" type="submit" value="Other Feeds"
129 onclick="selectTab('feedBrowser')">
130 <? } ?>
131 <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering"
132 onclick="selectTab('filterConfig')">
133 <? if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) { ?>
134 <input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor"
135 onclick="selectTab('labelConfig')">
136 <? } ?>
137 <? if ($_SESSION["access_level"] >= 10) { ?>
138 <input id="userConfigTab" class="prefsTab" type="submit" value="User Manager"
139 onclick="selectTab('userConfig')">
140 <? } ?>
141 </td>
142 <td class="prefsToolbar" valign="middle" align="right">
143 <input type="submit" onclick="gotoMain()" class="button" value="Return to main">
144 </td>
145 </tr>
146 </tr>
147 <td id="prefContent" class="prefContent" valign="top" colspan="2">
148
149 <p>Loading, please wait...</p>
150
151 </td>
152 </tr>
153 <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
154 <tr>
155 <td class="footer" colspan="2">
156 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005-2006 Andrew Dolgov
157 <? if (WEB_DEMO_MODE) { ?>
158 <br>Running in demo mode, some functionality is disabled.
159 <? } ?>
160 </td>
161 </td>
162 <? } ?>
163 </table>
164
165 <? db_close($link); ?>
166
167 <script type="text/javascript">
168 /* for IE */
169 function statechange() {
170 if (document.readyState == "interactive") init();
171 }
172
173 if (document.readyState) {
174 if (document.readyState == "interactive" || document.readyState == "complete") {
175 init();
176 } else {
177 document.onreadystatechange = statechange;
178 }
179 }
180 </script>
181
182 </body>
183 </html>