]>
git.wh0rd.org - tt-rss.git/blob - tt-rss.php
2 require_once "functions.php";
3 require_once "sessions.php";
4 require_once "sanity_check.php";
5 require_once "version.php";
6 require_once "config.php";
7 require_once "db-prefs.php";
9 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
11 login_sequence($link);
13 $dt_add = get_script_dt_add();
15 no_cache_incantation();
18 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
19 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22 <title
>Tiny Tiny RSS
</title
>
24 <link rel
="stylesheet" type
="text/css" href
="tt-rss.css">
26 <?php
$user_theme = $_SESSION["theme"];
28 <link rel
="stylesheet" type
="text/css" href
="themes/<?php echo $user_theme ?>/theme.css">
31 <?php
if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?
>
33 <?php
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
34 <?php
if ($user_css_url) { ?
>
35 <link rel
="stylesheet" type
="text/css" href
="<?php echo $user_css_url ?>"/>
38 <!--[if gte IE
5.5000]>
39 <script type
="text/javascript" src
="pngfix.js"></script
>
40 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
43 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
45 <script type
="text/javascript" src
="prototype.js"></script
>
47 <script type
="text/javascript" src
="tt-rss.js?<?php echo $dt_add ?>"></script
>
48 <script type
="text/javascript" src
="functions.js?<?php echo $dt_add ?>"></script
>
49 <script type
="text/javascript" src
="feedlist.js?<?php echo $dt_add ?>"></script
>
50 <script type
="text/javascript" src
="viewfeed.js?<?php echo $dt_add ?>"></script
>
52 <!--[if gte IE
5.5000]>
53 <script type
="text/javascript" src
="pngfix.js"></script
>
54 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
56 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
58 <script type
="text/javascript">
59 if (navigator
.userAgent
.match("Opera")) {
60 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
62 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
63 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
70 <iframe id
="backReqBox"></iframe
>
73 <div id
="overlay_inner">
74 <p
><?php
echo _("Loading, please wait...") ?
></p
>
76 <div
class="error"><?php
echo
77 _("Your browser doesn't support Javascript, which is required
78 for this application to function properly. Please check your
79 browser settings.") ?
></div
>
84 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
86 <div id
="fatal_error"><div id
="fatal_error_inner">
88 <div id
="fatal_error_msg">Unknown Error
</div
>
91 <script type
="text/javascript">
92 if (document
.addEventListener
) {
93 document
.addEventListener("DOMContentLoaded", init
, null);
98 <ul id
="debug_output"></ul
>
100 <div id
="infoBoxShadow"><div id
="infoBox"> 
;</div
></div
>
103 <div style
="float : right">
104 <?php
if (!SINGLE_USER_MODE
) { ?
>
105 <?php
echo _('Hello,') ?
> <b
><?php
echo $_SESSION["name"] ?
></b
>
106 (<a href
="logout.php">Logout
</a
>)
108 <img id
="newVersionIcon" onclick
="javascript:explainError(2)"
109 src
="images/new_version.png" title
="New version is available!"
110 alt
="new_version_icon">
112 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
115 <div id
="feeds-holder">
116 <div id
="dispSwitch">
117 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
119 <div id
="feeds-frame"> 
;</div
>
124 <div style
="float : right">
125 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
126 <option value
="qmcDefault" selected
><?php
echo _('Actions...') ?
></option
>
127 <option value
="qmcSearch"><?php
echo _('Search') ?
></option
>
128 <option value
="qmcPrefs"><?php
echo _('Preferences') ?
></option
>
129 <option disabled
>--------</option
>
130 <option style
="color : #5050aa" disabled
><?php
echo _('Feed actions:') ?
></option
>
131 <option value
="qmcAddFeed"><?php
echo _(' Subscribe to feed') ?
></option
>
132 <option value
="qmcEditFeed"><?php
echo _(' Edit this feed') ?
></option
>
133 <option value
="qmcRemoveFeed"><?php
echo _(' Unsubscribe') ?
></option
>
134 <!-- <option
>Edit this feed
</option
> -->
135 <option disabled
>--------</option
>
136 <option style
="color : #5050aa" disabled
><?php
echo _('All feeds:') ?
></option
>
137 <?php
if (!ENABLE_UPDATE_DAEMON
&& !DAEMON_REFRESH_ONLY
) { ?
>
138 <option value
="qmcUpdateFeeds"><?php
echo _(' Update') ?
></option
>
140 <option value
="qmcCatchupAll"><?php
echo _(' Mark as read') ?
></option
>
141 <option value
="qmcShowOnlyUnread"><?php
echo _(' (Un)hide read feeds') ?
></option
>
142 <option disabled
>--------</option
>
143 <option style
="color : #5050aa" disabled
><?php
echo _('Other actions:') ?
></option
>
144 <option value
="qmcAddFilter"><?php
echo _(' Create filter') ?
></option
>
148 <form id
="main_toolbar_form" onsubmit
='return false'>
150 <?php
echo _('Search:') ?
>
152 onKeyPress
="return filterCR(event, viewCurrentFeed)"
153 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
155 <?php
echo _('View:') ?
>
156 <select name
="view_mode" onchange
="viewCurrentFeed(0, '')">
157 <option selected value
="adaptive"><?php
echo _('Adaptive') ?
></option
>
158 <option value
="all_articles"><?php
echo _('All Articles') ?
></option
>
159 <option value
="marked"><?php
echo _('Starred') ?
></option
>
160 <option value
="unread"><?php
echo _('Unread') ?
></option
>
163 <?php
echo _('Limit:') ?
>
165 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
167 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
169 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
170 $limits[$def_art_limit] = $def_art_limit;
175 if (!$def_art_limit) {
179 print_select_hash("limit", $def_art_limit, $limits,
180 'onchange="viewCurrentFeed(0, \'\')"');
186 <input
class="button" type
="submit"
187 onclick
="return viewCurrentFeed('ForceUpdate')"
188 value
="<?php echo _('Update') ?>">
192 <!--  
;<input
class="button" type
="submit"
193 onclick
="quickMenuGo('qmcSearch')" value
="Search (tmp)"> -->
195 <!-- <input
class="button" type
="submit"
196 onclick
="catchupCurrentFeed()" value
="Mark as read"> -->
200 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
201 <div id
="headlines-frame" class="headlines_normal">
202 <div
class="whiteBox"><?php
echo _('No feed selected.') ?
></div
></div
>
203 <div id
="content-frame"><div
class="whiteBox"> 
;</div
></div
>
205 <div id
="headlines-frame" class="headlines_cdm">
206 <div
class="whiteBox"><?php
echo _('No feed selected.') ?
></div
></div
>
210 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
211 <select id
="userSwitch" onchange
="userSwitch()">
213 foreach (array('admin', 'fox', 'test') as $u) {
214 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
215 print "<option $op_sel>$u</option>";
220 <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
>
223 <?php
db_close($link); ?
>
225 <script type
="text/javascript">
227 function statechange() {
228 if (document
.readyState
== "interactive") init();
231 if (document
.readyState
) {
232 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
235 document
.onreadystatechange
= statechange
;