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