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);
17 $dt_add = get_script_dt_add();
22 <title
>Tiny Tiny RSS
</title
>
24 <link rel
="stylesheet" type
="text/css" href
="tt-rss.css">
26 <?
$user_theme = $_SESSION["theme"];
28 <link rel
="stylesheet" type
="text/css" href
="themes/<?= $user_theme ?>/theme.css">
31 <?
if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?
>
33 <?
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
34 <?
if ($user_css_url) { ?
>
35 <link type
="text/css" href
="<?= $user_css_url ?>"/>
38 <?
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?
>
40 <link rel
="stylesheet" href
="tt-rss_compact.css" type
="text/css">
44 <link title
="Compact Stylesheet" rel
="alternate stylesheet"
45 type
="text/css" href
="tt-rss_compact.css"/>
49 <script type
="text/javascript" src
="prototype.js"></script
>
51 <script type
="text/javascript" src
="tt-rss.js?<?= $dt_add ?>"></script
>
52 <script type
="text/javascript" src
="functions.js?<?= $dt_add ?>"></script
>
53 <!--[if gte IE
5.5000]>
54 <script type
="text/javascript" src
="pngfix.js"></script
>
55 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
57 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
59 <script type
="text/javascript">
60 if (navigator
.userAgent
.match("Opera")) {
61 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
63 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
64 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
71 <div id
="overlay"><div id
="overlay_inner">Loading
, please wait
...</div
></div
>
72 <div id
="fatal_error"><div id
="fatal_error_inner">
74 <div id
="fatal_error_msg">Unknown Error
</div
>
77 <script type
="text/javascript">
78 if (document
.addEventListener
) {
79 document
.addEventListener("DOMContentLoaded", init
, null);
84 <div id
="noDaemonWarning">
85 <b
>Warning
:</b
> Update daemon is enabled in configuration
, but daemon
86 process is not running
, which prevents all feeds from updating
. Please
87 start the daemon process
or contact instance owner
.
90 <iframe id
="backReqBox"></iframe
>
92 <ul id
="debug_output"></ul
>
94 <div id
="infoBoxShadow"><div id
="infoBox"> 
;</div
></div
>
96 <table width
="100%" height
="100%" cellspacing
="0" cellpadding
="0" class="main">
97 <?
if (get_pref($link, 'DISPLAY_HEADER')) { ?
>
99 <td colspan
="2" class="headerBox" id
="mainHeader">
100 <table cellspacing
="0" cellpadding
="0" width
="100%"><tr
>
101 <td rowspan
="2" class="header" valign
="middle">
102 <img src
="<?= $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS">
104 <td valign
="top" class="notifyBox">
105 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
107 </tr
><tr
><td
class="welcomePrompt">
108 <?
if (!SINGLE_USER_MODE
) { ?
>
109 Hello
, <b
><?
= $_SESSION["name"] ?
></b
>
110 (<a href
="logout.php">Logout
</a
>)
118 <td
class="small" id
="mainHeader">
119 <div id
="notify" class="notify_sm"><span id
="notify_body"> 
;</span
></div
>
120 <div id
="userDlgShadow"><div id
="userDlg"> 
;</div
></div
>
121 </td
><td
class="welcomePrompt">
122 <?
if (!SINGLE_USER_MODE
) { ?
>
123 Hello
, <b
><?
= $_SESSION["name"] ?
></b
>
124 (<a href
="logout.php">Logout
</a
>)
129 <?
if (get_pref($link, 'COMBINED_DISPLAY_MODE'))
132 $feeds_rowspan = 3; ?
>
133 <td valign
="top" rowspan
="<?= $feeds_rowspan ?>" class="feeds">
134 <table
class="innerFeedTable"
135 cellspacing
="0" cellpadding
="0" height
="100%" width
="100%">
137 <div id
="dispSwitch">
138 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
141 <tr
><td height
="100%" width
="100%" valign
="top">
143 <iframe frameborder
="0"
144 id
="feeds-frame" name
="feeds-frame" class="feedsFrame"></iframe
>
149 <td valign
="top" class="headlinesToolbarBox">
150 <table width
="100%" cellpadding
="0" cellspacing
="0">
152 <tr
><td
class="headlinesToolbar" id
="headlinesToolbar">
154 <form id
="main_toolbar_form">
156 <?
if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?
>
158 onKeyPress
="return filterCR(event)"
159 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
160 <input
class="button" type
="submit"
161 onclick
="return viewCurrentFeed(0)" value
="Search">
166 <select name
="view_mode" onchange
="viewCurrentFeed(0, '')">
167 <option selected value
="adaptive">Adaptive
</option
>
168 <option value
="all_articles">All Articles
</option
>
169 <option value
="marked">Starred
</option
>
170 <option value
="unread">Unread
</option
>
175 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
177 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
179 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
180 $limits[$def_art_limit] = $def_art_limit;
185 if (!$def_art_limit) {
189 print_select_hash("limit", $def_art_limit, $limits,
190 'onchange="viewCurrentFeed(0, \'\')"');
195 <!--  
;<input
class="button" type
="submit"
196 onclick
="quickMenuGo('qmcSearch')" value
="Search (tmp)"> -->
198  
;<input
class="button" type
="submit"
199 onclick
="viewCurrentFeed(0, 'ForceUpdate')" value
="Update">
201 <input
class="button" type
="submit"
202 onclick
="catchupCurrentFeed()" value
="Mark as read">
206 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
207 <option value
="qmcDefault" selected
>Actions
...</option
>
208 <option value
="qmcPrefs">Preferences
</option
>
209 <option value
="qmcSearch">Search
</option
>
210 <option disabled
>--------</option
>
211 <option style
="color : #5050aa" disabled
>Feed actions
:</option
>
212 <option value
="qmcAddFeed"> 
; 
;Subscribe to feed
</option
>
213 <option value
="qmcRemoveFeed"> 
; 
;Unsubscribe
</option
>
214 <!-- <option
>Edit this feed
</option
> -->
215 <option disabled
>--------</option
>
216 <option style
="color : #5050aa" disabled
>All feeds
:</option
>
217 <?
if (!ENABLE_UPDATE_DAEMON
&& !DAEMON_REFRESH_ONLY
) { ?
>
218 <option value
="qmcUpdateFeeds"> 
; 
;Update
</option
>
220 <option value
="qmcCatchupAll"> 
; 
;Mark
as read
</option
>
221 <option value
="qmcShowOnlyUnread"> 
; 
;Show only unread
</option
>
222 <option disabled
>--------</option
>
223 <option style
="color : #5050aa" disabled
>Other actions
:</option
>
224 <option value
="qmcAddFilter"> 
; 
;Create filter
</option
>
231 <?
if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
233 <td id
="headlines" class="headlines2" valign
="top">
234 <iframe frameborder
="0" name
="headlines-frame"
235 id
="headlines-frame" class="headlinesFrame"></iframe
>
240 <td id
="headlines" class="headlines" valign
="top">
241 <iframe frameborder
="0" name
="headlines-frame"
242 id
="headlines-frame" class="headlinesFrame"></iframe
>
245 <td
class="content" id
="content" valign
="top">
246 <iframe frameborder
="0" name
="content-frame"
247 id
="content-frame" class="contentFrame"> </iframe
>
251 <?
if (get_pref($link, 'DISPLAY_FOOTER')) { ?
>
253 <td colspan
="2" class="footer" id
="mainFooter">
254 <a href
="http://tt-rss.spb.ru/">Tiny
-Tiny RSS
</a
> v
<?
= VERSION ?
> ©
; 2005-2006 Andrew Dolgov
255 <?
if (WEB_DEMO_MODE
) { ?
>
256 <br
>Running in demo mode
, some functionality is disabled
.
263 <?
db_close($link); ?
>
265 <script type
="text/javascript">
267 function statechange() {
268 if (document
.readyState
== "interactive") init();
271 if (document
.readyState
) {
272 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
275 document
.onreadystatechange
= statechange
;