2 error_reporting(E_ERROR | E_WARNING | E_PARSE
);
4 require_once "functions.php";
5 require_once "sessions.php";
6 require_once "sanity_check.php";
7 require_once "version.php";
8 require_once "config.php";
9 require_once "db-prefs.php";
11 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
13 login_sequence($link);
15 $dt_add = get_script_dt_add();
17 no_cache_incantation();
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 rel
="stylesheet" type
="text/css" href
="<?php echo $user_css_url ?>"/>
41 <script type
="text/javascript" src
="pngfix.js"></script
>
42 <link rel
="stylesheet" type
="text/css" href
="ie6.css">
46 <link rel
="stylesheet" type
="text/css" href
="ie7.css">
49 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
51 <script type
="text/javascript" src
="prototype.js"></script
>
52 <script type
="text/javascript" src
="localized_js.php?<?php echo $dt_add ?>"></script
>
54 <script type
="text/javascript" src
="tt-rss.js?<?php echo $dt_add ?>"></script
>
55 <script type
="text/javascript" src
="functions.js?<?php echo $dt_add ?>"></script
>
56 <script type
="text/javascript" src
="feedlist.js?<?php echo $dt_add ?>"></script
>
57 <script type
="text/javascript" src
="viewfeed.js?<?php echo $dt_add ?>"></script
>
59 <!--[if gte IE
5.5000]>
60 <script type
="text/javascript" src
="pngfix.js"></script
>
61 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
63 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
65 <script type
="text/javascript">
66 if (navigator
.userAgent
.match("Opera")) {
67 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
69 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
70 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
75 <body onresize
="resize_headlines()">
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 <div id
="dialog_overlay"> </div
>
98 <script type
="text/javascript">
99 if (document
.addEventListener
) {
100 document
.addEventListener("DOMContentLoaded", init
, null);
102 window
.onload
= init
;
105 <ul id
="debug_output"></ul
>
107 <div id
="infoBoxShadow"><div id
="infoBox"> 
;</div
></div
>
110 <div style
="float : right">
111 <?php
if (!SINGLE_USER_MODE
) { ?
>
112 <?php
echo __('Hello,') ?
> <b
><?php
echo $_SESSION["name"] ?
></b
>
113 (<a href
="logout.php"><?
= __('Logout') ?
></a
>)
115 <img id
="newVersionIcon" onclick
="javascript:explainError(2)"
116 src
="images/new_version.png" title
="New version is available!"
117 alt
="new_version_icon">
119 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
122 <div id
="feeds-holder">
123 <div id
="dispSwitch">
124 <a id
="dispSwitchPrompt"
125 href
="javascript:toggleTags()"><?php
echo __("tag cloud") ?
></a
>
127 <div id
="feeds-frame"> 
;</div
>
132 <div style
="float : right">
133 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
134 <option value
="qmcDefault" selected
><?php
echo __('Actions...') ?
></option
>
135 <option value
="qmcSearch"><?php
echo __('Search') ?
></option
>
136 <option value
="qmcPrefs"><?php
echo __('Preferences') ?
></option
>
137 <option disabled
>--------</option
>
138 <option style
="color : #5050aa" disabled
><?php
echo __('Feed actions:') ?
></option
>
139 <option value
="qmcAddFeed"><?php
echo __(' Subscribe to feed') ?
></option
>
140 <option value
="qmcEditFeed"><?php
echo __(' Edit this feed') ?
></option
>
141 <option value
="qmcRemoveFeed"><?php
echo __(' Unsubscribe') ?
></option
>
142 <!-- <option
>Edit this feed
</option
> -->
143 <option disabled
>--------</option
>
144 <option style
="color : #5050aa" disabled
><?php
echo __('All feeds:') ?
></option
>
145 <?php
if (!ENABLE_UPDATE_DAEMON
&& !DAEMON_REFRESH_ONLY
) { ?
>
146 <option value
="qmcUpdateFeeds"><?php
echo __(' Update') ?
></option
>
148 <option value
="qmcCatchupAll"><?php
echo __(' Mark as read') ?
></option
>
149 <option value
="qmcShowOnlyUnread"><?php
echo __(' (Un)hide read feeds') ?
></option
>
150 <option disabled
>--------</option
>
151 <option style
="color : #5050aa" disabled
><?php
echo __('Other actions:') ?
></option
>
152 <option value
="qmcAddFilter"><?php
echo __(' Create filter') ?
></option
>
156 <form id
="main_toolbar_form" onsubmit
='return false'>
158 <?php
echo __('Search:') ?
>
160 onKeyPress
="return filterCR(event, viewCurrentFeed)"
161 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
163 <?php
echo __('View:') ?
>
164 <select name
="view_mode" onchange
="viewCurrentFeed(0, '')">
165 <option selected value
="adaptive"><?php
echo __('Adaptive') ?
></option
>
166 <option value
="all_articles"><?php
echo __('All Articles') ?
></option
>
167 <option value
="marked"><?php
echo __('Starred') ?
></option
>
168 <option value
="unread"><?php
echo __('Unread') ?
></option
>
171 <?php
echo __('Limit:') ?
>
173 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
175 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
177 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
178 $limits[$def_art_limit] = $def_art_limit;
183 if (!$def_art_limit) {
187 print_select_hash("limit", $def_art_limit, $limits,
188 'onchange="viewCurrentFeed(0, \'\')"');
194 <input
class="button" type
="submit"
195 onclick
="return viewCurrentFeed('ForceUpdate')"
196 value
="<?php echo __('Update') ?>">
200 <!--  
;<input
class="button" type
="submit"
201 onclick
="quickMenuGo('qmcSearch')" value
="Search (tmp)"> -->
203 <!-- <input
class="button" type
="submit"
204 onclick
="catchupCurrentFeed()" value
="Mark as read"> -->
208 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
209 <div id
="headlines-frame" class="headlines_normal">
210 <div
class="whiteBox"><?php
echo __('No feed selected.') ?
></div
></div
>
211 <div id
="content-frame"><div
class="whiteBox"> 
;</div
></div
>
213 <div id
="headlines-frame" class="headlines_cdm">
214 <div
class="whiteBox"><?php
echo __('No feed selected.') ?
></div
></div
>
218 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
219 <select id
="userSwitch" onchange
="userSwitch()">
221 foreach (array('admin', 'fox', 'test') as $u) {
222 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
223 print "<option $op_sel>$u</option>";
228 <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
>
231 <?php
db_close($link); ?
>
233 <script type
="text/javascript">
235 function statechange() {
236 if (document
.readyState
== "interactive") init();
239 if (document
.readyState
) {
240 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
243 document
.onreadystatechange
= statechange
;