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