]> git.wh0rd.org - tt-rss.git/blame - tt-rss.php
fix expiry-generated dupes (see changeset)
[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
331900c6 42 <script type="text/javascript" src="functions.js"></script>
1cd17194 43 <script type="text/javascript" src="tt-rss.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
51<body onload="init()">
52
828a8ecc 53<table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
4062022e 54<? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
1cd17194 55<tr>
b8dc6247 56 <td colspan="2" class="headerBox">
828a8ecc 57 <table cellspacing="0" cellpadding="0" width="100%"><tr>
c93f38c4 58 <td rowspan="2" class="header" valign="middle">
828a8ecc
AD
59 <img src="images/ttrss_logo.png" alt="logo">
60 </td>
82e1fe00 61 <td valign="top" class="notifyBox">
036f45ab 62 <div id="notify"><span id="notify_body">&nbsp;</span></div>
828a8ecc 63 </td>
69919a24 64
76332f3c 65 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
69919a24 66
c93f38c4 67 </tr><tr><td class="welcomePrompt">
7d4c898a 68 <? if (!SINGLE_USER_MODE) { ?>
9f78104c
AD
69 Hello, <b><?= $_SESSION["name"] ?></b>
70 (<a href="logout.php">Logout</a>)
8cb74804
AD
71 <? } ?>
72 </td>
828a8ecc 73 </tr></table>
2c1dd701
AD
74 </td>
75</tr>
69919a24 76<? } else { ?>
82e1fe00
AD
77<tr>
78 <td class="small">
79 <div id="notify"><span id="notify_body">&nbsp;</span></div>
80 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
81 </td><td class="welcomePrompt">
82 <? if (!SINGLE_USER_MODE) { ?>
83 Hello, <b><?= $_SESSION["name"] ?></b>
84 (<a href="logout.php">Logout</a>)
85 <? } ?>
b8dc6247 86</td></tr>
da5d0d09 87<? } ?>
1cd17194 88<tr>
06300301
AD
89 <? if (get_pref($link, 'COMBINED_DISPLAY_MODE'))
90 $feeds_rowspan = 2;
91 else
92 $feeds_rowspan = 3; ?>
93 <td valign="top" rowspan="<?= $feeds_rowspan ?>" class="feeds">
28fa9253
AD
94 <table class="innerFeedTable"
95 cellspacing="0" cellpadding="0" height="100%" width="100%">
96 <tr><td>
97 <div id="dispSwitch">
98 <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
99 </div>
100 </td></tr>
101 <tr><td height="100%" width="100%" valign="top">
caa4e57f 102
f69ea84d 103 <? if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?>
8143ae1f 104
5bfef089 105 <iframe frameborder="0"
6adbdbee 106 src="backend.php?op=error&msg=Loading,%20please wait..."
f69ea84d 107 id="feeds-frame" name="feeds-frame" class="feedsFrameWithActions"> </iframe>
7a991cac 108
3745788e 109 <div align="center">All feeds:
caa4e57f 110
3745788e
AD
111 <select id="allFeedsChooser">
112 <option>Update</option>
113 <option>Mark as read</option>
cbe45fa8 114 <option>Show only unread</option>
3745788e
AD
115 </select>
116
117 <input type="submit" class="button" onclick="allFeedsMenuGo()" value="Go">
27be66c3 118
3745788e 119 </div>
28fa9253 120
f69ea84d
AD
121 <? } else { ?>
122
123 <iframe frameborder="0"
124 src="backend.php?op=error&msg=Loading,%20please wait..."
125 id="feeds-frame" name="feeds-frame" class="feedsFrame"> </iframe>
caa4e57f 126
7a991cac
AD
127 <? } ?>
128
f69ea84d
AD
129 </td></tr></table>
130
1cd17194 131 </td>
f0601b87 132 <td valign="top" class="headlinesToolbarBox">
e828e31e 133 <table width="100%" cellpadding="0" cellspacing="0">
5238347d 134
ac43eba1 135 <tr><td class="headlinesToolbar" id="headlinesToolbar">
5238347d
AD
136
137 <? if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
138
139 <input id="searchbox"
f0601b87
AD
140 onblur="javascript:enableHotkeys()" onfocus="javascript:disableHotkeys()"
141 onchange="javascript:search()">
52b51244
AD
142 <select id="searchmodebox">
143 <option>This feed</option>
144 <option>All feeds</option>
145 </select>
146
ac43eba1 147 <input type="submit"
4ce19859 148 class="button" onclick="javascript:search()" value="Search">
f0601b87 149
5238347d
AD
150 &nbsp;
151
152 <? } ?>
153
154 View:
f0601b87
AD
155
156 <select id="viewbox" onchange="javascript:viewCurrentFeed(0, '')">
0ee2d12f 157 <option selected>Adaptive</option>
d6f55ce8 158 <option>All Articles</option>
f0601b87 159 <option>Starred</option>
0ee2d12f 160 <option>Unread</option>
f0601b87
AD
161 </select>
162
cb1083a1
AD
163 &nbsp;Limit:
164
165 <select id="limitbox" onchange="javascript:viewCurrentFeed(0, '')">
f1b9a8ee
AD
166
167 <?
168 $limits = array(15 => 15, 30 => 30, 60 => 60);
169
4062022e
AD
170 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
171
59b77643 172 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
4062022e 173 $limits[$def_art_limit] = $def_art_limit;
f1b9a8ee 174 }
f1b9a8ee 175
59b77643 176 asort($limits);
f1b9a8ee
AD
177 array_push($limits, 0);
178
59b77643
AD
179 if (!$def_art_limit) {
180 $def_art_limit = 30;
181 }
182
f1b9a8ee
AD
183 foreach ($limits as $key) {
184 print "<option";
4062022e 185 if ($key == $def_art_limit) { print " selected"; }
f1b9a8ee
AD
186 print ">";
187
188 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
189
190 print "</option>";
191 } ?>
4062022e 192
cb1083a1
AD
193 </select>
194
1572afe5
AD
195<!-- &nbsp;Selection:
196
197 <select id="headopbox">
198 <option id="hopToggleRead">Toggle (un)read</option>
199 </select>
200
201 <input class="button" type="submit" onclick="headopGo()" value="Go"> -->
202
ac43eba1
AD
203 &nbsp;Feed: <input class="button" type="submit"
204 onclick="javascript:viewCurrentFeed(0, 'ForceUpdate')" value="Update">
f0601b87 205
a7de14fc 206 <input class="button" type="submit" id="btnMarkFeedAsRead"
1572afe5 207 onclick="javascript:viewCurrentFeed(0, 'MarkAllRead')" value="Mark as read">
f0601b87 208
a14f82f2
AD
209 </td>
210 <td align="right">
6de5d056 211 Actions: <select id="quickMenuChooser">
cbe45fa8 212 <option id="qmcPrefs" selected>Preferences...</option>
27da8b1e 213 <option id="qmcSearch">Search...</option>
7a991cac
AD
214 <option disabled>--------</option>
215 <option style="color : #5050aa" disabled>Feed actions:</option>
a24f525c
AD
216 <option id="qmcAddFeed">&nbsp;&nbsp;Add new feed...</option>
217 <option id="qmcRemoveFeed">&nbsp;&nbsp;Remove this feed...</option>
e2f8f7b4 218 <!-- <option>Edit this feed</option> -->
7a991cac
AD
219 <option disabled>--------</option>
220 <option style="color : #5050aa" disabled>All feeds:</option>
cbe45fa8
AD
221 <option id="qmcUpdateFeeds">&nbsp;&nbsp;Update</option>
222 <option id="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option>
223 <option id="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option>
a24f525c
AD
224 <option disabled>--------</option>
225 <option style="color : #5050aa" disabled>Other actions:</option>
226 <option id="qmcAddFilter">&nbsp;&nbsp;Add filter...</option>
e2f8f7b4
AD
227 </select>
228 <input type="submit" class="button" onclick="quickMenuGo()" value="Go">
a14f82f2
AD
229 </td>
230 </tr>
f0601b87 231 </table>
386cbf27
AD
232 </td>
233</tr>
234<? if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
235<tr>
236 <td id="headlines" class="headlines2" valign="top">
237 <iframe frameborder="0" name="headlines-frame"
238 id="headlines-frame" class="headlinesFrame"
239 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
240 </td>
241</tr>
242<? } else { ?>
243<tr>
1cd17194 244 <td id="headlines" class="headlines" valign="top">
5bfef089 245 <iframe frameborder="0" name="headlines-frame"
e828e31e
AD
246 id="headlines-frame" class="headlinesFrame"
247 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
1cd17194 248 </td>
bb7cface 249</tr><tr>
1cd17194 250 <td class="content" id="content" valign="top">
5bfef089
AD
251 <iframe frameborder="0" name="content-frame"
252 id="content-frame" class="contentFrame"> </iframe>
1cd17194
AD
253 </td>
254</tr>
386cbf27 255<? } ?>
4062022e 256<? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
1cd17194 257<tr>
e828e31e 258 <td colspan="2" class="footer">
7325509d 259 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
0b615681
AD
260 <? if (WEB_DEMO_MODE) { ?>
261 <br>Running in demo mode, some functionality is disabled.
262 <? } ?>
1cd17194
AD
263 </td>
264</td>
da5d0d09 265<? } ?>
1cd17194
AD
266</table>
267
ab49d368 268<? db_close($link); ?>
1cd17194
AD
269
270</body>
271</html>