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();
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">
28 <?php
$user_theme = $_SESSION["theme"];
30 <link rel
="stylesheet" type
="text/css" href
="themes/<?php echo $user_theme ?>/theme.css">
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 type
="text/css" href
="<?php echo $user_css_url ?>"/>
40 <?php
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?
>
42 <link rel
="stylesheet" href
="tt-rss_compact.css" type
="text/css">
46 <link title
="Compact Stylesheet" rel
="alternate stylesheet"
47 type
="text/css" href
="tt-rss_compact.css"/>
51 <!--[if gte IE
5.5000]>
52 <script type
="text/javascript" src
="pngfix.js"></script
>
53 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
56 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
58 <script type
="text/javascript" src
="prototype.js"></script
>
60 <script type
="text/javascript" src
="tt-rss.js?<?php echo $dt_add ?>"></script
>
61 <script type
="text/javascript" src
="functions.js?<?php echo $dt_add ?>"></script
>
62 <script type
="text/javascript" src
="feedlist.js?<?php echo $dt_add ?>"></script
>
63 <script type
="text/javascript" src
="viewfeed.js?<?php echo $dt_add ?>"></script
>
65 <!--[if gte IE
5.5000]>
66 <script type
="text/javascript" src
="pngfix.js"></script
>
67 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
69 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
71 <script type
="text/javascript">
72 if (navigator
.userAgent
.match("Opera")) {
73 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
75 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
76 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
83 <iframe id
="backReqBox"></iframe
>
85 <div id
="overlay"><div id
="overlay_inner">Loading
, please wait
...</div
></div
>
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 <script type
="text/javascript">
95 if (document
.addEventListener
) {
96 document
.addEventListener("DOMContentLoaded", init
, null);
101 <div id
="noDaemonWarning">
102 <b
>Warning
:</b
> Update daemon is enabled in configuration
, but daemon
103 process is not running
, which prevents all feeds from updating
. Please
104 start the daemon process
or contact instance owner
.
107 <ul id
="debug_output"></ul
>
109 <div id
="infoBoxShadow"><div id
="infoBox"> 
;</div
></div
>
112 <?php
if (!SINGLE_USER_MODE
) { ?
>
113 <div style
="float : right">
114 Hello
, <b
><?php
echo $_SESSION["name"] ?
></b
>
115 (<a href
="logout.php">Logout
</a
>)
118 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
121 <div id
="feeds-holder">
122 <div id
="dispSwitch">
123 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
125 <div id
="feeds-frame"> 
;</div
>
130 <div style
="float : right">
131 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
132 <option value
="qmcDefault" selected
>Actions
...</option
>
133 <option value
="qmcPrefs">Preferences
</option
>
134 <option value
="qmcSearch">Search
</option
>
135 <option disabled
>--------</option
>
136 <option style
="color : #5050aa" disabled
>Feed actions
:</option
>
137 <option value
="qmcAddFeed"> 
; 
;Subscribe to feed
</option
>
138 <option value
="qmcRemoveFeed"> 
; 
;Unsubscribe
</option
>
139 <!-- <option
>Edit this feed
</option
> -->
140 <option disabled
>--------</option
>
141 <option style
="color : #5050aa" disabled
>All feeds
:</option
>
142 <?php
if (!ENABLE_UPDATE_DAEMON
&& !DAEMON_REFRESH_ONLY
) { ?
>
143 <option value
="qmcUpdateFeeds"> 
; 
;Update
</option
>
145 <option value
="qmcCatchupAll"> 
; 
;Mark
as read
</option
>
146 <option value
="qmcShowOnlyUnread"> 
; 
;Show only unread
</option
>
147 <option disabled
>--------</option
>
148 <option style
="color : #5050aa" disabled
>Other actions
:</option
>
149 <option value
="qmcAddFilter"> 
; 
;Create filter
</option
>
153 <form id
="main_toolbar_form">
155 <?php
if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?
>
157 onKeyPress
="return filterCR(event)"
158 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
159 <input
class="button" type
="submit"
160 onclick
="return viewCurrentFeed(0)" value
="Search">
165 <select name
="view_mode" onchange
="viewCurrentFeed(0, '')">
166 <option selected value
="adaptive">Adaptive
</option
>
167 <option value
="all_articles">All Articles
</option
>
168 <option value
="marked">Starred
</option
>
169 <option value
="unread">Unread
</option
>
174 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
176 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
178 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
179 $limits[$def_art_limit] = $def_art_limit;
184 if (!$def_art_limit) {
188 print_select_hash("limit", $def_art_limit, $limits,
189 'onchange="viewCurrentFeed(0, \'\')"');
194 <!--  
;<input
class="button" type
="submit"
195 onclick
="quickMenuGo('qmcSearch')" value
="Search (tmp)"> -->
197  
;<input
class="button" type
="submit"
198 onclick
="viewCurrentFeed('ForceUpdate')" value
="Update">
200 <!-- <input
class="button" type
="submit"
201 onclick
="catchupCurrentFeed()" value
="Mark as read"> -->
205 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
206 <div id
="headlines-frame" class="headlines_normal"><div
class="whiteBox">No feed selected
.</div
></div
>
207 <div id
="content-frame"> 
;</div
>
209 <div id
="headlines-frame" class="headlines_cdm"><div
class="whiteBox">No feed selected
.</div
></div
>
213 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
214 <select id
="userSwitch" onchange
="userSwitch()">
216 foreach (array('admin', 'fox', 'test') as $u) {
217 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
218 print "<option $op_sel>$u</option>";
223 <a href
="http://tt-rss.spb.ru/">Tiny Tiny RSS
</a
> v
<?php
echo VERSION ?
> ©
; 2005-2006 Andrew Dolgov
226 <?php
db_close($link); ?
>
228 <script type
="text/javascript">
230 function statechange() {
231 if (document
.readyState
== "interactive") init();
234 if (document
.readyState
) {
235 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
238 document
.onreadystatechange
= statechange
;