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