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