]>
Commit | Line | Data |
---|---|---|
4062022e | 1 | <? |
7ae65adf AD |
2 | require_once "functions.php"; |
3 | ||
4 | basic_nosid_redirect_check(); | |
5 | ||
36bfab86 | 6 | require_once "sessions.php"; |
66581886 AD |
7 | |
8 | require_once "sanity_check.php"; | |
4062022e AD |
9 | require_once "version.php"; |
10 | require_once "config.php"; | |
11 | require_once "db-prefs.php"; | |
da5d0d09 | 12 | |
4062022e | 13 | $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); |
c93f38c4 | 14 | |
b8aa49bc | 15 | login_sequence($link); |
ff485f1d | 16 | |
1b758780 | 17 | $dt_add = get_script_dt_add(); |
53515ff1 | 18 | |
4062022e | 19 | ?> |
1cd17194 AD |
20 | <html> |
21 | <head> | |
22 | <title>Tiny Tiny RSS</title> | |
da5d0d09 | 23 | |
430bf183 AD |
24 | <link rel="stylesheet" type="text/css" href="tt-rss.css"> |
25 | ||
503eb349 AD |
26 | <? $user_theme = $_SESSION["theme"]; |
27 | if ($user_theme) { ?> | |
28 | <link rel="stylesheet" type="text/css" href="themes/<?= $user_theme ?>/theme.css"> | |
29 | <? } ?> | |
30 | ||
5d35cdcd AD |
31 | <? if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?> |
32 | ||
386d7b5b AD |
33 | <? $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?> |
34 | <? if ($user_css_url) { ?> | |
35 | <link type="text/css" href="<?= $user_css_url ?>"/> | |
36 | <? } ?> | |
37 | ||
4062022e | 38 | <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?> |
da5d0d09 | 39 | |
430bf183 | 40 | <link rel="stylesheet" href="tt-rss_compact.css" type="text/css"> |
da5d0d09 AD |
41 | |
42 | <? } else { ?> | |
43 | ||
430bf183 AD |
44 | <link title="Compact Stylesheet" rel="alternate stylesheet" |
45 | type="text/css" href="tt-rss_compact.css"/> | |
da5d0d09 AD |
46 | |
47 | <? } ?> | |
628eb1bd | 48 | |
a58069db AD |
49 | <script type="text/javascript" src="prototype.js"></script> |
50 | ||
53515ff1 AD |
51 | <script type="text/javascript" src="tt-rss.js?<?= $dt_add ?>"></script> |
52 | <script type="text/javascript" src="functions.js?<?= $dt_add ?>"></script> | |
d5224f0d AD |
53 | <!--[if gte IE 5.5000]> |
54 | <script type="text/javascript" src="pngfix.js"></script> | |
96737ce9 | 55 | <link rel="stylesheet" type="text/css" href="tt-rss-ie.css"> |
d5224f0d | 56 | <![endif]--> |
d76a3b03 | 57 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
362698ad AD |
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 | } | |
6b9bf6c2 AD |
63 | if (navigator.userAgent.match("Gecko") && !navigator.userAgent.match("KHTML")) { |
64 | document.write('<link rel="stylesheet" type="text/css" href="gecko.css">'); | |
65 | } | |
362698ad | 66 | </script> |
1cd17194 AD |
67 | </head> |
68 | ||
97dcd654 AD |
69 | <body> |
70 | ||
2055d4a6 | 71 | <div id="overlay"><div id="overlay_inner">Loading, please wait...</div></div> |
af106b0e AD |
72 | <div id="fatal_error"><div id="fatal_error_inner"> |
73 | <h1>Fatal Error</h1> | |
462a192b | 74 | <div id="fatal_error_msg">Unknown Error</div> |
af106b0e | 75 | </div></div> |
2055d4a6 | 76 | |
97dcd654 AD |
77 | <script type="text/javascript"> |
78 | if (document.addEventListener) { | |
79 | document.addEventListener("DOMContentLoaded", init, null); | |
80 | } | |
81 | window.onload = init; | |
82 | </script> | |
1cd17194 | 83 | |
71ad883b AD |
84 | <div id="noDaemonWarning"> |
85 | <b>Warning:</b> Update daemon is enabled in configuration, but daemon | |
86 | process is not running, which prevents all feeds from updating. Please | |
87 | start the daemon process or contact instance owner. | |
88 | </div> | |
27981ca3 | 89 | |
0ee1d1a0 AD |
90 | <ul id="debug_output"></ul> |
91 | ||
828a8ecc | 92 | <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main"> |
4062022e | 93 | <? if (get_pref($link, 'DISPLAY_HEADER')) { ?> |
1cd17194 | 94 | <tr> |
1de2b92c | 95 | <td colspan="2" class="headerBox" id="mainHeader"> |
828a8ecc | 96 | <table cellspacing="0" cellpadding="0" width="100%"><tr> |
c93f38c4 | 97 | <td rowspan="2" class="header" valign="middle"> |
5d35cdcd | 98 | <img src="<?= $theme_image_path ?>images/ttrss_logo.png" alt="logo"> |
828a8ecc | 99 | </td> |
82e1fe00 | 100 | <td valign="top" class="notifyBox"> |
036f45ab | 101 | <div id="notify"><span id="notify_body"> </span></div> |
828a8ecc | 102 | </td> |
69919a24 | 103 | |
7b5c6012 | 104 | <div id="infoBoxShadow"><div id="infoBox"> </div></div> |
69919a24 | 105 | |
c93f38c4 | 106 | </tr><tr><td class="welcomePrompt"> |
7d4c898a | 107 | <? if (!SINGLE_USER_MODE) { ?> |
9f78104c AD |
108 | Hello, <b><?= $_SESSION["name"] ?></b> |
109 | (<a href="logout.php">Logout</a>) | |
8cb74804 AD |
110 | <? } ?> |
111 | </td> | |
828a8ecc | 112 | </tr></table> |
2c1dd701 AD |
113 | </td> |
114 | </tr> | |
69919a24 | 115 | <? } else { ?> |
82e1fe00 | 116 | <tr> |
1de2b92c | 117 | <td class="small" id="mainHeader"> |
82e1fe00 AD |
118 | <div id="notify"><span id="notify_body"> </span></div> |
119 | <div id="userDlgShadow"><div id="userDlg"> </div></div> | |
120 | </td><td class="welcomePrompt"> | |
121 | <? if (!SINGLE_USER_MODE) { ?> | |
122 | Hello, <b><?= $_SESSION["name"] ?></b> | |
123 | (<a href="logout.php">Logout</a>) | |
124 | <? } ?> | |
b8dc6247 | 125 | </td></tr> |
da5d0d09 | 126 | <? } ?> |
1cd17194 | 127 | <tr> |
06300301 AD |
128 | <? if (get_pref($link, 'COMBINED_DISPLAY_MODE')) |
129 | $feeds_rowspan = 2; | |
130 | else | |
131 | $feeds_rowspan = 3; ?> | |
132 | <td valign="top" rowspan="<?= $feeds_rowspan ?>" class="feeds"> | |
28fa9253 AD |
133 | <table class="innerFeedTable" |
134 | cellspacing="0" cellpadding="0" height="100%" width="100%"> | |
135 | <tr><td> | |
136 | <div id="dispSwitch"> | |
137 | <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a> | |
138 | </div> | |
139 | </td></tr> | |
140 | <tr><td height="100%" width="100%" valign="top"> | |
f69ea84d AD |
141 | |
142 | <iframe frameborder="0" | |
caa53a7c | 143 | id="feeds-frame" name="feeds-frame" class="feedsFrame"></iframe> |
caa4e57f | 144 | |
f69ea84d AD |
145 | </td></tr></table> |
146 | ||
1cd17194 | 147 | </td> |
f0601b87 | 148 | <td valign="top" class="headlinesToolbarBox"> |
e828e31e | 149 | <table width="100%" cellpadding="0" cellspacing="0"> |
5238347d | 150 | |
ac43eba1 | 151 | <tr><td class="headlinesToolbar" id="headlinesToolbar"> |
5238347d | 152 | |
164f4738 | 153 | <form id="main_toolbar_form"> |
5238347d | 154 | |
164f4738 AD |
155 | <? if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?> |
156 | <input name="query" | |
157 | onKeyPress="return filterCR(event)" | |
b0005823 | 158 | onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();"> |
164f4738 AD |
159 | <input class="button" type="submit" |
160 | onclick="return viewCurrentFeed(0)" value="Search"> | |
161 | | |
162 | <? } ?> | |
f0601b87 | 163 | |
86b682ce AD |
164 | View: |
165 | <select name="view_mode" onchange="viewCurrentFeed(0, '')"> | |
166 | <option selected value="adaptive">Adaptive</option> | |
167 | <option value="all_articles">All Articles</option> | |
168 | <option value="marked">Starred</option> | |
169 | <option value="unread">Unread</option> | |
f0601b87 | 170 | </select> |
164f4738 AD |
171 | |
172 | Limit: | |
f1b9a8ee | 173 | <? |
86b682ce | 174 | $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All"); |
f1b9a8ee | 175 | |
86b682ce | 176 | $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT'); |
cb1083a1 | 177 | |
86b682ce AD |
178 | if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) { |
179 | $limits[$def_art_limit] = $def_art_limit; | |
180 | } | |
1572afe5 | 181 | |
86b682ce AD |
182 | asort($limits); |
183 | ||
184 | if (!$def_art_limit) { | |
185 | $def_art_limit = 30; | |
186 | } | |
187 | ||
188 | print_select_hash("limit", $def_art_limit, $limits, | |
189 | 'onchange="viewCurrentFeed(0, \'\')"'); | |
190 | ||
191 | ?> | |
192 | </form> | |
1572afe5 | 193 | |
86b682ce AD |
194 | <!-- <input class="button" type="submit" |
195 | onclick="quickMenuGo('qmcSearch')" value="Search (tmp)"> --> | |
1572afe5 | 196 | |
86b682ce AD |
197 | <input class="button" type="submit" |
198 | onclick="viewCurrentFeed(0, 'ForceUpdate')" value="Update"> | |
f0601b87 | 199 | |
86b682ce AD |
200 | <input class="button" type="submit" |
201 | onclick="viewCurrentFeed(0, 'MarkAllRead')" value="Mark as read"> | |
f0601b87 | 202 | |
a14f82f2 AD |
203 | </td> |
204 | <td align="right"> | |
c09ec856 | 205 | <select id="quickMenuChooser" onchange="quickMenuChange()"> |
86b682ce AD |
206 | <option value="qmcDefault" selected>Actions...</option> |
207 | <option value="qmcPrefs">Preferences</option> | |
208 | <option value="qmcSearch">Search</option> | |
7a991cac AD |
209 | <option disabled>--------</option> |
210 | <option style="color : #5050aa" disabled>Feed actions:</option> | |
86b682ce AD |
211 | <option value="qmcAddFeed"> Subscribe to feed</option> |
212 | <option value="qmcRemoveFeed"> Unsubscribe</option> | |
e2f8f7b4 | 213 | <!-- <option>Edit this feed</option> --> |
7a991cac AD |
214 | <option disabled>--------</option> |
215 | <option style="color : #5050aa" disabled>All feeds:</option> | |
085a5a74 | 216 | <? if (!ENABLE_UPDATE_DAEMON) { ?> |
86b682ce | 217 | <option value="qmcUpdateFeeds"> Update</option> |
085a5a74 | 218 | <? } ?> |
86b682ce AD |
219 | <option value="qmcCatchupAll"> Mark as read</option> |
220 | <option value="qmcShowOnlyUnread"> Show only unread</option> | |
a24f525c AD |
221 | <option disabled>--------</option> |
222 | <option style="color : #5050aa" disabled>Other actions:</option> | |
86b682ce | 223 | <option value="qmcAddFilter"> Create filter</option> |
e2f8f7b4 | 224 | </select> |
a14f82f2 AD |
225 | </td> |
226 | </tr> | |
f0601b87 | 227 | </table> |
386cbf27 AD |
228 | </td> |
229 | </tr> | |
230 | <? if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?> | |
231 | <tr> | |
232 | <td id="headlines" class="headlines2" valign="top"> | |
233 | <iframe frameborder="0" name="headlines-frame" | |
caa53a7c | 234 | id="headlines-frame" class="headlinesFrame"></iframe> |
386cbf27 AD |
235 | </td> |
236 | </tr> | |
237 | <? } else { ?> | |
238 | <tr> | |
1cd17194 | 239 | <td id="headlines" class="headlines" valign="top"> |
5bfef089 | 240 | <iframe frameborder="0" name="headlines-frame" |
caa53a7c | 241 | id="headlines-frame" class="headlinesFrame"></iframe> |
1cd17194 | 242 | </td> |
bb7cface | 243 | </tr><tr> |
1cd17194 | 244 | <td class="content" id="content" valign="top"> |
5bfef089 | 245 | <iframe frameborder="0" name="content-frame" |
caa53a7c | 246 | id="content-frame" class="contentFrame"> </iframe> |
1cd17194 AD |
247 | </td> |
248 | </tr> | |
386cbf27 | 249 | <? } ?> |
4062022e | 250 | <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?> |
1cd17194 | 251 | <tr> |
1de2b92c | 252 | <td colspan="2" class="footer" id="mainFooter"> |
36ae0574 | 253 | <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> © 2005-2006 Andrew Dolgov |
0b615681 AD |
254 | <? if (WEB_DEMO_MODE) { ?> |
255 | <br>Running in demo mode, some functionality is disabled. | |
256 | <? } ?> | |
1cd17194 AD |
257 | </td> |
258 | </td> | |
da5d0d09 | 259 | <? } ?> |
1cd17194 AD |
260 | </table> |
261 | ||
ab49d368 | 262 | <? db_close($link); ?> |
1cd17194 | 263 | |
97dcd654 AD |
264 | <script type="text/javascript"> |
265 | /* for IE */ | |
266 | function statechange() { | |
267 | if (document.readyState == "interactive") init(); | |
268 | } | |
269 | ||
270 | if (document.readyState) { | |
271 | if (document.readyState == "interactive" || document.readyState == "complete") { | |
272 | init(); | |
273 | } else { | |
274 | document.onreadystatechange = statechange; | |
275 | } | |
276 | } | |
277 | </script> | |
278 | ||
1cd17194 AD |
279 | </body> |
280 | </html> |