]> git.wh0rd.org - tt-rss.git/blame - tt-rss.php
I18N
[tt-rss.git] / tt-rss.php
CommitLineData
1d3a17c7 1<?php
7ae65adf
AD
2 require_once "functions.php";
3
4 basic_nosid_redirect_check();
5
36bfab86 6 require_once "sessions.php";
66581886
AD
7
8 require_once "sanity_check.php";
4062022e
AD
9 require_once "version.php";
10 require_once "config.php";
11 require_once "db-prefs.php";
da5d0d09 12
4062022e 13 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
c93f38c4 14
b8aa49bc 15 login_sequence($link);
ff485f1d 16
1b758780 17 $dt_add = get_script_dt_add();
53515ff1 18
4062022e 19?>
6b4163cb
AD
20<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
21 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1cd17194
AD
22<html>
23<head>
24 <title>Tiny Tiny RSS</title>
da5d0d09 25
430bf183
AD
26 <link rel="stylesheet" type="text/css" href="tt-rss.css">
27
1d3a17c7 28 <?php $user_theme = $_SESSION["theme"];
503eb349 29 if ($user_theme) { ?>
1d3a17c7
AD
30 <link rel="stylesheet" type="text/css" href="themes/<?php echo $user_theme ?>/theme.css">
31 <?php } ?>
503eb349 32
1d3a17c7 33 <?php if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?>
5d35cdcd 34
1d3a17c7
AD
35 <?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
36 <?php if ($user_css_url) { ?>
2e4afda7 37 <link rel="stylesheet" type="text/css" href="<?php echo $user_css_url ?>"/>
1d3a17c7 38 <?php } ?>
386d7b5b 39
935f235d
AD
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">
43 <![endif]-->
44
c0266b88
AD
45 <link rel="shortcut icon" type="image/png" href="images/favicon.png">
46
a58069db
AD
47 <script type="text/javascript" src="prototype.js"></script>
48
1d3a17c7
AD
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>
6b4163cb
AD
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>
53
d5224f0d
AD
54 <!--[if gte IE 5.5000]>
55 <script type="text/javascript" src="pngfix.js"></script>
96737ce9 56 <link rel="stylesheet" type="text/css" href="tt-rss-ie.css">
d5224f0d 57 <![endif]-->
d76a3b03 58 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
362698ad
AD
59
60 <script type="text/javascript">
61 if (navigator.userAgent.match("Opera")) {
62 document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
63 }
6b9bf6c2
AD
64 if (navigator.userAgent.match("Gecko") && !navigator.userAgent.match("KHTML")) {
65 document.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
66 }
362698ad 67 </script>
1cd17194
AD
68</head>
69
97dcd654
AD
70<body>
71
5d59d634
AD
72<iframe id="backReqBox"></iframe>
73
84916243
AD
74<div id="overlay">
75 <div id="overlay_inner">
b76affe9 76 <p><?php echo _("Loading, please wait...") ?></p>
84916243 77 <noscript>
b76affe9
AD
78 <div class="error"><?php echo
79 _("Your browser doesn't support Javascript, which is required
84916243 80 for this application to function properly. Please check your
b76affe9 81 browser settings.") ?></div>
84916243
AD
82 </noscript>
83 </div>
84</div>
6b4163cb 85
33b8cab4
AD
86<div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
87
af106b0e
AD
88<div id="fatal_error"><div id="fatal_error_inner">
89 <h1>Fatal Error</h1>
462a192b 90 <div id="fatal_error_msg">Unknown Error</div>
af106b0e 91</div></div>
2055d4a6 92
97dcd654
AD
93<script type="text/javascript">
94if (document.addEventListener) {
95 document.addEventListener("DOMContentLoaded", init, null);
96}
97window.onload = init;
98</script>
1cd17194 99
71ad883b 100<div id="noDaemonWarning">
b76affe9 101 <?php echo _("<b>Warning:</b> Update daemon is enabled in configuration, but daemon
71ad883b 102 process is not running, which prevents all feeds from updating. Please
b76affe9 103 start the daemon process or contact instance owner.") ?>
71ad883b 104</div>
27981ca3 105
0ee1d1a0
AD
106<ul id="debug_output"></ul>
107
cea10627
AD
108<div id="infoBoxShadow"><div id="infoBox">&nbsp;</div></div>
109
c2625f8e
AD
110<div id="header">
111 <?php if (!SINGLE_USER_MODE) { ?>
112 <div style="float : right">
d3f24242 113 <?php echo _('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b>
c2625f8e
AD
114 (<a href="logout.php">Logout</a>)
115 </div>
116 <?php } ?>
3f59e8cd 117 <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/>
c2625f8e 118</div>
caa4e57f 119
6b4163cb
AD
120<div id="feeds-holder">
121 <div id="dispSwitch">
122 <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
123 </div>
eb58af8d 124 <div id="feeds-frame">&nbsp;</div>
6b4163cb 125</div>
f69ea84d 126
6b4163cb 127<div id="toolbar">
5238347d 128
6b4163cb
AD
129 <div style="float : right">
130 <select id="quickMenuChooser" onchange="quickMenuChange()">
5e1c8606
AD
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>
6b4163cb 134 <option disabled>--------</option>
5e1c8606
AD
135 <option style="color : #5050aa" disabled><?php echo _('Feed actions:') ?></option>
136 <option value="qmcAddFeed"><?php echo _('&nbsp;&nbsp;Subscribe to feed') ?></option>
137 <option value="qmcEditFeed"><?php echo _('&nbsp;&nbsp;Edit this feed') ?></option>
138 <option value="qmcRemoveFeed"><?php echo _('&nbsp;&nbsp;Unsubscribe') ?></option>
6b4163cb
AD
139 <!-- <option>Edit this feed</option> -->
140 <option disabled>--------</option>
5e1c8606 141 <option style="color : #5050aa" disabled><?php echo _('All feeds:') ?></option>
6b4163cb 142 <?php if (!ENABLE_UPDATE_DAEMON && !DAEMON_REFRESH_ONLY) { ?>
5e1c8606 143 <option value="qmcUpdateFeeds"><?php echo _('&nbsp;&nbsp;Update') ?></option>
6b4163cb 144 <?php } ?>
5e1c8606
AD
145 <option value="qmcCatchupAll"><?php echo _('&nbsp;&nbsp;Mark as read') ?></option>
146 <option value="qmcShowOnlyUnread"><?php echo _('&nbsp;&nbsp;(Un)hide read feeds') ?></option>
6b4163cb 147 <option disabled>--------</option>
5e1c8606
AD
148 <option style="color : #5050aa" disabled><?php echo _('Other actions:') ?></option>
149 <option value="qmcAddFilter"><?php echo _('&nbsp;&nbsp;Create filter') ?></option>
6b4163cb
AD
150 </select>
151 </div>
5238347d 152
164f4738 153 <form id="main_toolbar_form">
5238347d 154
5e1c8606 155 <?php echo _('Search:') ?>
b76affe9 156 <input name="query"
6e6504bc 157 onKeyPress="return filterCR(event, viewCurrentFeed)"
b0005823 158 onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();">
164f4738 159 &nbsp;
5e1c8606 160 <?php echo _('View:') ?>
86b682ce 161 <select name="view_mode" onchange="viewCurrentFeed(0, '')">
5e1c8606
AD
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>
f0601b87 166 </select>
164f4738 167
b76affe9 168 &nbsp;
5e1c8606 169 <?php echo _('Limit:') ?>
1d3a17c7 170 <?php
86b682ce 171 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
f1b9a8ee 172
86b682ce 173 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
cb1083a1 174
86b682ce
AD
175 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
176 $limits[$def_art_limit] = $def_art_limit;
177 }
1572afe5 178
86b682ce
AD
179 asort($limits);
180
181 if (!$def_art_limit) {
182 $def_art_limit = 30;
183 }
184
185 print_select_hash("limit", $def_art_limit, $limits,
186 'onchange="viewCurrentFeed(0, \'\')"');
187
188 ?>
189 </form>
1572afe5 190
86b682ce
AD
191 <!-- &nbsp;<input class="button" type="submit"
192 onclick="quickMenuGo('qmcSearch')" value="Search (tmp)"> -->
1572afe5 193
86b682ce 194 &nbsp;<input class="button" type="submit"
5e1c8606 195 onclick="viewCurrentFeed('ForceUpdate')" value="<?php echo _('Update') ?>">
f0601b87 196
11befbb2
AD
197 <!-- <input class="button" type="submit"
198 onclick="catchupCurrentFeed()" value="Mark as read"> -->
f0601b87 199
6b4163cb
AD
200 </div>
201
80e4dc34 202<?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
b76affe9 203 <div id="headlines-frame" class="headlines_normal">
5e1c8606 204 <div class="whiteBox"><?php echo _('No feed selected.') ?></div></div>
17ec931d 205 <div id="content-frame"><div class="whiteBox">&nbsp;</div></div>
80e4dc34 206<?php } else { ?>
b76affe9 207 <div id="headlines-frame" class="headlines_cdm">
5e1c8606 208 <div class="whiteBox"><?php echo _('No feed selected.') ?></div></div>
80e4dc34 209<?php } ?>
6b4163cb 210
c2625f8e 211<div id="footer">
461766f3
AD
212 <?php if (defined('_DEBUG_USER_SWITCH')) { ?>
213 <select id="userSwitch" onchange="userSwitch()">
214 <?php
215 foreach (array('admin', 'fox', 'test') as $u) {
216 $op_sel = ($u == $_SESSION["name"]) ? "selected" : "";
217 print "<option $op_sel>$u</option>";
218 }
219 ?>
220 </select>
aff31ecf 221 <?php } ?>
c2625f8e
AD
222 <a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> v<?php echo VERSION ?> &copy; 2005-2006 Andrew Dolgov
223</div>
1cd17194 224
1d3a17c7 225<?php db_close($link); ?>
1cd17194 226
97dcd654
AD
227<script type="text/javascript">
228 /* for IE */
229 function statechange() {
230 if (document.readyState == "interactive") init();
231 }
232
233 if (document.readyState) {
234 if (document.readyState == "interactive" || document.readyState == "complete") {
235 init();
236 } else {
237 document.onreadystatechange = statechange;
238 }
239 }
240</script>
241
1cd17194
AD
242</body>
243</html>