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