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();
20 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
21 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
24 <title
>Tiny Tiny RSS
</title
>
26 <link rel
="stylesheet" type
="text/css" href
="tt-rss.css?<?php echo $dt_add ?>">
28 <?php
$user_theme = $_SESSION["theme"];
30 <link rel
="stylesheet" type
="text/css" href
="themes/<?php echo $user_theme ?>/theme.css?<?php echo $dt_add ?>">
33 <?php
if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?
>
35 <?php
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
36 <?php
if ($user_css_url) { ?
>
37 <link rel
="stylesheet" type
="text/css" href
="<?php echo $user_css_url ?>"/>
40 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
42 <script type
="text/javascript" src
="prototype.js"></script
>
43 <script type
="text/javascript" src
="scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script
>
44 <script type
="text/javascript" src
="localized_js.php?<?php echo $dt_add ?>"></script
>
45 <script type
="text/javascript" src
="tt-rss.js?<?php echo $dt_add ?>"></script
>
46 <script type
="text/javascript" src
="functions.js?<?php echo $dt_add ?>"></script
>
47 <script type
="text/javascript" src
="feedlist.js?<?php echo $dt_add ?>"></script
>
48 <script type
="text/javascript" src
="viewfeed.js?<?php echo $dt_add ?>"></script
>
50 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
52 <script type
="text/javascript">
53 if (navigator
.userAgent
.match("Opera")) {
54 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
56 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
57 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
62 <body onresize
="resize_headlines()" id
="ttrssMain">
65 <div id
="overlay_inner">
66 <?php
echo __("Loading, please wait...") ?
>
68 <div id
="l_progress_o">
69 <div id
="l_progress_i"></div
>
73 <div
class="error"><?php
echo
74 __("Your browser doesn't support Javascript, which is required
75 for this application to function properly. Please check your
76 browser settings.") ?
></div
>
81 <div id
="hotkey_help_overlay" style
="display : none" onclick
="Element.hide(this)">
82 <?php
rounded_table_start("hho"); ?
>
83 <?php
include "help/3.php" ?
>
84 <?php
rounded_table_end(); ?
>
87 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
89 <div id
="fatal_error"><div id
="fatal_error_inner">
91 <div id
="fatal_error_msg">Unknown Error
</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'></ul
>
105 <div id
="infoBoxShadow"><div id
="infoBox"> 
;</div
></div
>
108 <div
class="topLinks">
109 <?php
if (!SINGLE_USER_MODE
) { ?
>
110 <?php
echo __('Hello,') ?
> <b
><?php
echo $_SESSION["name"] ?
></b
> |
112 <a href
="prefs.php"><?php
echo __('Preferences') ?
></a
>
114 <?php
if (defined('FEEDBACK_URL')) { ?
>
115 |
<a target
="_blank" class="feedback" href
="<?php echo FEEDBACK_URL ?>">
116 <?php
echo __('Comments?') ?
></a
>
119 <?php
if (!SINGLE_USER_MODE
) { ?
>
120 |
<a href
="logout.php"><?php
echo __('Logout') ?
></a
>
123 <img id
="newVersionIcon" style
="display:none;" onclick
="javascript:explainError(2)"
124 src
="images/new_version.png" title
="New version is available!"
125 alt
="new_version_icon">
127 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
130 <div id
="feeds-holder">
131 <div id
="dispSwitch">
132 <a id
="dispSwitchPrompt"
133 href
="javascript:toggleTags()"><?php
echo __("tag cloud") ?
></a
>
135 <div id
="feeds-frame"> 
;</div
>
140 <div style
="float : right">
141 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
142 <option value
="qmcDefault" selected
><?php
echo __('Actions...') ?
></option
>
143 <option value
="qmcSearch"><?php
echo __('Search') ?
></option
>
144 <!-- <option value
="qmcPrefs"><?php
echo __('Preferences') ?
></option
> -->
145 <option disabled
>--------</option
>
146 <option style
="color : #5050aa" disabled
><?php
echo __('Feed actions:') ?
></option
>
147 <option value
="qmcAddFeed"><?php
echo __(' Subscribe to feed') ?
></option
>
148 <option value
="qmcEditFeed"><?php
echo __(' Edit this feed') ?
></option
>
149 <!-- <option value
="qmcClearFeed"><?php
echo __(' Clear articles') ?
></option
> -->
150 <option value
="qmcRescoreFeed"><?php
echo __(' Rescore feed') ?
></option
>
151 <option value
="qmcRemoveFeed"><?php
echo __(' Unsubscribe') ?
></option
>
152 <option disabled
>--------</option
>
153 <option style
="color : #5050aa" disabled
><?php
echo __('All feeds:') ?
></option
>
154 <option value
="qmcCatchupAll"><?php
echo __(' Mark as read') ?
></option
>
155 <option value
="qmcShowOnlyUnread"><?php
echo __(' (Un)hide read feeds') ?
></option
>
156 <option disabled
>--------</option
>
157 <option style
="color : #5050aa" disabled
><?php
echo __('Other actions:') ?
></option
>
158 <option value
="qmcAddFilter"><?php
echo __(' Create filter') ?
></option
>
159 <option value
="qmcResetUI"><?php
echo __(' Reset UI layout') ?
></option
>
161 <option value
="qmcHKhelp"><?php
echo __(' Keyboard shortcuts') ?
></option
>
165 <form id
="main_toolbar_form" onsubmit
='return false'>
167 <input type
="submit" value
="<<"
168 id
="collapse_feeds_btn" onclick
="collapse_feedlist()" class="button"
169 title
="<?php echo __('Collapse feedlist') ?>" style
="display : none">
171 <input type
="submit" value
="<?php echo __("Toggle Feedlist
") ?>"
172 id
="toggle_feeds_btn" class="button"
173 onclick
="toggle_feedlist()" style
="display : none">
177 <?php
if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?
>
179 <?php
echo __('Search:') ?
>
180 <input name
="query" type
="search"
181 onKeyPress
="return filterCR(event, viewCurrentFeed)"
182 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
186 <?php
echo __('View:') ?
>
187 <select name
="view_mode" onchange
="viewModeChanged()">
188 <option selected value
="adaptive"><?php
echo __('Adaptive') ?
></option
>
189 <option value
="all_articles"><?php
echo __('All Articles') ?
></option
>
190 <option value
="marked"><?php
echo __('Starred') ?
></option
>
191 <option value
="unread"><?php
echo __('Unread') ?
></option
>
194 <?php
echo __('Limit:') ?
>
196 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
198 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
200 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
201 $limits[$def_art_limit] = $def_art_limit;
206 if (!$def_art_limit) {
210 print_select_hash("limit", $def_art_limit, $limits,
211 'onchange="viewLimitChanged()"');
217 <input
class="button" type
="submit"
218 onclick
="return viewCurrentFeed('ForceUpdate')"
219 value
="<?php echo __('Update') ?>">
223 <!--  
;<input
class="button" type
="submit"
224 onclick
="quickMenuGo('qmcSearch')" value
="Search (tmp)"> -->
226 <!-- <input
class="button" type
="submit"
227 onclick
="catchupCurrentFeed()" value
="Mark as read"> -->
231 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
232 <div id
="headlines-frame" class="headlines_normal">
233 <div
class="whiteBox"><?php
echo __('No feed selected.') ?
></div
></div
>
234 <div id
="content-frame"><div
class="whiteBox"> 
;</div
></div
>
235 <div id
="resize-grabber"
236 onmouseover
="enable_resize(true)" onmouseout
="enable_resize(false)"
237 title
="<?php echo __('Drag me to resize panels') ?>"> </div
>
239 <div id
="headlines-frame" class="headlines_cdm">
240 <div
class="whiteBox"><?php
echo __('No feed selected.') ?
></div
></div
>
244 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
245 <select id
="userSwitch" onchange
="userSwitch()">
247 foreach (array('admin', 'fox', 'test') as $u) {
248 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
249 print "<option $op_sel>$u</option>";
254 <a href
="http://tt-rss.org/">Tiny Tiny RSS
</a
> v
<?php
echo VERSION ?
> ©
; 2005&ndash
;2008 <a href
="http://bah.org.ru/">Andrew Dolgov
</a
>
257 <?php
db_close($link); ?
>
259 <script type
="text/javascript">
261 function statechange() {
262 if (document
.readyState
== "interactive") init();
265 if (document
.readyState
) {
266 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
269 document
.onreadystatechange
= statechange
;