]> git.wh0rd.org - tt-rss.git/blame - tt-rss.php
add back-req iframe
[tt-rss.git] / tt-rss.php
CommitLineData
1d3a17c7 1<?php
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?>
6b4163cb
AD
20<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
21 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1cd17194
AD
22<html>
23<head>
24 <title>Tiny Tiny RSS</title>
da5d0d09 25
430bf183
AD
26 <link rel="stylesheet" type="text/css" href="tt-rss.css">
27
1d3a17c7 28 <?php $user_theme = $_SESSION["theme"];
503eb349 29 if ($user_theme) { ?>
1d3a17c7
AD
30 <link rel="stylesheet" type="text/css" href="themes/<?php echo $user_theme ?>/theme.css">
31 <?php } ?>
503eb349 32
1d3a17c7 33 <?php if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?>
5d35cdcd 34
1d3a17c7
AD
35 <?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
36 <?php if ($user_css_url) { ?>
37 <link type="text/css" href="<?php echo $user_css_url ?>"/>
38 <?php } ?>
386d7b5b 39
1d3a17c7 40 <?php if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
da5d0d09 41
430bf183 42 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
da5d0d09 43
1d3a17c7 44 <?php } else { ?>
da5d0d09 45
430bf183
AD
46 <link title="Compact Stylesheet" rel="alternate stylesheet"
47 type="text/css" href="tt-rss_compact.css"/>
da5d0d09 48
1d3a17c7 49 <?php } ?>
628eb1bd 50
c0266b88
AD
51 <link rel="shortcut icon" type="image/png" href="images/favicon.png">
52
a58069db
AD
53 <script type="text/javascript" src="prototype.js"></script>
54
1d3a17c7
AD
55 <script type="text/javascript" src="tt-rss.js?<?php echo $dt_add ?>"></script>
56 <script type="text/javascript" src="functions.js?<?php echo $dt_add ?>"></script>
6b4163cb
AD
57 <script type="text/javascript" src="feedlist.js?<?php echo $dt_add ?>"></script>
58 <script type="text/javascript" src="viewfeed.js?<?php echo $dt_add ?>"></script>
59
d5224f0d
AD
60 <!--[if gte IE 5.5000]>
61 <script type="text/javascript" src="pngfix.js"></script>
96737ce9 62 <link rel="stylesheet" type="text/css" href="tt-rss-ie.css">
d5224f0d 63 <![endif]-->
d76a3b03 64 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
362698ad
AD
65
66 <script type="text/javascript">
67 if (navigator.userAgent.match("Opera")) {
68 document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
69 }
6b9bf6c2
AD
70 if (navigator.userAgent.match("Gecko") && !navigator.userAgent.match("KHTML")) {
71 document.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
72 }
362698ad 73 </script>
1cd17194
AD
74</head>
75
97dcd654
AD
76<body>
77
5d59d634
AD
78<iframe id="backReqBox"></iframe>
79
80e4dc34 80<div id="overlay"><div id="overlay_inner">Loading, please wait...</div></div>
6b4163cb 81
33b8cab4
AD
82<div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
83
af106b0e
AD
84<div id="fatal_error"><div id="fatal_error_inner">
85 <h1>Fatal Error</h1>
462a192b 86 <div id="fatal_error_msg">Unknown Error</div>
af106b0e 87</div></div>
2055d4a6 88
97dcd654
AD
89<script type="text/javascript">
90if (document.addEventListener) {
91 document.addEventListener("DOMContentLoaded", init, null);
92}
93window.onload = init;
94</script>
1cd17194 95
71ad883b
AD
96<div id="noDaemonWarning">
97 <b>Warning:</b> Update daemon is enabled in configuration, but daemon
98 process is not running, which prevents all feeds from updating. Please
99 start the daemon process or contact instance owner.
100</div>
27981ca3 101
0ee1d1a0
AD
102<ul id="debug_output"></ul>
103
cea10627
AD
104<div id="infoBoxShadow"><div id="infoBox">&nbsp;</div></div>
105
80e4dc34
AD
106<?php if (get_pref($link, 'DISPLAY_HEADER')) { ?>
107 <div id="header">
108 <?php if (!SINGLE_USER_MODE) { ?>
109 <div style="float : right">
110 Hello, <b><?php echo $_SESSION["name"] ?></b>
111 (<a href="logout.php">Logout</a>)
112 </div>
113 <?php } ?>
114 <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS">
115 </div>
116<?php } else if (!SINGLE_USER_MODE) { ?>
117 <div style="float : right">
118 Hello, <b><?php echo $_SESSION["name"] ?></b>
119 (<a href="logout.php">Logout</a>)
120 </div>
121<?php } ?>
caa4e57f 122
6b4163cb
AD
123<div id="feeds-holder">
124 <div id="dispSwitch">
125 <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
126 </div>
127 <div id="feeds-frame">-fixme-</div>
128</div>
f69ea84d 129
6b4163cb 130<div id="toolbar">
5238347d 131
6b4163cb
AD
132 <div style="float : right">
133 <select id="quickMenuChooser" onchange="quickMenuChange()">
134 <option value="qmcDefault" selected>Actions...</option>
135 <option value="qmcPrefs">Preferences</option>
136 <option value="qmcSearch">Search</option>
137 <option disabled>--------</option>
138 <option style="color : #5050aa" disabled>Feed actions:</option>
139 <option value="qmcAddFeed">&nbsp;&nbsp;Subscribe to feed</option>
140 <option value="qmcRemoveFeed">&nbsp;&nbsp;Unsubscribe</option>
141 <!-- <option>Edit this feed</option> -->
142 <option disabled>--------</option>
143 <option style="color : #5050aa" disabled>All feeds:</option>
144 <?php if (!ENABLE_UPDATE_DAEMON && !DAEMON_REFRESH_ONLY) { ?>
145 <option value="qmcUpdateFeeds">&nbsp;&nbsp;Update</option>
146 <?php } ?>
147 <option value="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option>
148 <option value="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option>
149 <option disabled>--------</option>
150 <option style="color : #5050aa" disabled>Other actions:</option>
151 <option value="qmcAddFilter">&nbsp;&nbsp;Create filter</option>
152 </select>
153 </div>
5238347d 154
164f4738 155 <form id="main_toolbar_form">
5238347d 156
1d3a17c7 157 <?php if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
164f4738
AD
158 <input name="query"
159 onKeyPress="return filterCR(event)"
b0005823 160 onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();">
164f4738
AD
161 <input class="button" type="submit"
162 onclick="return viewCurrentFeed(0)" value="Search">
163 &nbsp;
1d3a17c7 164 <?php } ?>
f0601b87 165
86b682ce
AD
166 View:
167 <select name="view_mode" onchange="viewCurrentFeed(0, '')">
168 <option selected value="adaptive">Adaptive</option>
169 <option value="all_articles">All Articles</option>
170 <option value="marked">Starred</option>
171 <option value="unread">Unread</option>
f0601b87 172 </select>
164f4738
AD
173
174 &nbsp;Limit:
1d3a17c7 175 <?php
86b682ce 176 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
f1b9a8ee 177
86b682ce 178 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
cb1083a1 179
86b682ce
AD
180 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
181 $limits[$def_art_limit] = $def_art_limit;
182 }
1572afe5 183
86b682ce
AD
184 asort($limits);
185
186 if (!$def_art_limit) {
187 $def_art_limit = 30;
188 }
189
190 print_select_hash("limit", $def_art_limit, $limits,
191 'onchange="viewCurrentFeed(0, \'\')"');
192
193 ?>
194 </form>
1572afe5 195
86b682ce
AD
196 <!-- &nbsp;<input class="button" type="submit"
197 onclick="quickMenuGo('qmcSearch')" value="Search (tmp)"> -->
1572afe5 198
86b682ce 199 &nbsp;<input class="button" type="submit"
f0e2373a 200 onclick="viewCurrentFeed('ForceUpdate')" value="Update">
f0601b87 201
86b682ce 202 <input class="button" type="submit"
fce24838 203 onclick="catchupCurrentFeed()" value="Mark as read">
f0601b87 204
6b4163cb
AD
205 </div>
206
80e4dc34 207<?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
9251df44 208 <div id="headlines-frame" class="headlines_normal"><div class="whiteBox">&nbsp;</div></div>
80e4dc34
AD
209 <div id="content-frame">&nbsp;</div>
210<?php } else { ?>
9251df44 211 <div id="headlines-frame" class="headlines_cdm"><div class="whiteBox">&nbsp;</div></div>
80e4dc34 212<?php } ?>
6b4163cb 213
80e4dc34
AD
214<?php if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
215 <div id="footer">
216 <a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> v<?php echo VERSION ?> &copy; 2005-2006 Andrew Dolgov
217 </div>
218<?php } ?>
1cd17194 219
1d3a17c7 220<?php db_close($link); ?>
1cd17194 221
97dcd654
AD
222<script type="text/javascript">
223 /* for IE */
224 function statechange() {
225 if (document.readyState == "interactive") init();
226 }
227
228 if (document.readyState) {
229 if (document.readyState == "interactive" || document.readyState == "complete") {
230 init();
231 } else {
232 document.onreadystatechange = statechange;
233 }
234 }
235</script>
236
1cd17194
AD
237</body>
238</html>