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