]>
git.wh0rd.org - tt-rss.git/blob - tt-rss.php
ef9f2437c42e32ac22b1b992bc2198ab9c96f40a
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();
16 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
17 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
20 <title
>Tiny Tiny RSS
</title
>
22 <link rel
="stylesheet" type
="text/css" href
="tt-rss.css">
24 <?php
$user_theme = $_SESSION["theme"];
26 <link rel
="stylesheet" type
="text/css" href
="themes/<?php echo $user_theme ?>/theme.css">
29 <?php
if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?
>
31 <?php
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
32 <?php
if ($user_css_url) { ?
>
33 <link rel
="stylesheet" type
="text/css" href
="<?php echo $user_css_url ?>"/>
36 <!--[if gte IE
5.5000]>
37 <script type
="text/javascript" src
="pngfix.js"></script
>
38 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
41 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
43 <script type
="text/javascript" src
="prototype.js"></script
>
45 <script type
="text/javascript" src
="tt-rss.js?<?php echo $dt_add ?>"></script
>
46 <script type
="text/javascript" src
="functions.js?<?php echo $dt_add ?>"></script
>
47 <script type
="text/javascript" src
="feedlist.js?<?php echo $dt_add ?>"></script
>
48 <script type
="text/javascript" src
="viewfeed.js?<?php echo $dt_add ?>"></script
>
50 <!--[if gte IE
5.5000]>
51 <script type
="text/javascript" src
="pngfix.js"></script
>
52 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
54 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
56 <script type
="text/javascript">
57 if (navigator
.userAgent
.match("Opera")) {
58 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
60 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
61 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
68 <iframe id
="backReqBox"></iframe
>
71 <div id
="overlay_inner">
72 <p
><?php
echo _("Loading, please wait...") ?
></p
>
74 <div
class="error"><?php
echo
75 _("Your browser doesn't support Javascript, which is required
76 for this application to function properly. Please check your
77 browser settings.") ?
></div
>
82 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
84 <div id
="fatal_error"><div id
="fatal_error_inner">
86 <div id
="fatal_error_msg">Unknown Error
</div
>
89 <script type
="text/javascript">
90 if (document
.addEventListener
) {
91 document
.addEventListener("DOMContentLoaded", init
, null);
96 <ul id
="debug_output"></ul
>
98 <div id
="infoBoxShadow"><div id
="infoBox"> 
;</div
></div
>
101 <div style
="float : right">
102 <?php
if (!SINGLE_USER_MODE
) { ?
>
103 <?php
echo _('Hello,') ?
> <b
><?php
echo $_SESSION["name"] ?
></b
>
104 (<a href
="logout.php">Logout
</a
>)
106 <img id
="newVersionIcon" onclick
="javascript:explainError(2)"
107 src
="images/new_version.png" title
="New version is available!"
108 alt
="new_version_icon">
110 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
113 <div id
="feeds-holder">
114 <div id
="dispSwitch">
115 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
117 <div id
="feeds-frame"> 
;</div
>
122 <div style
="float : right">
123 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
124 <option value
="qmcDefault" selected
><?php
echo _('Actions...') ?
></option
>
125 <option value
="qmcSearch"><?php
echo _('Search') ?
></option
>
126 <option value
="qmcPrefs"><?php
echo _('Preferences') ?
></option
>
127 <option disabled
>--------</option
>
128 <option style
="color : #5050aa" disabled
><?php
echo _('Feed actions:') ?
></option
>
129 <option value
="qmcAddFeed"><?php
echo _(' Subscribe to feed') ?
></option
>
130 <option value
="qmcEditFeed"><?php
echo _(' Edit this feed') ?
></option
>
131 <option value
="qmcRemoveFeed"><?php
echo _(' Unsubscribe') ?
></option
>
132 <!-- <option
>Edit this feed
</option
> -->
133 <option disabled
>--------</option
>
134 <option style
="color : #5050aa" disabled
><?php
echo _('All feeds:') ?
></option
>
135 <?php
if (!ENABLE_UPDATE_DAEMON
&& !DAEMON_REFRESH_ONLY
) { ?
>
136 <option value
="qmcUpdateFeeds"><?php
echo _(' Update') ?
></option
>
138 <option value
="qmcCatchupAll"><?php
echo _(' Mark as read') ?
></option
>
139 <option value
="qmcShowOnlyUnread"><?php
echo _(' (Un)hide read feeds') ?
></option
>
140 <option disabled
>--------</option
>
141 <option style
="color : #5050aa" disabled
><?php
echo _('Other actions:') ?
></option
>
142 <option value
="qmcAddFilter"><?php
echo _(' Create filter') ?
></option
>
146 <form id
="main_toolbar_form">
148 <?php
echo _('Search:') ?
>
150 onKeyPress
="return filterCR(event, viewCurrentFeed)"
151 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
153 <?php
echo _('View:') ?
>
154 <select name
="view_mode" onchange
="viewCurrentFeed(0, '')">
155 <option selected value
="adaptive"><?php
echo _('Adaptive') ?
></option
>
156 <option value
="all_articles"><?php
echo _('All Articles') ?
></option
>
157 <option value
="marked"><?php
echo _('Starred') ?
></option
>
158 <option value
="unread"><?php
echo _('Unread') ?
></option
>
161 <?php
echo _('Limit:') ?
>
163 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
165 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
167 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
168 $limits[$def_art_limit] = $def_art_limit;
173 if (!$def_art_limit) {
177 print_select_hash("limit", $def_art_limit, $limits,
178 'onchange="viewCurrentFeed(0, \'\')"');
184 <input
class="button" type
="submit"
185 onclick
="return viewCurrentFeed('ForceUpdate')"
186 value
="<?php echo _('Update') ?>">
190 <!--  
;<input
class="button" type
="submit"
191 onclick
="quickMenuGo('qmcSearch')" value
="Search (tmp)"> -->
193 <!-- <input
class="button" type
="submit"
194 onclick
="catchupCurrentFeed()" value
="Mark as read"> -->
198 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
199 <div id
="headlines-frame" class="headlines_normal">
200 <div
class="whiteBox"><?php
echo _('No feed selected.') ?
></div
></div
>
201 <div id
="content-frame"><div
class="whiteBox"> 
;</div
></div
>
203 <div id
="headlines-frame" class="headlines_cdm">
204 <div
class="whiteBox"><?php
echo _('No feed selected.') ?
></div
></div
>
208 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
209 <select id
="userSwitch" onchange
="userSwitch()">
211 foreach (array('admin', 'fox', 'test') as $u) {
212 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
213 print "<option $op_sel>$u</option>";
218 <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
>
221 <?php
db_close($link); ?
>
223 <script type
="text/javascript">
225 function statechange() {
226 if (document
.readyState
== "interactive") init();
229 if (document
.readyState
) {
230 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
233 document
.onreadystatechange
= statechange
;