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 <!--[if gte IE
5.5000]>
41 <script type
="text/javascript" src
="pngfix.js"></script
>
42 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
45 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
47 <script type
="text/javascript" src
="prototype.js"></script
>
49 <script type
="text/javascript" src
="tt-rss.js?<?php echo $dt_add ?>"></script
>
50 <script type
="text/javascript" src
="functions.js?<?php echo $dt_add ?>"></script
>
51 <script type
="text/javascript" src
="feedlist.js?<?php echo $dt_add ?>"></script
>
52 <script type
="text/javascript" src
="viewfeed.js?<?php echo $dt_add ?>"></script
>
54 <!--[if gte IE
5.5000]>
55 <script type
="text/javascript" src
="pngfix.js"></script
>
56 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
58 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
60 <script type
="text/javascript">
61 if (navigator
.userAgent
.match("Opera")) {
62 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
64 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
65 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
72 <iframe id
="backReqBox"></iframe
>
74 <div id
="overlay"><div id
="overlay_inner">Loading
, please wait
...</div
></div
>
76 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
78 <div id
="fatal_error"><div id
="fatal_error_inner">
80 <div id
="fatal_error_msg">Unknown Error
</div
>
83 <script type
="text/javascript">
84 if (document
.addEventListener
) {
85 document
.addEventListener("DOMContentLoaded", init
, null);
90 <div id
="noDaemonWarning">
91 <b
>Warning
:</b
> Update daemon is enabled in configuration
, but daemon
92 process is not running
, which prevents all feeds from updating
. Please
93 start the daemon process
or contact instance owner
.
96 <ul id
="debug_output"></ul
>
98 <div id
="infoBoxShadow"><div id
="infoBox"> 
;</div
></div
>
101 <?php
if (!SINGLE_USER_MODE
) { ?
>
102 <div style
="float : right">
103 Hello
, <b
><?php
echo $_SESSION["name"] ?
></b
>
104 (<a href
="logout.php">Logout
</a
>)
107 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
110 <div id
="feeds-holder">
111 <div id
="dispSwitch">
112 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
114 <div id
="feeds-frame"> 
;</div
>
119 <div style
="float : right">
120 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
121 <option value
="qmcDefault" selected
>Actions
...</option
>
122 <option value
="qmcPrefs">Preferences
</option
>
123 <option value
="qmcSearch">Search
</option
>
124 <option disabled
>--------</option
>
125 <option style
="color : #5050aa" disabled
>Feed actions
:</option
>
126 <option value
="qmcAddFeed"> 
; 
;Subscribe to feed
</option
>
127 <option value
="qmcRemoveFeed"> 
; 
;Unsubscribe
</option
>
128 <!-- <option
>Edit this feed
</option
> -->
129 <option disabled
>--------</option
>
130 <option style
="color : #5050aa" disabled
>All feeds
:</option
>
131 <?php
if (!ENABLE_UPDATE_DAEMON
&& !DAEMON_REFRESH_ONLY
) { ?
>
132 <option value
="qmcUpdateFeeds"> 
; 
;Update
</option
>
134 <option value
="qmcCatchupAll"> 
; 
;Mark
as read
</option
>
135 <option value
="qmcShowOnlyUnread"> 
; 
;Show only unread
</option
>
136 <option disabled
>--------</option
>
137 <option style
="color : #5050aa" disabled
>Other actions
:</option
>
138 <option value
="qmcAddFilter"> 
; 
;Create filter
</option
>
142 <form id
="main_toolbar_form">
144 Search
: <input name
="query"
145 onKeyPress
="return filterCR(event, viewCurrentFeed)"
146 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
149 <select name
="view_mode" onchange
="viewCurrentFeed(0, '')">
150 <option selected value
="adaptive">Adaptive
</option
>
151 <option value
="all_articles">All Articles
</option
>
152 <option value
="marked">Starred
</option
>
153 <option value
="unread">Unread
</option
>
158 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
160 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
162 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
163 $limits[$def_art_limit] = $def_art_limit;
168 if (!$def_art_limit) {
172 print_select_hash("limit", $def_art_limit, $limits,
173 'onchange="viewCurrentFeed(0, \'\')"');
178 <!--  
;<input
class="button" type
="submit"
179 onclick
="quickMenuGo('qmcSearch')" value
="Search (tmp)"> -->
181  
;<input
class="button" type
="submit"
182 onclick
="viewCurrentFeed('ForceUpdate')" value
="Update">
184 <!-- <input
class="button" type
="submit"
185 onclick
="catchupCurrentFeed()" value
="Mark as read"> -->
189 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
190 <div id
="headlines-frame" class="headlines_normal"><div
class="whiteBox">No feed selected
.</div
></div
>
191 <div id
="content-frame"><div
class="whiteBox"> 
;</div
></div
>
193 <div id
="headlines-frame" class="headlines_cdm"><div
class="whiteBox">No feed selected
.</div
></div
>
197 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
198 <select id
="userSwitch" onchange
="userSwitch()">
200 foreach (array('admin', 'fox', 'test') as $u) {
201 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
202 print "<option $op_sel>$u</option>";
207 <a href
="http://tt-rss.spb.ru/">Tiny Tiny RSS
</a
> v
<?php
echo VERSION ?
> ©
; 2005-2006 Andrew Dolgov
210 <?php
db_close($link); ?
>
212 <script type
="text/javascript">
214 function statechange() {
215 if (document
.readyState
== "interactive") init();
218 if (document
.readyState
) {
219 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
222 document
.onreadystatechange
= statechange
;