2 error_reporting(E_ERROR | E_WARNING | E_PARSE);
4 require_once "functions.php";
5 require_once "sessions.php";
6 require_once "sanity_check.php";
7 require_once "version.php";
8 require_once "config.php";
9 require_once "db-prefs.php";
11 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
13 login_sequence($link);
15 $dt_add = get_script_dt_add();
17 no_cache_incantation();
19 header('Content-Type: text/html; charset=utf-8');
22 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
23 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26 <title>Tiny Tiny RSS</title>
28 <link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"/>
30 <?php $user_theme = $_SESSION["theme"];
32 <link rel="stylesheet" type="text/css" href="themes/<?php echo $user_theme ?>/theme.css?<?php echo $dt_add ?>">
35 <?php if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?>
37 <?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
38 <?php if ($user_css_url) { ?>
39 <link rel="stylesheet" type="text/css" href="<?php echo $user_css_url ?>"/>
42 <link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
44 <script type="text/javascript" src="lib/prototype.js"></script>
45 <script type="text/javascript" src="lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script>
46 <script type="text/javascript" charset="utf-8" src="localized_js.php?<?php echo $dt_add ?>"></script>
47 <script type="text/javascript" charset="utf-8" src="tt-rss.js?<?php echo $dt_add ?>"></script>
48 <script type="text/javascript" charset="utf-8" src="functions.js?<?php echo $dt_add ?>"></script>
49 <script type="text/javascript" charset="utf-8" src="feedlist.js?<?php echo $dt_add ?>"></script>
50 <script type="text/javascript" charset="utf-8" src="viewfeed.js?<?php echo $dt_add ?>"></script>
51 <script type="text/javascript" charset="utf-8" src="offline.js?<?php echo $dt_add ?>"></script>
53 <script type="text/javascript" src="gears_init.js"></script>
55 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
57 <script type="text/javascript">
59 if (navigator.userAgent.match("Opera")) {
60 document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
62 window.onresize=resize_headlines;
69 <div id="overlay" style="display : block">
70 <div id="overlay_inner">
71 <?php echo __("Loading, please wait...") ?>
73 <div id="l_progress_o">
74 <div id="l_progress_i"></div>
78 <div class="error"><?php echo
79 __("Your browser doesn't support Javascript, which is required
80 for this application to function properly. Please check your
81 browser settings.") ?></div>
86 <div id="hotkey_help_overlay" style="display : none" onclick="Element.hide(this)">
87 <?php rounded_table_start("hho"); ?>
88 <?php include "help/3.php" ?>
89 <?php rounded_table_end(); ?>
92 <div id="notify" class="notify"><span id="notify_body"> </span></div>
94 <div id="dialog_overlay" style="display : none"> </div>
96 <script type="text/javascript">
97 if (document.addEventListener) {
98 document.addEventListener("DOMContentLoaded", init, null);
100 window.onload = init;
103 <ul id="debug_output" style='display : none'><li> </li></ul>
105 <div id="infoBoxShadow" style="display : none"><div id="infoBox"> </div></div>
107 <div id="errorBoxShadow" style="display : none">
109 <div id="xebTitle">Fatal Exception</div><div id="xebContent"> </div>
110 <div id="xebBtn" align='center'><input type="submit"
111 onclick="closeErrorBox()" value="Close this window"/></div>
116 <div class="topLinks" id="topLinks">
118 <?php if (!SINGLE_USER_MODE) { ?>
119 <?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
121 <a href="prefs.php"><?php echo __('Preferences') ?></a>
123 <?php if (defined('FEEDBACK_URL') && FEEDBACK_URL) { ?>
124 | <a target="_blank" class="feedback" href="<?php echo FEEDBACK_URL ?>">
125 <?php echo __('Comments?') ?></a>
128 <?php if (!SINGLE_USER_MODE) { ?>
129 | <a href="logout.php"><?php echo __('Logout') ?></a>
132 <img id="newVersionIcon" style="display:none;" onclick="javascript:explainError(2)"
133 src="images/new_version.png" title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>"
134 alt="new_version_icon"/>
137 <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/>
140 <div id="feeds-holder">
141 <div id="dispSwitch">
142 <a id="dispSwitchPrompt"
143 href="javascript:toggleTags()"><?php echo __("tag cloud") ?></a>
144 <?php if (!SINGLE_USER_MODE) { ?>
146 <a id="feedBrowserPrompt" onclick="return browseFeeds()" href="#"
147 title="<?php echo __('More feeds...') ?>">+</a>
150 <div id="feeds-frame"> </div>
155 <div style="float : right">
156 <select id="quickMenuChooser" onchange="quickMenuChange()">
157 <option value="qmcDefault" selected="selected"><?php echo __('Actions...') ?></option>
158 <option value="qmcSearch"><?php echo __('Search...') ?></option>
159 <!-- <option value="qmcPrefs"><?php echo __('Preferences') ?></option> -->
160 <option disabled="disabled">--------</option>
161 <option style="color : #5050aa" disabled="disabled"><?php echo __('Feed actions:') ?></option>
162 <option value="qmcAddFeed"> <?php echo __('Subscribe to feed...') ?></option>
163 <option value="qmcEditFeed"> <?php echo __('Edit this feed...') ?></option>
164 <!-- <option value="qmcClearFeed"> <?php echo __('Clear articles') ?></option> -->
165 <option value="qmcRescoreFeed"> <?php echo __('Rescore feed') ?></option>
166 <option value="qmcRemoveFeed"> <?php echo __('Unsubscribe') ?></option>
167 <option disabled="disabled">--------</option>
168 <option style="color : #5050aa" disabled="disabled"><?php echo __('All feeds:') ?></option>
169 <option value="qmcCatchupAll"> <?php echo __('Mark as read') ?></option>
170 <option value="qmcShowOnlyUnread"> <?php echo __('(Un)hide read feeds') ?></option>
171 <option disabled="disabled">--------</option>
172 <option style="color : #5050aa" disabled="disabled"><?php echo __('Other actions:') ?></option>
174 <option value="qmcAddLabel"> <?php echo __('Create label...') ?></option>
175 <option value="qmcAddFilter"> <?php echo __('Create filter...') ?></option>
176 <option value="qmcResetUI"> <?php echo __('Reset UI layout') ?></option>
177 <option value="qmcResetCats"> <?php echo __('Reset category order') ?></option>
178 <option id="qmcDownload" style="display : none" value="qmcDownload"><?php echo __(' Download new articles...') ?></option>
179 <option value="qmcHKhelp"><?php echo __(' Keyboard shortcuts') ?></option>
184 <form id="main_toolbar_form" action="" onsubmit='return false'>
186 <input type="submit" value="<<"
187 id="collapse_feeds_btn" onclick="collapse_feedlist()" class="button"
188 title="<?php echo __('Collapse feedlist') ?>" style="display : none"/>
190 <input type="submit" value="<?php echo __("Toggle Feedlist") ?>"
191 id="toggle_feeds_btn" class="button"
192 onclick="toggle_feedlist()" style="display : none"/>
196 <?php if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
198 <?php echo __('Search:') ?>
199 <input name="query" type="text"
200 onkeypress="return filterCR(event, viewCurrentFeed)"
201 onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();"/>
205 <select name="view_mode" onchange="viewModeChanged()">
206 <option selected="selected" value="adaptive"><?php echo __('Adaptive') ?></option>
207 <option value="all_articles"><?php echo __('All Articles') ?></option>
208 <option value="marked"><?php echo __('Starred') ?></option>
209 <option value="unread"><?php echo __('Unread') ?></option>
210 <!-- <option value="noscores"><?php echo __('Ignore Scoring') ?></option> -->
211 <option value="updated"><?php echo __('Updated') ?></option>
214 <?php echo __('Order:') ?>
216 <select name="order_by" onchange="viewModeChanged()">
217 <option selected="selected" value="default"><?php echo __('Default') ?></option>
218 <option value="date"><?php echo __('Date') ?></option>
219 <option value="title"><?php echo __('Title') ?></option>
220 <option value="score"><?php echo __('Score') ?></option>
224 <?php echo __('Limit:') ?>
226 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
228 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
230 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
231 $limits[$def_art_limit] = $def_art_limit;
236 if (!$def_art_limit) {
240 print_select_hash("limit", $def_art_limit, $limits,
241 'onchange="viewLimitChanged()"');
247 <input class="button" type="submit" name="update"
248 onclick="return viewCurrentFeed('ForceUpdate')"
249 value="<?php echo __('Update') ?>"/>
253 <!-- <input class="button" type="submit"
254 onclick="quickMenuGo('qmcSearch')" value="Search (tmp)"> -->
256 <!-- <input class="button" type="submit"
257 onclick="catchupCurrentFeed()" value="Mark as read"> -->
261 <?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
262 <div id="headlines-frame" class="headlines_normal">
263 <div class="whiteBox"><?php echo __('No feed selected.') ?></div></div>
264 <div id="content-frame">
265 <div id="resize-grabber"
266 onmouseover="enable_resize(true)" onmouseout="enable_resize(false)"
267 title="<?php echo __('Drag me to resize panels') ?>">
268 <img src="images/resize_handle_horiz.png" id="resize-handle"
269 onmouseover="enable_resize(true)" onmouseout="enable_resize(false)"
272 <div id="content-insert"> </div>
273 <!-- <div class="whiteBox"> </div> --> </div>
275 <div id="headlines-frame" class="headlines_cdm">
276 <div class="whiteBox"><?php echo __('No feed selected.') ?></div></div>
280 <?php if (defined('_DEBUG_USER_SWITCH')) { ?>
281 <select id="userSwitch" onchange="userSwitch()">
283 foreach (array('admin', 'fox', 'test') as $u) {
284 $op_sel = ($u == $_SESSION["name"]) ? "selected" : "";
285 print "<option $op_sel>$u</option>";
290 <a href="http://tt-rss.org/">Tiny Tiny RSS</a>
291 <?php if (!defined('HIDE_VERSION')) { ?>
292 v<?php echo VERSION ?>
294 © 2005–2009 <a href="http://bah.org.ru/">Andrew Dolgov</a>
297 <?php db_close($link); ?>
299 <script type="text/javascript">
301 function statechange() {
302 if (document.readyState == "interactive") init();
305 if (document.readyState) {
306 if (document.readyState == "interactive" || document.readyState == "complete") {
309 document.onreadystatechange = statechange;