]> git.wh0rd.org - tt-rss.git/blob - tt-rss.php
remove error_reporting() hacks; set default error reporting level in functions.php
[tt-rss.git] / tt-rss.php
1 <?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";
8
9 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
10
11 init_connection($link);
12
13 login_sequence($link);
14
15 $dt_add = time();
16
17 no_cache_incantation();
18
19 header('Content-Type: text/html; charset=utf-8');
20
21 ?>
22 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
23 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
24 <html>
25 <head>
26 <title>Tiny Tiny RSS</title>
27
28 <link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"/>
29 <link rel="stylesheet" type="text/css" href="infobox.css?<?php echo $dt_add ?>"/>
30 <link rel="stylesheet" type="text/css" href="cdm.css?<?php echo $dt_add ?>"/>
31
32 <?php $user_theme = get_user_theme_path($link);
33 if ($user_theme) { ?>
34 <link rel="stylesheet" type="text/css" href="<?php echo $user_theme ?>/theme.css?<?php echo $dt_add ?>">
35 <?php } ?>
36
37 <?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
38 <?php if ($user_css_url) { ?>
39 <link rel="stylesheet" type="text/css" href="<?php echo $user_css_url ?>"/>
40 <?php } ?>
41
42 <link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
43
44 <script type="text/javascript" src="lib/prototype.js"></script>
45 <script type="text/javascript" src="lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script>
46 <script type="text/javascript" charset="utf-8" src="localized_js.php?<?php echo $dt_add ?>"></script>
47 <script type="text/javascript" charset="utf-8" src="tt-rss.js?<?php echo $dt_add ?>"></script>
48 <script type="text/javascript" charset="utf-8" src="functions.js?<?php echo $dt_add ?>"></script>
49 <script type="text/javascript" charset="utf-8" src="feedlist.js?<?php echo $dt_add ?>"></script>
50 <script type="text/javascript" charset="utf-8" src="viewfeed.js?<?php echo $dt_add ?>"></script>
51 <script type="text/javascript" charset="utf-8" src="offline.js?<?php echo $dt_add ?>"></script>
52
53 <script type="text/javascript" src="gears_init.js"></script>
54 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
55
56 <script type="text/javascript">
57 Event.observe(window, 'load', function() {
58 init();
59 });
60 </script>
61 </head>
62
63 <body id="ttrssMain">
64
65 <div id="overlay" style="display : block">
66 <div id="overlay_inner">
67 <?php echo __("Loading, please wait...") ?>
68
69 <div id="l_progress_o">
70 <div id="l_progress_i"></div>
71 </div>
72
73 <noscript>
74 <p>
75 <?php print_error(__("Your browser doesn't support Javascript, which is required
76 for this application to function properly. Please check your
77 browser settings.")) ?></p>
78 </noscript>
79 </div>
80 </div>
81
82 <div id="hotkey_help_overlay" style="display : none" onclick="Element.hide(this)">
83 <?php rounded_table_start("hho"); ?>
84 <?php include "help/3.php" ?>
85 <?php rounded_table_end(); ?>
86 </div>
87
88 <div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
89 <div id="dialog_overlay" style="display : none"> </div>
90 <div id="infoBoxShadow" style="display : none"><div id="infoBox">&nbsp;</div></div>
91 <div id="cmdline" style="display : none"></div>
92 <div id="auxDlg" style="display : none"></div>
93
94 <div id="errorBoxShadow" style="display : none">
95 <div id="errorBox">
96 <div id="xebTitle"><?php echo __('Fatal Exception') ?></div><div id="xebContent">&nbsp;</div>
97 <div id="xebBtn" align='center'>
98 <button onclick="closeErrorBox()"><?php echo __('Close this window') ?></button>
99 </div>
100 </div>
101 </div>
102
103 <div id="header">
104 <div class="topLinks" id="topLinks">
105
106 <span id="topLinksOnline">
107
108 <?php if (!SINGLE_USER_MODE) { ?>
109 <?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
110 <?php } ?>
111 <a href="prefs.php"><?php echo __('Preferences') ?></a>
112
113 <?php if (defined('FEEDBACK_URL') && FEEDBACK_URL) { ?>
114 | <a target="_blank" class="feedback" href="<?php echo FEEDBACK_URL ?>">
115 <?php echo __('Comments?') ?></a>
116 <?php } ?>
117
118 <?php if (!SINGLE_USER_MODE) { ?>
119 | <a href="logout.php"><?php echo __('Logout') ?></a>
120 <?php } ?>
121
122 <img id="offlineModePic"
123 onmouseover="enable_selection(false)"
124 onmouseout="enable_selection(true)"
125 onclick="toggleOfflineModeInfo()"
126 src="images/offline.png" style="display:none"
127 width="16" height="16"
128 title="<?php echo __('Offline reading') ?>"/>
129
130 <div id="offlineModeDrop" style="display : none">
131 <div id="offlineModeSyncMsg">---</div>
132
133 <div class="showWhenSyncing" style="display : none">
134 <a href="javascript:offlineDownloadStop()">
135 <?php echo __('Cancel synchronization') ?></a></div>
136 <div class="hideWhenSyncing">
137 <a href="javascript:offlineDownloadStart()">
138 <?php echo __('Synchronize') ?></a></div>
139 <div class="hideWhenSyncing"><a href="javascript:offlineClearData()">
140 <?php echo __('Remove stored data') ?></a></div>
141 <div><a href="javascript:gotoOffline()">
142 <?php echo __('Go offline') ?></a></div>
143 </div>
144
145 <img id="newVersionIcon" style="display:none;" onclick="javascript:explainError(2)"
146 width="13" height="13"
147 src="<?php echo theme_image($link, 'images/new_version.png') ?>"
148 title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>"
149 alt="new_version_icon"/>
150
151 </span>
152
153 <span id="topLinksOffline" style="display : none">
154 <img id="restartOnlinePic" src="images/online.png"
155 height="13" width="13" onclick="gotoOnline()" title="<?php echo __('Go online') ?>"/>
156 </span>
157
158 </div>
159
160 <img src="<?php echo theme_image($link, 'images/ttrss_logo.png') ?>" alt="Tiny Tiny RSS"/>
161 </div>
162
163 <div id="feeds-holder">
164 <div id="dispSwitch">
165 <a id="dispSwitchPrompt"
166 href="javascript:toggleTags()"><?php echo __("tag cloud") ?></a>
167 </div>
168 <div id="feeds-frame">&nbsp;</div>
169 </div>
170
171 <div id="toolbar">
172
173 <div class="actionChooser">
174 <select id="quickMenuChooser" onchange="quickMenuChange()">
175 <option value="qmcDefault" selected="selected"><?php echo __('Actions...') ?></option>
176 <option value="qmcSearch"><?php echo __('Search...') ?></option>
177 <optgroup label="<?php echo __('Feed actions:') ?>">
178 <option value="qmcAddFeed"><?php echo __('Subscribe to feed...') ?></option>
179 <option value="qmcEditFeed"><?php echo __('Edit this feed...') ?></option>
180 <option value="qmcRescoreFeed"><?php echo __('Rescore feed') ?></option>
181 <option value="qmcRemoveFeed"><?php echo __('Unsubscribe') ?></option>
182 </optgroup>
183 <optgroup label="<?php echo __('All feeds:') ?>">
184 <option value="qmcCatchupAll"><?php echo __('Mark as read') ?></option>
185 <option value="qmcShowOnlyUnread"><?php echo __('(Un)hide read feeds') ?></option>
186 </optgroup>
187 <optgroup label="<?php echo __('Categories:') ?>">
188
189 <option value="qmcToggleReorder"><?php echo __('Toggle reordering mode') ?></option>
190 <option value="qmcResetCats"><?php echo __('Reset order') ?></option>
191 </optgroup>
192
193 <optgroup label="<?php echo __('Other actions:') ?>">
194
195 <option value="qmcAddLabel"><?php echo __('Create label...') ?></option>
196 <option value="qmcAddFilter"><?php echo __('Create filter...') ?></option>
197 <option value="qmcResetUI"><?php echo __('Reset UI layout') ?></option>
198 <option value="qmcHKhelp"><?php echo __('Keyboard shortcuts help') ?></option>
199 </optgroup>
200
201 </select>
202 </div>
203
204 <form id="main_toolbar_form" action="" onsubmit='return false'>
205
206 <button id="collapse_feeds_btn" onclick="collapse_feedlist()"
207 title="<?php echo __('Collapse feedlist') ?>" style="display : none">
208 &lt;&lt;</button>
209
210 <select name="view_mode" title="<?php echo __('Show articles') ?>"
211 onchange="viewModeChanged()">
212 <option selected="selected" value="adaptive"><?php echo __('Adaptive') ?></option>
213 <option value="all_articles"><?php echo __('All Articles') ?></option>
214 <option value="marked"><?php echo __('Starred') ?></option>
215 <option value="published"><?php echo __('Published') ?></option>
216 <option value="unread"><?php echo __('Unread') ?></option>
217 <!-- <option value="noscores"><?php echo __('Ignore Scoring') ?></option> -->
218 <option value="updated"><?php echo __('Updated') ?></option>
219 </select>
220
221 <select title="<?php echo __('Sort articles') ?>"
222 name="order_by" onchange="viewModeChanged()">
223 <option selected="selected" value="default"><?php echo __('Default') ?></option>
224 <option value="date"><?php echo __('Date') ?></option>
225 <option value="title"><?php echo __('Title') ?></option>
226 <option value="score"><?php echo __('Score') ?></option>
227 </select>
228
229 <button name="update" onclick="return viewCurrentFeed('ForceUpdate')">
230 <?php echo __('Update') ?></button>
231
232 <button onclick="return catchupCurrentFeed()">
233 <?php echo __('Mark as read') ?></button>
234
235 </form>
236
237 </div>
238
239 <?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
240 <div id="headlines-frame" class="headlines_normal">
241 <div class="whiteBox"><?php echo __('Loading, please wait...') ?></div></div>
242 <div id="content-frame">
243 <div id="resize-grabber"
244 onmouseover="enable_resize(true)" onmouseout="enable_resize(false)"
245 title="<?php echo __('Drag me to resize panels') ?>">
246 <img src="<?php echo theme_image($link,
247 'images/resize_handle_horiz.png') ?>" id="resize-handle"
248 onmouseover="enable_resize(true)" onmouseout="enable_resize(false)"
249 alt=""/>
250 </div>
251 <div id="content-insert">&nbsp;</div>
252 <!-- <div class="whiteBox">&nbsp;</div> --> </div>
253 <?php } else { ?>
254 <div id="headlines-frame" class="headlines_cdm">
255 <div class="whiteBox"><?php echo __('Loading, please wait...') ?></div></div>
256 <?php } ?>
257
258 <div id="footer">
259 <a href="http://tt-rss.org/">Tiny Tiny RSS</a>
260 <?php if (!defined('HIDE_VERSION')) { ?>
261 v<?php echo VERSION ?>
262 <?php } ?>
263 &copy; 2005&ndash;<?php echo date('Y') ?> <a href="http://fakecake.org/">Andrew Dolgov</a>
264 </div>
265
266 <?php db_close($link); ?>
267
268 </body>
269 </html>