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 <?
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
32 <?
if ($user_css_url) { ?
>
33 <link type
="text/css" href
="<?= $user_css_url ?>"/>
36 <?
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?
>
38 <link rel
="stylesheet" href
="tt-rss_compact.css" type
="text/css">
42 <link title
="Compact Stylesheet" rel
="alternate stylesheet"
43 type
="text/css" href
="tt-rss_compact.css"/>
47 <script type
="text/javascript" src
="tt-rss.js?<?= $dt_add ?>"></script
>
48 <script type
="text/javascript" src
="functions.js?<?= $dt_add ?>"></script
>
49 <!--[if gte IE
5.5000]>
50 <script type
="text/javascript" src
="pngfix.js"></script
>
51 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
53 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
55 <script type
="text/javascript">
56 if (navigator
.userAgent
.match("Opera")) {
57 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
59 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
60 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
67 <div id
="overlay"><div id
="overlay_inner">Loading
, please wait
...</div
></div
>
68 <div id
="fatal_error"><div id
="fatal_error_inner">
70 <div id
="fatal_error_msg">Unknown Error
</div
>
73 <script type
="text/javascript">
74 if (document
.addEventListener
) {
75 document
.addEventListener("DOMContentLoaded", init
, null);
80 <?
if (ENABLE_UPDATE_DAEMON
&& !file_is_locked("update_daemon.lock")) { ?
>
81 <div
class="noDaemonWarning">
82 <b
>Warning
:</b
> Update daemon is enabled in configuration
, but daemon
83 process is not running
, which prevents all feeds from updating
. Please
84 start the daemon process
or contact instance owner
.
88 <ul id
="debug_output"></ul
>
90 <table width
="100%" height
="100%" cellspacing
="0" cellpadding
="0" class="main">
91 <?
if (get_pref($link, 'DISPLAY_HEADER')) { ?
>
93 <td colspan
="2" class="headerBox" id
="mainHeader">
94 <table cellspacing
="0" cellpadding
="0" width
="100%"><tr
>
95 <td rowspan
="2" class="header" valign
="middle">
96 <img src
="images/ttrss_logo.png" alt
="logo">
98 <td valign
="top" class="notifyBox">
99 <div id
="notify"><span id
="notify_body"> 
;</span
></div
>
102 <div id
="infoBoxShadow"><div id
="infoBox"> 
;</div
></div
>
104 </tr
><tr
><td
class="welcomePrompt">
105 <?
if (!SINGLE_USER_MODE
) { ?
>
106 Hello
, <b
><?
= $_SESSION["name"] ?
></b
>
107 (<a href
="logout.php">Logout
</a
>)
115 <td
class="small" id
="mainHeader">
116 <div id
="notify"><span id
="notify_body"> 
;</span
></div
>
117 <div id
="userDlgShadow"><div id
="userDlg"> 
;</div
></div
>
118 </td
><td
class="welcomePrompt">
119 <?
if (!SINGLE_USER_MODE
) { ?
>
120 Hello
, <b
><?
= $_SESSION["name"] ?
></b
>
121 (<a href
="logout.php">Logout
</a
>)
126 <?
if (get_pref($link, 'COMBINED_DISPLAY_MODE'))
129 $feeds_rowspan = 3; ?
>
130 <td valign
="top" rowspan
="<?= $feeds_rowspan ?>" class="feeds">
131 <table
class="innerFeedTable"
132 cellspacing
="0" cellpadding
="0" height
="100%" width
="100%">
134 <div id
="dispSwitch">
135 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
138 <tr
><td height
="100%" width
="100%" valign
="top">
140 <iframe frameborder
="0"
141 id
="feeds-frame" name
="feeds-frame" class="feedsFrame"></iframe
>
146 <td valign
="top" class="headlinesToolbarBox">
147 <table width
="100%" cellpadding
="0" cellspacing
="0">
149 <tr
><td
class="headlinesToolbar" id
="headlinesToolbar">
151 <?
if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?
>
153 <input id
="searchbox"
154 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
155 <select id
="searchmodebox">
156 <option
>This feed
</option
>
157 <?
if (get_pref($link, 'ENABLE_FEED_CATS')) { ?
>
158 <option
>This category
</option
>
160 <option
>All feeds
</option
>
164 class="button" onclick
="javascript:search()" value
="Search">
172 <select id
="viewbox" onchange
="javascript:viewCurrentFeed(0, '')">
173 <option selected
>Adaptive
</option
>
174 <option
>All Articles
</option
>
175 <option
>Starred
</option
>
176 <option
>Unread
</option
>
181 <select id
="limitbox" onchange
="javascript:viewCurrentFeed(0, '')">
184 $limits = array(15 => 15, 30 => 30, 60 => 60);
186 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
188 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
189 $limits[$def_art_limit] = $def_art_limit;
193 array_push($limits, 0);
195 if (!$def_art_limit) {
199 foreach ($limits as $key) {
201 if ($key == $def_art_limit) { print " selected"; }
204 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
211 <!--  
;Selection
:
213 <select id
="headopbox">
214 <option id
="hopToggleRead">Toggle (un
)read
</option
>
217 <input
class="button" type
="submit" onclick
="headopGo()" value
="Go"> -->
219  
;Feed
: <input
class="button" type
="submit"
220 onclick
="javascript:viewCurrentFeed(0, 'ForceUpdate')" value
="Update">
222 <input
class="button" type
="submit" id
="btnMarkFeedAsRead"
223 onclick
="javascript:viewCurrentFeed(0, 'MarkAllRead')" value
="Mark as read">
227 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
228 <option id
="qmcDefault" selected
>Actions
...</option
>
229 <option id
="qmcPrefs">Preferences
</option
>
230 <option id
="qmcSearch">Search
</option
>
231 <option disabled
>--------</option
>
232 <option style
="color : #5050aa" disabled
>Feed actions
:</option
>
233 <option id
="qmcAddFeed"> 
; 
;Subscribe to feed
</option
>
234 <option id
="qmcRemoveFeed"> 
; 
;Unsubscribe
</option
>
235 <!-- <option
>Edit this feed
</option
> -->
236 <option disabled
>--------</option
>
237 <option style
="color : #5050aa" disabled
>All feeds
:</option
>
238 <?
if (!ENABLE_UPDATE_DAEMON
) { ?
>
239 <option id
="qmcUpdateFeeds"> 
; 
;Update
</option
>
241 <option id
="qmcCatchupAll"> 
; 
;Mark
as read
</option
>
242 <option id
="qmcShowOnlyUnread"> 
; 
;Show only unread
</option
>
243 <option disabled
>--------</option
>
244 <option style
="color : #5050aa" disabled
>Other actions
:</option
>
245 <option id
="qmcAddFilter"> 
; 
;Create filter
</option
>
252 <?
if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
254 <td id
="headlines" class="headlines2" valign
="top">
255 <iframe frameborder
="0" name
="headlines-frame"
256 id
="headlines-frame" class="headlinesFrame"></iframe
>
261 <td id
="headlines" class="headlines" valign
="top">
262 <iframe frameborder
="0" name
="headlines-frame"
263 id
="headlines-frame" class="headlinesFrame"></iframe
>
266 <td
class="content" id
="content" valign
="top">
267 <iframe frameborder
="0" name
="content-frame"
268 id
="content-frame" class="contentFrame"> </iframe
>
272 <?
if (get_pref($link, 'DISPLAY_FOOTER')) { ?
>
274 <td colspan
="2" class="footer" id
="mainFooter">
275 <a href
="http://tt-rss.spb.ru/">Tiny
-Tiny RSS
</a
> v
<?
= VERSION ?
> ©
; 2005-2006 Andrew Dolgov
276 <?
if (WEB_DEMO_MODE
) { ?
>
277 <br
>Running in demo mode
, some functionality is disabled
.
284 <?
db_close($link); ?
>
286 <script type
="text/javascript">
288 function statechange() {
289 if (document
.readyState
== "interactive") init();
292 if (document
.readyState
) {
293 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
296 document
.onreadystatechange
= statechange
;