2 require_once "functions.php";
4 basic_nosid_redirect_check();
6 require_once "sessions.php";
8 require_once "sanity_check.php";
9 require_once "version.php";
10 require_once "config.php";
11 require_once "db-prefs.php";
13 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
15 login_sequence($link);
20 <title
>Tiny Tiny RSS
</title
>
22 <link rel
="stylesheet" type
="text/css" href
="tt-rss.css">
24 <?
$user_theme = $_SESSION["theme"];
26 <link rel
="stylesheet" type
="text/css" href
="themes/<?= $user_theme ?>/theme.css">
29 <?
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
30 <?
if ($user_css_url) { ?
>
31 <link type
="text/css" href
="<?= $user_css_url ?>"/>
34 <?
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?
>
36 <link rel
="stylesheet" href
="tt-rss_compact.css" type
="text/css">
40 <link title
="Compact Stylesheet" rel
="alternate stylesheet"
41 type
="text/css" href
="tt-rss_compact.css"/>
45 <script type
="text/javascript" src
="tt-rss.js"></script
>
46 <script type
="text/javascript" src
="functions.js"></script
>
47 <!--[if gte IE
5.5000]>
48 <script type
="text/javascript" src
="pngfix.js"></script
>
49 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
51 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
53 <script type
="text/javascript">
54 if (navigator
.userAgent
.match("Opera")) {
55 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
62 <script type
="text/javascript">
63 if (document
.addEventListener
) {
64 document
.addEventListener("DOMContentLoaded", init
, null);
69 <?
if (ENABLE_UPDATE_DAEMON
&& !file_is_locked("update_daemon.lock")) { ?
>
71 <b
>Warning
:</b
> Update daemon is enabled in configuration
, but daemon
72 process is not running
, which prevents all feeds from updating
. Please
73 start the daemon process
or contact instance owner
.
77 <ul id
="debug_output"></ul
>
79 <table width
="100%" height
="100%" cellspacing
="0" cellpadding
="0" class="main">
80 <?
if (get_pref($link, 'DISPLAY_HEADER')) { ?
>
82 <td colspan
="2" class="headerBox" id
="mainHeader">
83 <table cellspacing
="0" cellpadding
="0" width
="100%"><tr
>
84 <td rowspan
="2" class="header" valign
="middle">
85 <img src
="images/ttrss_logo.png" alt
="logo">
87 <td valign
="top" class="notifyBox">
88 <div id
="notify"><span id
="notify_body"> 
;</span
></div
>
91 <div id
="userDlgShadow"><div id
="userDlg"> 
;</div
></div
>
93 </tr
><tr
><td
class="welcomePrompt">
94 <?
if (!SINGLE_USER_MODE
) { ?
>
95 Hello
, <b
><?
= $_SESSION["name"] ?
></b
>
96 (<a href
="logout.php">Logout
</a
>)
104 <td
class="small" id
="mainHeader">
105 <div id
="notify"><span id
="notify_body"> 
;</span
></div
>
106 <div id
="userDlgShadow"><div id
="userDlg"> 
;</div
></div
>
107 </td
><td
class="welcomePrompt">
108 <?
if (!SINGLE_USER_MODE
) { ?
>
109 Hello
, <b
><?
= $_SESSION["name"] ?
></b
>
110 (<a href
="logout.php">Logout
</a
>)
115 <?
if (get_pref($link, 'COMBINED_DISPLAY_MODE'))
118 $feeds_rowspan = 3; ?
>
119 <td valign
="top" rowspan
="<?= $feeds_rowspan ?>" class="feeds">
120 <table
class="innerFeedTable"
121 cellspacing
="0" cellpadding
="0" height
="100%" width
="100%">
123 <div id
="dispSwitch">
124 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
127 <tr
><td height
="100%" width
="100%" valign
="top">
129 <?
if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?
>
131 <iframe frameborder
="0"
132 src
="backend.php?op=error&msg=Loading,%20please wait..."
133 id
="feeds-frame" name
="feeds-frame" class="feedsFrameWithActions"> </iframe
>
137 <select id
="allFeedsChooser" onchange
="allFeedsMenuChange()">
138 <option selected
>All feeds
...</option
>
139 <?
if (!ENABLE_UPDATE_DAEMON
) { ?
>
140 <option
>Update
</option
>
142 <option
>Mark
as read
</option
>
143 <option
>Show only unread
</option
>
150 <iframe frameborder
="0"
151 src
="backend.php?op=error&msg=Loading,%20please wait..."
152 id
="feeds-frame" name
="feeds-frame" class="feedsFrame"> </iframe
>
159 <td valign
="top" class="headlinesToolbarBox">
160 <table width
="100%" cellpadding
="0" cellspacing
="0">
162 <tr
><td
class="headlinesToolbar" id
="headlinesToolbar">
164 <?
if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?
>
166 <input id
="searchbox"
167 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
168 <select id
="searchmodebox">
169 <option
>This feed
</option
>
170 <?
if (get_pref($link, 'ENABLE_FEED_CATS')) { ?
>
171 <option
>This category
</option
>
173 <option
>All feeds
</option
>
177 class="button" onclick
="javascript:search()" value
="Search">
185 <select id
="viewbox" onchange
="javascript:viewCurrentFeed(0, '')">
186 <option selected
>Adaptive
</option
>
187 <option
>All Articles
</option
>
188 <option
>Starred
</option
>
189 <option
>Unread
</option
>
194 <select id
="limitbox" onchange
="javascript:viewCurrentFeed(0, '')">
197 $limits = array(15 => 15, 30 => 30, 60 => 60);
199 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
201 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
202 $limits[$def_art_limit] = $def_art_limit;
206 array_push($limits, 0);
208 if (!$def_art_limit) {
212 foreach ($limits as $key) {
214 if ($key == $def_art_limit) { print " selected"; }
217 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
224 <!--  
;Selection
:
226 <select id
="headopbox">
227 <option id
="hopToggleRead">Toggle (un
)read
</option
>
230 <input
class="button" type
="submit" onclick
="headopGo()" value
="Go"> -->
232  
;Feed
: <input
class="button" type
="submit"
233 onclick
="javascript:viewCurrentFeed(0, 'ForceUpdate')" value
="Update">
235 <input
class="button" type
="submit" id
="btnMarkFeedAsRead"
236 onclick
="javascript:viewCurrentFeed(0, 'MarkAllRead')" value
="Mark as read">
240 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
241 <option id
="qmcDefault" selected
>Actions
...</option
>
242 <option id
="qmcPrefs">Preferences
</option
>
243 <option id
="qmcSearch">Search
</option
>
244 <option disabled
>--------</option
>
245 <option style
="color : #5050aa" disabled
>Feed actions
:</option
>
246 <option id
="qmcAddFeed"> 
; 
;Add
new feed
</option
>
247 <option id
="qmcRemoveFeed"> 
; 
;Remove this feed
</option
>
248 <!-- <option
>Edit this feed
</option
> -->
249 <option disabled
>--------</option
>
250 <option style
="color : #5050aa" disabled
>All feeds
:</option
>
251 <?
if (!ENABLE_UPDATE_DAEMON
) { ?
>
252 <option id
="qmcUpdateFeeds"> 
; 
;Update
</option
>
254 <option id
="qmcCatchupAll"> 
; 
;Mark
as read
</option
>
255 <option id
="qmcShowOnlyUnread"> 
; 
;Show only unread
</option
>
256 <option disabled
>--------</option
>
257 <option style
="color : #5050aa" disabled
>Other actions
:</option
>
258 <option id
="qmcAddFilter"> 
; 
;Add filter
</option
>
265 <?
if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
267 <td id
="headlines" class="headlines2" valign
="top">
268 <iframe frameborder
="0" name
="headlines-frame"
269 id
="headlines-frame" class="headlinesFrame"
270 src
="backend.php?op=error&msg=No%20feed%20selected."></iframe
>
275 <td id
="headlines" class="headlines" valign
="top">
276 <iframe frameborder
="0" name
="headlines-frame"
277 id
="headlines-frame" class="headlinesFrame"
278 src
="backend.php?op=error&msg=No%20feed%20selected."></iframe
>
281 <td
class="content" id
="content" valign
="top">
282 <iframe frameborder
="0" name
="content-frame"
283 id
="content-frame" class="contentFrame"> </iframe
>
287 <?
if (get_pref($link, 'DISPLAY_FOOTER')) { ?
>
289 <td colspan
="2" class="footer" id
="mainFooter">
290 <a href
="http://tt-rss.spb.ru/">Tiny
-Tiny RSS
</a
> v
<?
= VERSION ?
> ©
; 2005-2006 Andrew Dolgov
291 <?
if (WEB_DEMO_MODE
) { ?
>
292 <br
>Running in demo mode
, some functionality is disabled
.
299 <?
db_close($link); ?
>
301 <script type
="text/javascript">
303 function statechange() {
304 if (document
.readyState
== "interactive") init();
307 if (document
.readyState
) {
308 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
311 document
.onreadystatechange
= statechange
;