]> git.wh0rd.org - tt-rss.git/blame - tt-rss.php
rework no daemon warning
[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
0ee1d1a0
AD
100<ul id="debug_output"></ul>
101
cea10627
AD
102<div id="infoBoxShadow"><div id="infoBox">&nbsp;</div></div>
103
c2625f8e
AD
104<div id="header">
105 <?php if (!SINGLE_USER_MODE) { ?>
106 <div style="float : right">
d3f24242 107 <?php echo _('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b>
c2625f8e
AD
108 (<a href="logout.php">Logout</a>)
109 </div>
110 <?php } ?>
3f59e8cd 111 <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/>
c2625f8e 112</div>
caa4e57f 113
6b4163cb
AD
114<div id="feeds-holder">
115 <div id="dispSwitch">
116 <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
117 </div>
eb58af8d 118 <div id="feeds-frame">&nbsp;</div>
6b4163cb 119</div>
f69ea84d 120
6b4163cb 121<div id="toolbar">
5238347d 122
6b4163cb
AD
123 <div style="float : right">
124 <select id="quickMenuChooser" onchange="quickMenuChange()">
5e1c8606
AD
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>
6b4163cb 128 <option disabled>--------</option>
5e1c8606
AD
129 <option style="color : #5050aa" disabled><?php echo _('Feed actions:') ?></option>
130 <option value="qmcAddFeed"><?php echo _('&nbsp;&nbsp;Subscribe to feed') ?></option>
131 <option value="qmcEditFeed"><?php echo _('&nbsp;&nbsp;Edit this feed') ?></option>
132 <option value="qmcRemoveFeed"><?php echo _('&nbsp;&nbsp;Unsubscribe') ?></option>
6b4163cb
AD
133 <!-- <option>Edit this feed</option> -->
134 <option disabled>--------</option>
5e1c8606 135 <option style="color : #5050aa" disabled><?php echo _('All feeds:') ?></option>
6b4163cb 136 <?php if (!ENABLE_UPDATE_DAEMON && !DAEMON_REFRESH_ONLY) { ?>
5e1c8606 137 <option value="qmcUpdateFeeds"><?php echo _('&nbsp;&nbsp;Update') ?></option>
6b4163cb 138 <?php } ?>
5e1c8606
AD
139 <option value="qmcCatchupAll"><?php echo _('&nbsp;&nbsp;Mark as read') ?></option>
140 <option value="qmcShowOnlyUnread"><?php echo _('&nbsp;&nbsp;(Un)hide read feeds') ?></option>
6b4163cb 141 <option disabled>--------</option>
5e1c8606
AD
142 <option style="color : #5050aa" disabled><?php echo _('Other actions:') ?></option>
143 <option value="qmcAddFilter"><?php echo _('&nbsp;&nbsp;Create filter') ?></option>
6b4163cb
AD
144 </select>
145 </div>
5238347d 146
164f4738 147 <form id="main_toolbar_form">
5238347d 148
5e1c8606 149 <?php echo _('Search:') ?>
b76affe9 150 <input name="query"
6e6504bc 151 onKeyPress="return filterCR(event, viewCurrentFeed)"
b0005823 152 onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();">
8551c73a 153
5e1c8606 154 <?php echo _('View:') ?>
86b682ce 155 <select name="view_mode" onchange="viewCurrentFeed(0, '')">
5e1c8606
AD
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>
f0601b87 160 </select>
164f4738 161
5e1c8606 162 <?php echo _('Limit:') ?>
1d3a17c7 163 <?php
86b682ce 164 $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All");
f1b9a8ee 165
86b682ce 166 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
cb1083a1 167
86b682ce
AD
168 if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) {
169 $limits[$def_art_limit] = $def_art_limit;
170 }
1572afe5 171
86b682ce
AD
172 asort($limits);
173
174 if (!$def_art_limit) {
175 $def_art_limit = 30;
176 }
177
178 print_select_hash("limit", $def_art_limit, $limits,
179 'onchange="viewCurrentFeed(0, \'\')"');
180
181 ?>
182 </form>
1572afe5 183
86b682ce
AD
184 <!-- &nbsp;<input class="button" type="submit"
185 onclick="quickMenuGo('qmcSearch')" value="Search (tmp)"> -->
1572afe5 186
86b682ce 187 &nbsp;<input class="button" type="submit"
5e1c8606 188 onclick="viewCurrentFeed('ForceUpdate')" value="<?php echo _('Update') ?>">
f0601b87 189
11befbb2
AD
190 <!-- <input class="button" type="submit"
191 onclick="catchupCurrentFeed()" value="Mark as read"> -->
f0601b87 192
6b4163cb
AD
193 </div>
194
80e4dc34 195<?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
b76affe9 196 <div id="headlines-frame" class="headlines_normal">
5e1c8606 197 <div class="whiteBox"><?php echo _('No feed selected.') ?></div></div>
17ec931d 198 <div id="content-frame"><div class="whiteBox">&nbsp;</div></div>
80e4dc34 199<?php } else { ?>
b76affe9 200 <div id="headlines-frame" class="headlines_cdm">
5e1c8606 201 <div class="whiteBox"><?php echo _('No feed selected.') ?></div></div>
80e4dc34 202<?php } ?>
6b4163cb 203
c2625f8e 204<div id="footer">
461766f3
AD
205 <?php if (defined('_DEBUG_USER_SWITCH')) { ?>
206 <select id="userSwitch" onchange="userSwitch()">
207 <?php
208 foreach (array('admin', 'fox', 'test') as $u) {
209 $op_sel = ($u == $_SESSION["name"]) ? "selected" : "";
210 print "<option $op_sel>$u</option>";
211 }
212 ?>
213 </select>
aff31ecf 214 <?php } ?>
4dbe572f 215 <a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> v<?php echo VERSION ?> &copy; 2005-2007 Andrew Dolgov
c2625f8e 216</div>
1cd17194 217
1d3a17c7 218<?php db_close($link); ?>
1cd17194 219
97dcd654
AD
220<script type="text/javascript">
221 /* for IE */
222 function statechange() {
223 if (document.readyState == "interactive") init();
224 }
225
226 if (document.readyState) {
227 if (document.readyState == "interactive" || document.readyState == "complete") {
228 init();
229 } else {
230 document.onreadystatechange = statechange;
231 }
232 }
233</script>
234
1cd17194
AD
235</body>
236</html>