]> git.wh0rd.org - tt-rss.git/blame - tt-rss.php
refresh feeds frame if number of subscriptions failed
[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
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">
78if (document.addEventListener) {
79 document.addEventListener("DOMContentLoaded", init, null);
80}
81window.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
0b7cb301
AD
90<iframe id="backReqBox"></iframe>
91
0ee1d1a0
AD
92<ul id="debug_output"></ul>
93
cea10627
AD
94<div id="infoBoxShadow"><div id="infoBox">&nbsp;</div></div>
95
828a8ecc 96<table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
4062022e 97<? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
1cd17194 98<tr>
1de2b92c 99 <td colspan="2" class="headerBox" id="mainHeader">
828a8ecc 100 <table cellspacing="0" cellpadding="0" width="100%"><tr>
c93f38c4 101 <td rowspan="2" class="header" valign="middle">
8b184d75 102 <img src="<?= $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS">
828a8ecc 103 </td>
82e1fe00 104 <td valign="top" class="notifyBox">
8b184d75 105 <div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
828a8ecc 106 </td>
c93f38c4 107 </tr><tr><td class="welcomePrompt">
7d4c898a 108 <? if (!SINGLE_USER_MODE) { ?>
9f78104c
AD
109 Hello, <b><?= $_SESSION["name"] ?></b>
110 (<a href="logout.php">Logout</a>)
8cb74804
AD
111 <? } ?>
112 </td>
828a8ecc 113 </tr></table>
2c1dd701
AD
114 </td>
115</tr>
69919a24 116<? } else { ?>
82e1fe00 117<tr>
1de2b92c 118 <td class="small" id="mainHeader">
8b184d75 119 <div id="notify" class="notify_sm"><span id="notify_body">&nbsp;</span></div>
82e1fe00
AD
120 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
121 </td><td class="welcomePrompt">
122 <? if (!SINGLE_USER_MODE) { ?>
123 Hello, <b><?= $_SESSION["name"] ?></b>
124 (<a href="logout.php">Logout</a>)
125 <? } ?>
b8dc6247 126</td></tr>
da5d0d09 127<? } ?>
1cd17194 128<tr>
06300301
AD
129 <? if (get_pref($link, 'COMBINED_DISPLAY_MODE'))
130 $feeds_rowspan = 2;
131 else
132 $feeds_rowspan = 3; ?>
133 <td valign="top" rowspan="<?= $feeds_rowspan ?>" class="feeds">
28fa9253
AD
134 <table class="innerFeedTable"
135 cellspacing="0" cellpadding="0" height="100%" width="100%">
136 <tr><td>
137 <div id="dispSwitch">
138 <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
139 </div>
140 </td></tr>
141 <tr><td height="100%" width="100%" valign="top">
f69ea84d
AD
142
143 <iframe frameborder="0"
caa53a7c 144 id="feeds-frame" name="feeds-frame" class="feedsFrame"></iframe>
caa4e57f 145
f69ea84d
AD
146 </td></tr></table>
147
1cd17194 148 </td>
f0601b87 149 <td valign="top" class="headlinesToolbarBox">
e828e31e 150 <table width="100%" cellpadding="0" cellspacing="0">
5238347d 151
ac43eba1 152 <tr><td class="headlinesToolbar" id="headlinesToolbar">
5238347d 153
164f4738 154 <form id="main_toolbar_form">
5238347d 155
164f4738
AD
156 <? if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
157 <input name="query"
158 onKeyPress="return filterCR(event)"
b0005823 159 onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();">
164f4738
AD
160 <input class="button" type="submit"
161 onclick="return viewCurrentFeed(0)" value="Search">
162 &nbsp;
163 <? } ?>
f0601b87 164
86b682ce
AD
165 View:
166 <select name="view_mode" onchange="viewCurrentFeed(0, '')">
167 <option selected value="adaptive">Adaptive</option>
168 <option value="all_articles">All Articles</option>
169 <option value="marked">Starred</option>
170 <option value="unread">Unread</option>
f0601b87 171 </select>
164f4738
AD
172
173 &nbsp;Limit:
f1b9a8ee 174 <?
86b682ce 175 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
f1b9a8ee 176
86b682ce 177 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
cb1083a1 178
86b682ce
AD
179 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
180 $limits[$def_art_limit] = $def_art_limit;
181 }
1572afe5 182
86b682ce
AD
183 asort($limits);
184
185 if (!$def_art_limit) {
186 $def_art_limit = 30;
187 }
188
189 print_select_hash("limit", $def_art_limit, $limits,
190 'onchange="viewCurrentFeed(0, \'\')"');
191
192 ?>
193 </form>
1572afe5 194
86b682ce
AD
195 <!-- &nbsp;<input class="button" type="submit"
196 onclick="quickMenuGo('qmcSearch')" value="Search (tmp)"> -->
1572afe5 197
86b682ce
AD
198 &nbsp;<input class="button" type="submit"
199 onclick="viewCurrentFeed(0, 'ForceUpdate')" value="Update">
f0601b87 200
86b682ce 201 <input class="button" type="submit"
fce24838 202 onclick="catchupCurrentFeed()" value="Mark as read">
f0601b87 203
a14f82f2
AD
204 </td>
205 <td align="right">
c09ec856 206 <select id="quickMenuChooser" onchange="quickMenuChange()">
86b682ce
AD
207 <option value="qmcDefault" selected>Actions...</option>
208 <option value="qmcPrefs">Preferences</option>
209 <option value="qmcSearch">Search</option>
7a991cac
AD
210 <option disabled>--------</option>
211 <option style="color : #5050aa" disabled>Feed actions:</option>
86b682ce
AD
212 <option value="qmcAddFeed">&nbsp;&nbsp;Subscribe to feed</option>
213 <option value="qmcRemoveFeed">&nbsp;&nbsp;Unsubscribe</option>
e2f8f7b4 214 <!-- <option>Edit this feed</option> -->
7a991cac
AD
215 <option disabled>--------</option>
216 <option style="color : #5050aa" disabled>All feeds:</option>
0d51e25d 217 <? if (!ENABLE_UPDATE_DAEMON && !DAEMON_REFRESH_ONLY) { ?>
86b682ce 218 <option value="qmcUpdateFeeds">&nbsp;&nbsp;Update</option>
085a5a74 219 <? } ?>
86b682ce
AD
220 <option value="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option>
221 <option value="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option>
a24f525c
AD
222 <option disabled>--------</option>
223 <option style="color : #5050aa" disabled>Other actions:</option>
86b682ce 224 <option value="qmcAddFilter">&nbsp;&nbsp;Create filter</option>
e2f8f7b4 225 </select>
a14f82f2
AD
226 </td>
227 </tr>
f0601b87 228 </table>
386cbf27
AD
229 </td>
230</tr>
231<? if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
232<tr>
233 <td id="headlines" class="headlines2" valign="top">
234 <iframe frameborder="0" name="headlines-frame"
caa53a7c 235 id="headlines-frame" class="headlinesFrame"></iframe>
386cbf27
AD
236 </td>
237</tr>
238<? } else { ?>
239<tr>
1cd17194 240 <td id="headlines" class="headlines" valign="top">
5bfef089 241 <iframe frameborder="0" name="headlines-frame"
caa53a7c 242 id="headlines-frame" class="headlinesFrame"></iframe>
1cd17194 243 </td>
bb7cface 244</tr><tr>
1cd17194 245 <td class="content" id="content" valign="top">
5bfef089 246 <iframe frameborder="0" name="content-frame"
caa53a7c 247 id="content-frame" class="contentFrame"> </iframe>
1cd17194
AD
248 </td>
249</tr>
386cbf27 250<? } ?>
4062022e 251<? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
1cd17194 252<tr>
1de2b92c 253 <td colspan="2" class="footer" id="mainFooter">
36ae0574 254 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005-2006 Andrew Dolgov
0b615681
AD
255 <? if (WEB_DEMO_MODE) { ?>
256 <br>Running in demo mode, some functionality is disabled.
257 <? } ?>
1cd17194
AD
258 </td>
259</td>
da5d0d09 260<? } ?>
1cd17194
AD
261</table>
262
ab49d368 263<? db_close($link); ?>
1cd17194 264
97dcd654
AD
265<script type="text/javascript">
266 /* for IE */
267 function statechange() {
268 if (document.readyState == "interactive") init();
269 }
270
271 if (document.readyState) {
272 if (document.readyState == "interactive" || document.readyState == "complete") {
273 init();
274 } else {
275 document.onreadystatechange = statechange;
276 }
277 }
278</script>
279
1cd17194
AD
280</body>
281</html>