]>
git.wh0rd.org - tt-rss.git/blob - tt-rss.php
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 rel
="stylesheet" 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
>
75 <div id
="overlay_inner">
76 <p
><?php
echo _("Loading, please wait...") ?
></p
>
78 <div
class="error"><?php
echo
79 _("Your browser doesn't support Javascript, which is required
80 for this application to function properly. Please check your
81 browser settings.") ?
></div
>
86 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
88 <div id
="fatal_error"><div id
="fatal_error_inner">
90 <div id
="fatal_error_msg">Unknown Error
</div
>
93 <script type
="text/javascript">
94 if (document
.addEventListener
) {
95 document
.addEventListener("DOMContentLoaded", init
, null);
100 <ul id
="debug_output"></ul
>
102 <div id
="infoBoxShadow"><div id
="infoBox"> 
;</div
></div
>
105 <?php
if (!SINGLE_USER_MODE
) { ?
>
106 <div style
="float : right">
107 <?php
echo _('Hello,') ?
> <b
><?php
echo $_SESSION["name"] ?
></b
>
108 (<a href
="logout.php">Logout
</a
>)
111 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
114 <div id
="feeds-holder">
115 <div id
="dispSwitch">
116 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
118 <div id
="feeds-frame"> 
;</div
>
123 <div style
="float : right">
124 <select id
="quickMenuChooser" onchange
="quickMenuChange()">
125 <option value
="qmcDefault" selected
><?php
echo _('Actions...') ?
></option
>
126 <option value
="qmcSearch"><?php
echo _('Search') ?
></option
>
127 <option value
="qmcPrefs"><?php
echo _('Preferences') ?
></option
>
128 <option disabled
>--------</option
>
129 <option style
="color : #5050aa" disabled
><?php
echo _('Feed actions:') ?
></option
>
130 <option value
="qmcAddFeed"><?php
echo _(' Subscribe to feed') ?
></option
>
131 <option value
="qmcEditFeed"><?php
echo _(' Edit this feed') ?
></option
>
132 <option value
="qmcRemoveFeed"><?php
echo _(' Unsubscribe') ?
></option
>
133 <!-- <option
>Edit this feed
</option
> -->
134 <option disabled
>--------</option
>
135 <option style
="color : #5050aa" disabled
><?php
echo _('All feeds:') ?
></option
>
136 <?php
if (!ENABLE_UPDATE_DAEMON
&& !DAEMON_REFRESH_ONLY
) { ?
>
137 <option value
="qmcUpdateFeeds"><?php
echo _(' Update') ?
></option
>
139 <option value
="qmcCatchupAll"><?php
echo _(' Mark as read') ?
></option
>
140 <option value
="qmcShowOnlyUnread"><?php
echo _(' (Un)hide read feeds') ?
></option
>
141 <option disabled
>--------</option
>
142 <option style
="color : #5050aa" disabled
><?php
echo _('Other actions:') ?
></option
>
143 <option value
="qmcAddFilter"><?php
echo _(' Create filter') ?
></option
>
147 <form id
="main_toolbar_form">
149 <?php
echo _('Search:') ?
>
151 onKeyPress
="return filterCR(event, viewCurrentFeed)"
152 onblur
="javascript:enableHotkeys();" onfocus
="javascript:disableHotkeys();">
154 <?php
echo _('View:') ?
>
155 <select name
="view_mode" onchange
="viewCurrentFeed(0, '')">
156 <option selected value
="adaptive"><?php
echo _('Adaptive') ?
></option
>
157 <option value
="all_articles"><?php
echo _('All Articles') ?
></option
>
158 <option value
="marked"><?php
echo _('Starred') ?
></option
>
159 <option value
="unread"><?php
echo _('Unread') ?
></option
>
162 <?php
echo _('Limit:') ?
>
164 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
166 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
168 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
169 $limits[$def_art_limit] = $def_art_limit;
174 if (!$def_art_limit) {
178 print_select_hash("limit", $def_art_limit, $limits,
179 'onchange="viewCurrentFeed(0, \'\')"');
184 <!--  
;<input
class="button" type
="submit"
185 onclick
="quickMenuGo('qmcSearch')" value
="Search (tmp)"> -->
187  
;<input
class="button" type
="submit"
188 onclick
="viewCurrentFeed('ForceUpdate')" value
="<?php echo _('Update') ?>">
190 <!-- <input
class="button" type
="submit"
191 onclick
="catchupCurrentFeed()" value
="Mark as read"> -->
195 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
196 <div id
="headlines-frame" class="headlines_normal">
197 <div
class="whiteBox"><?php
echo _('No feed selected.') ?
></div
></div
>
198 <div id
="content-frame"><div
class="whiteBox"> 
;</div
></div
>
200 <div id
="headlines-frame" class="headlines_cdm">
201 <div
class="whiteBox"><?php
echo _('No feed selected.') ?
></div
></div
>
205 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
206 <select id
="userSwitch" onchange
="userSwitch()">
208 foreach (array('admin', 'fox', 'test') as $u) {
209 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
210 print "<option $op_sel>$u</option>";
215 <a href
="http://tt-rss.spb.ru/">Tiny Tiny RSS
</a
> v
<?php
echo VERSION ?
> ©
; 2005-2007 Andrew Dolgov
218 <?php
db_close($link); ?
>
220 <script type
="text/javascript">
222 function statechange() {
223 if (document
.readyState
== "interactive") init();
226 if (document
.readyState
) {
227 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
230 document
.onreadystatechange
= statechange
;