2 require_once "sessions.php";
4 require_once "sanity_check.php";
5 require_once "version.php";
6 require_once "config.php";
7 require_once "db-prefs.php";
8 require_once "functions.php";
10 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
12 login_sequence($link);
17 <title
>Tiny Tiny RSS
</title
>
19 <link rel
="stylesheet" type
="text/css" href
="tt-rss.css">
21 <?
$user_theme = $_SESSION["theme"];
23 <link rel
="stylesheet" type
="text/css" href
="themes/<?= $user_theme ?>/theme.css">
26 <?
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
27 <?
if ($user_css_url) { ?
>
28 <link type
="text/css" href
="<?= $user_css_url ?>"/>
31 <?
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?
>
33 <link rel
="stylesheet" href
="tt-rss_compact.css" type
="text/css">
37 <link title
="Compact Stylesheet" rel
="alternate stylesheet"
38 type
="text/css" href
="tt-rss_compact.css"/>
42 <script type
="text/javascript" src
="tt-rss.js"></script
>
43 <script type
="text/javascript" src
="functions.js"></script
>
44 <!--[if gte IE
5.5000]>
45 <script type
="text/javascript" src
="pngfix.js"></script
>
46 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
48 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
50 <script type
="text/javascript">
51 if (navigator
.userAgent
.match("Opera")) {
52 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
59 <script type
="text/javascript">
60 if (document
.addEventListener
) {
61 document
.addEventListener("DOMContentLoaded", init
, null);
66 <?
if (ENABLE_UPDATE_DAEMON
&& !file_is_locked("update_daemon.lock")) { ?
>
68 <b
>Warning
:</b
> Update daemon is enabled in configuration
, but daemon
69 process is not running
, which prevents all feeds from updating
. Please
70 start the daemon process
or contact instance owner
.
74 <ul id
="debug_output"></ul
>
76 <table width
="100%" height
="100%" cellspacing
="0" cellpadding
="0" class="main">
77 <?
if (get_pref($link, 'DISPLAY_HEADER')) { ?
>
79 <td colspan
="2" class="headerBox" id
="mainHeader">
80 <table cellspacing
="0" cellpadding
="0" width
="100%"><tr
>
81 <td rowspan
="2" class="header" valign
="middle">
82 <img src
="images/ttrss_logo.png" alt
="logo">
84 <td valign
="top" class="notifyBox">
85 <div id
="notify"><span id
="notify_body"> 
;</span
></div
>
88 <div id
="userDlgShadow"><div id
="userDlg"> 
;</div
></div
>
90 </tr
><tr
><td
class="welcomePrompt">
91 <?
if (!SINGLE_USER_MODE
) { ?
>
92 Hello
, <b
><?
= $_SESSION["name"] ?
></b
>
93 (<a href
="logout.php">Logout
</a
>)
101 <td
class="small" id
="mainHeader">
102 <div id
="notify"><span id
="notify_body"> 
;</span
></div
>
103 <div id
="userDlgShadow"><div id
="userDlg"> 
;</div
></div
>
104 </td
><td
class="welcomePrompt">
105 <?
if (!SINGLE_USER_MODE
) { ?
>
106 Hello
, <b
><?
= $_SESSION["name"] ?
></b
>
107 (<a href
="logout.php">Logout
</a
>)
112 <?
if (get_pref($link, 'COMBINED_DISPLAY_MODE'))
115 $feeds_rowspan = 3; ?
>
116 <td valign
="top" rowspan
="<?= $feeds_rowspan ?>" class="feeds">
117 <table
class="innerFeedTable"
118 cellspacing
="0" cellpadding
="0" height
="100%" width
="100%">
120 <div id
="dispSwitch">
121 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
124 <tr
><td height
="100%" width
="100%" valign
="top">
126 <?
if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?
>
128 <iframe frameborder
="0"
129 src
="backend.php?op=error&msg=Loading,%20please wait..."
130 id
="feeds-frame" name
="feeds-frame" class="feedsFrameWithActions"> </iframe
>
134 <select id
="allFeedsChooser" onchange
="allFeedsMenuChange()">
135 <option selected
>All feeds
...</option
>
136 <?
if (!ENABLE_UPDATE_DAEMON
) { ?
>
137 <option
>Update
</option
>
139 <option
>Mark
as read
</option
>
140 <option
>Show only unread
</option
>
147 <iframe frameborder
="0"
148 src
="backend.php?op=error&msg=Loading,%20please wait..."
149 id
="feeds-frame" name
="feeds-frame" class="feedsFrame"> </iframe
>
156 <td valign
="top" class="headlinesToolbarBox">
157 <table width
="100%" cellpadding
="0" cellspacing
="0">
159 <tr
><td
class="headlinesToolbar" id
="headlinesToolbar">
161 <?
if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?
>
163 <input id
="searchbox"
164 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
165 <select id
="searchmodebox">
166 <option
>This feed
</option
>
167 <?
if (get_pref($link, 'ENABLE_FEED_CATS')) { ?
>
168 <option
>This category
</option
>
170 <option
>All feeds
</option
>
174 class="button" onclick
="javascript:search()" value
="Search">
182 <select id
="viewbox" onchange
="javascript:viewCurrentFeed(0, '')">
183 <option selected
>Adaptive
</option
>
184 <option
>All Articles
</option
>
185 <option
>Starred
</option
>
186 <option
>Unread
</option
>
191 <select id
="limitbox" onchange
="javascript:viewCurrentFeed(0, '')">
194 $limits = array(15 => 15, 30 => 30, 60 => 60);
196 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
198 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
199 $limits[$def_art_limit] = $def_art_limit;
203 array_push($limits, 0);
205 if (!$def_art_limit) {
209 foreach ($limits as $key) {
211 if ($key == $def_art_limit) { print " selected"; }
214 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
221 <!--  
;Selection
:
223 <select id
="headopbox">
224 <option id
="hopToggleRead">Toggle (un
)read
</option
>
227 <input
class="button" type
="submit" onclick
="headopGo()" value
="Go"> -->
229  
;Feed
: <input
class="button" type
="submit"
230 onclick
="javascript:viewCurrentFeed(0, 'ForceUpdate')" value
="Update">
232 <input
class="button" type
="submit" id
="btnMarkFeedAsRead"
233 onclick
="javascript:viewCurrentFeed(0, 'MarkAllRead')" value
="Mark as read">
237 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
238 <option id
="qmcDefault" selected
>Actions
...</option
>
239 <option id
="qmcPrefs">Preferences
</option
>
240 <option id
="qmcSearch">Search
</option
>
241 <option disabled
>--------</option
>
242 <option style
="color : #5050aa" disabled
>Feed actions
:</option
>
243 <option id
="qmcAddFeed"> 
; 
;Add
new feed
</option
>
244 <option id
="qmcRemoveFeed"> 
; 
;Remove this feed
</option
>
245 <!-- <option
>Edit this feed
</option
> -->
246 <option disabled
>--------</option
>
247 <option style
="color : #5050aa" disabled
>All feeds
:</option
>
248 <?
if (!ENABLE_UPDATE_DAEMON
) { ?
>
249 <option id
="qmcUpdateFeeds"> 
; 
;Update
</option
>
251 <option id
="qmcCatchupAll"> 
; 
;Mark
as read
</option
>
252 <option id
="qmcShowOnlyUnread"> 
; 
;Show only unread
</option
>
253 <option disabled
>--------</option
>
254 <option style
="color : #5050aa" disabled
>Other actions
:</option
>
255 <option id
="qmcAddFilter"> 
; 
;Add filter
</option
>
262 <?
if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
264 <td id
="headlines" class="headlines2" valign
="top">
265 <iframe frameborder
="0" name
="headlines-frame"
266 id
="headlines-frame" class="headlinesFrame"
267 src
="backend.php?op=error&msg=No%20feed%20selected."></iframe
>
272 <td id
="headlines" class="headlines" valign
="top">
273 <iframe frameborder
="0" name
="headlines-frame"
274 id
="headlines-frame" class="headlinesFrame"
275 src
="backend.php?op=error&msg=No%20feed%20selected."></iframe
>
278 <td
class="content" id
="content" valign
="top">
279 <iframe frameborder
="0" name
="content-frame"
280 id
="content-frame" class="contentFrame"> </iframe
>
284 <?
if (get_pref($link, 'DISPLAY_FOOTER')) { ?
>
286 <td colspan
="2" class="footer" id
="mainFooter">
287 <a href
="http://tt-rss.spb.ru/">Tiny
-Tiny RSS
</a
> v
<?
= VERSION ?
> ©
; 2005-2006 Andrew Dolgov
288 <?
if (WEB_DEMO_MODE
) { ?
>
289 <br
>Running in demo mode
, some functionality is disabled
.
296 <?
db_close($link); ?
>
298 <script type
="text/javascript">
300 function statechange() {
301 if (document
.readyState
== "interactive") init();
304 if (document
.readyState
) {
305 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
308 document
.onreadystatechange
= statechange
;