]> git.wh0rd.org - tt-rss.git/blame - tt-rss.php
debug element is topmost
[tt-rss.git] / tt-rss.php
CommitLineData
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
4062022e 17?>
1cd17194
AD
18<html>
19<head>
20 <title>Tiny Tiny RSS</title>
da5d0d09 21
430bf183
AD
22 <link rel="stylesheet" type="text/css" href="tt-rss.css">
23
503eb349
AD
24 <? $user_theme = $_SESSION["theme"];
25 if ($user_theme) { ?>
26 <link rel="stylesheet" type="text/css" href="themes/<?= $user_theme ?>/theme.css">
27 <? } ?>
28
386d7b5b
AD
29 <? $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
30 <? if ($user_css_url) { ?>
31 <link type="text/css" href="<?= $user_css_url ?>"/>
32 <? } ?>
33
4062022e 34 <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
da5d0d09 35
430bf183 36 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
da5d0d09
AD
37
38 <? } else { ?>
39
430bf183
AD
40 <link title="Compact Stylesheet" rel="alternate stylesheet"
41 type="text/css" href="tt-rss_compact.css"/>
da5d0d09
AD
42
43 <? } ?>
628eb1bd 44
1cd17194 45 <script type="text/javascript" src="tt-rss.js"></script>
97dcd654 46 <script type="text/javascript" src="functions.js"></script>
d5224f0d
AD
47 <!--[if gte IE 5.5000]>
48 <script type="text/javascript" src="pngfix.js"></script>
96737ce9 49 <link rel="stylesheet" type="text/css" href="tt-rss-ie.css">
d5224f0d 50 <![endif]-->
d76a3b03 51 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
362698ad
AD
52
53 <script type="text/javascript">
54 if (navigator.userAgent.match("Opera")) {
55 document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
56 }
57 </script>
1cd17194
AD
58</head>
59
97dcd654
AD
60<body>
61
2055d4a6
AD
62<div id="overlay"><div id="overlay_inner">Loading, please wait...</div></div>
63
97dcd654
AD
64<script type="text/javascript">
65if (document.addEventListener) {
66 document.addEventListener("DOMContentLoaded", init, null);
67}
68window.onload = init;
69</script>
1cd17194 70
27981ca3
AD
71<? if (ENABLE_UPDATE_DAEMON && !file_is_locked("update_daemon.lock")) { ?>
72 <div class="warning">
73 <b>Warning:</b> Update daemon is enabled in configuration, but daemon
74 process is not running, which prevents all feeds from updating. Please
75 start the daemon process or contact instance owner.
76 </div>
77<? } ?>
78
0ee1d1a0
AD
79<ul id="debug_output"></ul>
80
828a8ecc 81<table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
4062022e 82<? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
1cd17194 83<tr>
1de2b92c 84 <td colspan="2" class="headerBox" id="mainHeader">
828a8ecc 85 <table cellspacing="0" cellpadding="0" width="100%"><tr>
c93f38c4 86 <td rowspan="2" class="header" valign="middle">
828a8ecc
AD
87 <img src="images/ttrss_logo.png" alt="logo">
88 </td>
82e1fe00 89 <td valign="top" class="notifyBox">
036f45ab 90 <div id="notify"><span id="notify_body">&nbsp;</span></div>
828a8ecc 91 </td>
69919a24 92
76332f3c 93 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
69919a24 94
c93f38c4 95 </tr><tr><td class="welcomePrompt">
7d4c898a 96 <? if (!SINGLE_USER_MODE) { ?>
9f78104c
AD
97 Hello, <b><?= $_SESSION["name"] ?></b>
98 (<a href="logout.php">Logout</a>)
8cb74804
AD
99 <? } ?>
100 </td>
828a8ecc 101 </tr></table>
2c1dd701
AD
102 </td>
103</tr>
69919a24 104<? } else { ?>
82e1fe00 105<tr>
1de2b92c 106 <td class="small" id="mainHeader">
82e1fe00
AD
107 <div id="notify"><span id="notify_body">&nbsp;</span></div>
108 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
109 </td><td class="welcomePrompt">
110 <? if (!SINGLE_USER_MODE) { ?>
111 Hello, <b><?= $_SESSION["name"] ?></b>
112 (<a href="logout.php">Logout</a>)
113 <? } ?>
b8dc6247 114</td></tr>
da5d0d09 115<? } ?>
1cd17194 116<tr>
06300301
AD
117 <? if (get_pref($link, 'COMBINED_DISPLAY_MODE'))
118 $feeds_rowspan = 2;
119 else
120 $feeds_rowspan = 3; ?>
121 <td valign="top" rowspan="<?= $feeds_rowspan ?>" class="feeds">
28fa9253
AD
122 <table class="innerFeedTable"
123 cellspacing="0" cellpadding="0" height="100%" width="100%">
124 <tr><td>
125 <div id="dispSwitch">
126 <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
127 </div>
128 </td></tr>
129 <tr><td height="100%" width="100%" valign="top">
f69ea84d
AD
130
131 <iframe frameborder="0"
132 src="backend.php?op=error&msg=Loading,%20please wait..."
133 id="feeds-frame" name="feeds-frame" class="feedsFrame"> </iframe>
caa4e57f 134
f69ea84d
AD
135 </td></tr></table>
136
1cd17194 137 </td>
f0601b87 138 <td valign="top" class="headlinesToolbarBox">
e828e31e 139 <table width="100%" cellpadding="0" cellspacing="0">
5238347d 140
ac43eba1 141 <tr><td class="headlinesToolbar" id="headlinesToolbar">
5238347d
AD
142
143 <? if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
144
145 <input id="searchbox"
b0005823 146 onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();">
52b51244
AD
147 <select id="searchmodebox">
148 <option>This feed</option>
b0005823
AD
149 <? if (get_pref($link, 'ENABLE_FEED_CATS')) { ?>
150 <option>This category</option>
151 <? } ?>
52b51244
AD
152 <option>All feeds</option>
153 </select>
154
ac43eba1 155 <input type="submit"
4ce19859 156 class="button" onclick="javascript:search()" value="Search">
f0601b87 157
5238347d
AD
158 &nbsp;
159
160 <? } ?>
161
162 View:
f0601b87
AD
163
164 <select id="viewbox" onchange="javascript:viewCurrentFeed(0, '')">
0ee2d12f 165 <option selected>Adaptive</option>
d6f55ce8 166 <option>All Articles</option>
f0601b87 167 <option>Starred</option>
0ee2d12f 168 <option>Unread</option>
f0601b87
AD
169 </select>
170
cb1083a1
AD
171 &nbsp;Limit:
172
173 <select id="limitbox" onchange="javascript:viewCurrentFeed(0, '')">
f1b9a8ee
AD
174
175 <?
176 $limits = array(15 => 15, 30 => 30, 60 => 60);
177
4062022e
AD
178 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
179
59b77643 180 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
4062022e 181 $limits[$def_art_limit] = $def_art_limit;
f1b9a8ee 182 }
f1b9a8ee 183
59b77643 184 asort($limits);
f1b9a8ee
AD
185 array_push($limits, 0);
186
59b77643
AD
187 if (!$def_art_limit) {
188 $def_art_limit = 30;
189 }
190
f1b9a8ee
AD
191 foreach ($limits as $key) {
192 print "<option";
4062022e 193 if ($key == $def_art_limit) { print " selected"; }
f1b9a8ee
AD
194 print ">";
195
196 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
197
198 print "</option>";
199 } ?>
4062022e 200
cb1083a1
AD
201 </select>
202
1572afe5
AD
203<!-- &nbsp;Selection:
204
205 <select id="headopbox">
206 <option id="hopToggleRead">Toggle (un)read</option>
207 </select>
208
209 <input class="button" type="submit" onclick="headopGo()" value="Go"> -->
210
ac43eba1
AD
211 &nbsp;Feed: <input class="button" type="submit"
212 onclick="javascript:viewCurrentFeed(0, 'ForceUpdate')" value="Update">
f0601b87 213
a7de14fc 214 <input class="button" type="submit" id="btnMarkFeedAsRead"
1572afe5 215 onclick="javascript:viewCurrentFeed(0, 'MarkAllRead')" value="Mark as read">
f0601b87 216
a14f82f2
AD
217 </td>
218 <td align="right">
c09ec856
AD
219 <select id="quickMenuChooser" onchange="quickMenuChange()">
220 <option id="qmcDefault" selected>Actions...</option>
221 <option id="qmcPrefs">Preferences</option>
222 <option id="qmcSearch">Search</option>
7a991cac
AD
223 <option disabled>--------</option>
224 <option style="color : #5050aa" disabled>Feed actions:</option>
c09ec856
AD
225 <option id="qmcAddFeed">&nbsp;&nbsp;Add new feed</option>
226 <option id="qmcRemoveFeed">&nbsp;&nbsp;Remove this feed</option>
e2f8f7b4 227 <!-- <option>Edit this feed</option> -->
7a991cac
AD
228 <option disabled>--------</option>
229 <option style="color : #5050aa" disabled>All feeds:</option>
085a5a74 230 <? if (!ENABLE_UPDATE_DAEMON) { ?>
cbe45fa8 231 <option id="qmcUpdateFeeds">&nbsp;&nbsp;Update</option>
085a5a74
AD
232 <? } ?>
233 <option id="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option>
cbe45fa8 234 <option id="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option>
a24f525c
AD
235 <option disabled>--------</option>
236 <option style="color : #5050aa" disabled>Other actions:</option>
c09ec856 237 <option id="qmcAddFilter">&nbsp;&nbsp;Add filter</option>
e2f8f7b4 238 </select>
a14f82f2
AD
239 </td>
240 </tr>
f0601b87 241 </table>
386cbf27
AD
242 </td>
243</tr>
244<? if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
245<tr>
246 <td id="headlines" class="headlines2" valign="top">
247 <iframe frameborder="0" name="headlines-frame"
248 id="headlines-frame" class="headlinesFrame"
249 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
250 </td>
251</tr>
252<? } else { ?>
253<tr>
1cd17194 254 <td id="headlines" class="headlines" valign="top">
5bfef089 255 <iframe frameborder="0" name="headlines-frame"
e828e31e
AD
256 id="headlines-frame" class="headlinesFrame"
257 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
1cd17194 258 </td>
bb7cface 259</tr><tr>
1cd17194 260 <td class="content" id="content" valign="top">
5bfef089
AD
261 <iframe frameborder="0" name="content-frame"
262 id="content-frame" class="contentFrame"> </iframe>
1cd17194
AD
263 </td>
264</tr>
386cbf27 265<? } ?>
4062022e 266<? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
1cd17194 267<tr>
1de2b92c 268 <td colspan="2" class="footer" id="mainFooter">
36ae0574 269 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005-2006 Andrew Dolgov
0b615681
AD
270 <? if (WEB_DEMO_MODE) { ?>
271 <br>Running in demo mode, some functionality is disabled.
272 <? } ?>
1cd17194
AD
273 </td>
274</td>
da5d0d09 275<? } ?>
1cd17194
AD
276</table>
277
ab49d368 278<? db_close($link); ?>
1cd17194 279
97dcd654
AD
280<script type="text/javascript">
281 /* for IE */
282 function statechange() {
283 if (document.readyState == "interactive") init();
284 }
285
286 if (document.readyState) {
287 if (document.readyState == "interactive" || document.readyState == "complete") {
288 init();
289 } else {
290 document.onreadystatechange = statechange;
291 }
292 }
293</script>
294
1cd17194
AD
295</body>
296</html>