2 error_reporting(E_ERROR | E_WARNING | E_PARSE
);
4 require_once "functions.php";
8 require_once "sessions.php";
9 require_once "sanity_check.php";
10 require_once "version.php";
11 require_once "config.php";
12 require_once "db-prefs.php";
14 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
16 login_sequence($link);
18 $dt_add = get_script_dt_add();
20 no_cache_incantation();
23 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
24 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
27 <title
>Tiny Tiny RSS
</title
>
29 <link rel
="stylesheet" type
="text/css" href
="tt-rss.css">
31 <?php
$user_theme = $_SESSION["theme"];
33 <link rel
="stylesheet" type
="text/css" href
="themes/<?php echo $user_theme ?>/theme.css">
36 <?php
if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?
>
38 <?php
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
39 <?php
if ($user_css_url) { ?
>
40 <link rel
="stylesheet" type
="text/css" href
="<?php echo $user_css_url ?>"/>
43 <!--[if gte IE
5.5000]>
44 <script type
="text/javascript" src
="pngfix.js"></script
>
45 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
48 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
50 <script type
="text/javascript" src
="prototype.js"></script
>
52 <script type
="text/javascript" src
="tt-rss.js?<?php echo $dt_add ?>"></script
>
53 <script type
="text/javascript" src
="functions.js?<?php echo $dt_add ?>"></script
>
54 <script type
="text/javascript" src
="feedlist.js?<?php echo $dt_add ?>"></script
>
55 <script type
="text/javascript" src
="viewfeed.js?<?php echo $dt_add ?>"></script
>
57 <!--[if gte IE
5.5000]>
58 <script type
="text/javascript" src
="pngfix.js"></script
>
59 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
61 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
63 <script type
="text/javascript">
64 if (navigator
.userAgent
.match("Opera")) {
65 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
67 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
68 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
75 <iframe id
="backReqBox"></iframe
>
78 <div id
="overlay_inner">
79 <p
><?php
echo __("Loading, please wait...") ?
></p
>
81 <div
class="error"><?php
echo
82 __("Your browser doesn't support Javascript, which is required
83 for this application to function properly. Please check your
84 browser settings.") ?
></div
>
89 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
91 <div id
="fatal_error"><div id
="fatal_error_inner">
93 <div id
="fatal_error_msg">Unknown Error
</div
>
96 <script type
="text/javascript">
97 if (document
.addEventListener
) {
98 document
.addEventListener("DOMContentLoaded", init
, null);
100 window
.onload
= init
;
103 <ul id
="debug_output"></ul
>
105 <div id
="infoBoxShadow"><div id
="infoBox"> 
;</div
></div
>
108 <div style
="float : right">
109 <?php
if (!SINGLE_USER_MODE
) { ?
>
110 <?php
echo __('Hello,') ?
> <b
><?php
echo $_SESSION["name"] ?
></b
>
111 (<a href
="logout.php">Logout
</a
>)
113 <img id
="newVersionIcon" onclick
="javascript:explainError(2)"
114 src
="images/new_version.png" title
="New version is available!"
115 alt
="new_version_icon">
117 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
120 <div id
="feeds-holder">
121 <div id
="dispSwitch">
122 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
124 <div id
="feeds-frame"> 
;</div
>
129 <div style
="float : right">
130 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
131 <option value
="qmcDefault" selected
><?php
echo __('Actions...') ?
></option
>
132 <option value
="qmcSearch"><?php
echo __('Search') ?
></option
>
133 <option value
="qmcPrefs"><?php
echo __('Preferences') ?
></option
>
134 <option disabled
>--------</option
>
135 <option style
="color : #5050aa" disabled
><?php
echo __('Feed actions:') ?
></option
>
136 <option value
="qmcAddFeed"><?php
echo __(' Subscribe to feed') ?
></option
>
137 <option value
="qmcEditFeed"><?php
echo __(' Edit this feed') ?
></option
>
138 <option value
="qmcRemoveFeed"><?php
echo __(' Unsubscribe') ?
></option
>
139 <!-- <option
>Edit this feed
</option
> -->
140 <option disabled
>--------</option
>
141 <option style
="color : #5050aa" disabled
><?php
echo __('All feeds:') ?
></option
>
142 <?php
if (!ENABLE_UPDATE_DAEMON
&& !DAEMON_REFRESH_ONLY
) { ?
>
143 <option value
="qmcUpdateFeeds"><?php
echo __(' Update') ?
></option
>
145 <option value
="qmcCatchupAll"><?php
echo __(' Mark as read') ?
></option
>
146 <option value
="qmcShowOnlyUnread"><?php
echo __(' (Un)hide read feeds') ?
></option
>
147 <option disabled
>--------</option
>
148 <option style
="color : #5050aa" disabled
><?php
echo __('Other actions:') ?
></option
>
149 <option value
="qmcAddFilter"><?php
echo __(' Create filter') ?
></option
>
153 <form id
="main_toolbar_form" onsubmit
='return false'>
155 <?php
echo __('Search:') ?
>
157 onKeyPress
="return filterCR(event, viewCurrentFeed)"
158 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
160 <?php
echo __('View:') ?
>
161 <select name
="view_mode" onchange
="viewCurrentFeed(0, '')">
162 <option selected value
="adaptive"><?php
echo __('Adaptive') ?
></option
>
163 <option value
="all_articles"><?php
echo __('All Articles') ?
></option
>
164 <option value
="marked"><?php
echo __('Starred') ?
></option
>
165 <option value
="unread"><?php
echo __('Unread') ?
></option
>
168 <?php
echo __('Limit:') ?
>
170 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
172 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
174 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
175 $limits[$def_art_limit] = $def_art_limit;
180 if (!$def_art_limit) {
184 print_select_hash("limit", $def_art_limit, $limits,
185 'onchange="viewCurrentFeed(0, \'\')"');
191 <input
class="button" type
="submit"
192 onclick
="return viewCurrentFeed('ForceUpdate')"
193 value
="<?php echo __('Update') ?>">
197 <!--  
;<input
class="button" type
="submit"
198 onclick
="quickMenuGo('qmcSearch')" value
="Search (tmp)"> -->
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">
207 <div
class="whiteBox"><?php
echo __('No feed selected.') ?
></div
></div
>
208 <div id
="content-frame"><div
class="whiteBox"> 
;</div
></div
>
210 <div id
="headlines-frame" class="headlines_cdm">
211 <div
class="whiteBox"><?php
echo __('No feed selected.') ?
></div
></div
>
215 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
216 <select id
="userSwitch" onchange
="userSwitch()">
218 foreach (array('admin', 'fox', 'test') as $u) {
219 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
220 print "<option $op_sel>$u</option>";
225 <a href
="http://tt-rss.spb.ru/">Tiny Tiny RSS
</a
> v
<?php
echo VERSION ?
> ©
; 2005-2007 <a href
="http://bah.org.ru/">Andrew Dolgov
</a
>
228 <?php
db_close($link); ?
>
230 <script type
="text/javascript">
232 function statechange() {
233 if (document
.readyState
== "interactive") init();
236 if (document
.readyState
) {
237 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
240 document
.onreadystatechange
= statechange
;