]>
Commit | Line | Data |
---|---|---|
1d3a17c7 | 1 | <?php |
d65981e2 AD |
2 | error_reporting(E_ERROR | E_WARNING | E_PARSE); |
3 | ||
7ae65adf | 4 | require_once "functions.php"; |
1df0f48b | 5 | require_once "sessions.php"; |
66581886 | 6 | require_once "sanity_check.php"; |
4062022e AD |
7 | require_once "version.php"; |
8 | require_once "config.php"; | |
9 | require_once "db-prefs.php"; | |
da5d0d09 | 10 | |
4062022e | 11 | $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); |
c93f38c4 | 12 | |
b8aa49bc | 13 | login_sequence($link); |
ff485f1d | 14 | |
1b758780 | 15 | $dt_add = get_script_dt_add(); |
53515ff1 | 16 | |
dc56b3b7 | 17 | no_cache_incantation(); |
1df0f48b | 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 | |
48d5f90a | 26 | <link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"> |
430bf183 | 27 | |
1d3a17c7 | 28 | <?php $user_theme = $_SESSION["theme"]; |
503eb349 | 29 | if ($user_theme) { ?> |
48d5f90a | 30 | <link rel="stylesheet" type="text/css" href="themes/<?php echo $user_theme ?>/theme.css?<?php echo $dt_add ?>"> |
1d3a17c7 | 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 | |
c0266b88 AD |
40 | <link rel="shortcut icon" type="image/png" href="images/favicon.png"> |
41 | ||
a58069db | 42 | <script type="text/javascript" src="prototype.js"></script> |
a7750ac6 | 43 | <script type="text/javascript" src="scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script> |
709e7dc2 | 44 | <script type="text/javascript" src="localized_js.php?<?php echo $dt_add ?>"></script> |
1d3a17c7 AD |
45 | <script type="text/javascript" src="tt-rss.js?<?php echo $dt_add ?>"></script> |
46 | <script type="text/javascript" src="functions.js?<?php echo $dt_add ?>"></script> | |
6b4163cb AD |
47 | <script type="text/javascript" src="feedlist.js?<?php echo $dt_add ?>"></script> |
48 | <script type="text/javascript" src="viewfeed.js?<?php echo $dt_add ?>"></script> | |
49 | ||
d76a3b03 | 50 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
362698ad AD |
51 | |
52 | <script type="text/javascript"> | |
53 | if (navigator.userAgent.match("Opera")) { | |
54 | document.write('<link rel="stylesheet" type="text/css" href="opera.css">'); | |
55 | } | |
6b9bf6c2 AD |
56 | if (navigator.userAgent.match("Gecko") && !navigator.userAgent.match("KHTML")) { |
57 | document.write('<link rel="stylesheet" type="text/css" href="gecko.css">'); | |
58 | } | |
362698ad | 59 | </script> |
1cd17194 AD |
60 | </head> |
61 | ||
a9d42cf7 | 62 | <body onresize="resize_headlines()"> |
97dcd654 | 63 | |
84916243 AD |
64 | <div id="overlay"> |
65 | <div id="overlay_inner"> | |
730dbf19 AD |
66 | <?php echo __("Loading, please wait...") ?> |
67 | ||
68 | <div id="l_progress_o"> | |
99509451 | 69 | <div id="l_progress_i"></div> |
730dbf19 AD |
70 | </div> |
71 | ||
84916243 | 72 | <noscript> |
b76affe9 | 73 | <div class="error"><?php echo |
d1db26aa | 74 | __("Your browser doesn't support Javascript, which is required |
84916243 | 75 | for this application to function properly. Please check your |
b76affe9 | 76 | browser settings.") ?></div> |
84916243 AD |
77 | </noscript> |
78 | </div> | |
79 | </div> | |
6b4163cb | 80 | |
0745839a | 81 | <div id="hotkey_help_overlay" style="display : none" onclick="Element.hide(this)"> |
ec92c9d1 | 82 | <?php rounded_table_start("hho"); ?> |
4298481d | 83 | <?php include "help/3.php" ?> |
ec92c9d1 | 84 | <?php rounded_table_end(); ?> |
4298481d AD |
85 | </div> |
86 | ||
33b8cab4 AD |
87 | <div id="notify" class="notify"><span id="notify_body"> </span></div> |
88 | ||
af106b0e AD |
89 | <div id="fatal_error"><div id="fatal_error_inner"> |
90 | <h1>Fatal Error</h1> | |
462a192b | 91 | <div id="fatal_error_msg">Unknown Error</div> |
af106b0e | 92 | </div></div> |
2055d4a6 | 93 | |
569720c5 | 94 | <div id="dialog_overlay" style="display : none"> </div> |
5ede560f | 95 | |
97dcd654 AD |
96 | <script type="text/javascript"> |
97 | if (document.addEventListener) { | |
98 | document.addEventListener("DOMContentLoaded", init, null); | |
99 | } | |
100 | window.onload = init; | |
101 | </script> | |
1cd17194 | 102 | |
8836613c | 103 | <ul id="debug_output" style='display : none'></ul> |
0ee1d1a0 | 104 | |
cea10627 AD |
105 | <div id="infoBoxShadow"><div id="infoBox"> </div></div> |
106 | ||
c2625f8e | 107 | <div id="header"> |
efae7595 | 108 | <div class="topLinks"> |
c2625f8e | 109 | <?php if (!SINGLE_USER_MODE) { ?> |
efae7595 | 110 | <?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> | |
c2625f8e | 111 | <?php } ?> |
efae7595 AD |
112 | <a href="prefs.php"><?php echo __('Preferences') ?></a> |
113 | ||
be746c8e | 114 | <?php if (defined('FEEDBACK_URL')) { ?> |
db499b67 | 115 | | <a target="_blank" class="feedback" href="<?php echo FEEDBACK_URL ?>"> |
b5dabd1a | 116 | <?php echo __('Comments?') ?></a> |
be746c8e | 117 | <?php } ?> |
b5dabd1a | 118 | |
efae7595 AD |
119 | <?php if (!SINGLE_USER_MODE) { ?> |
120 | | <a href="logout.php"><?php echo __('Logout') ?></a> | |
121 | <?php } ?> | |
122 | ||
b4507bc2 | 123 | <img id="newVersionIcon" style="display:none;" onclick="javascript:explainError(2)" |
d9fa39f1 AD |
124 | src="images/new_version.png" title="New version is available!" |
125 | alt="new_version_icon"> | |
126 | </div> | |
3f59e8cd | 127 | <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/> |
c2625f8e | 128 | </div> |
caa4e57f | 129 | |
6b4163cb AD |
130 | <div id="feeds-holder"> |
131 | <div id="dispSwitch"> | |
709e7dc2 | 132 | <a id="dispSwitchPrompt" |
0979b696 | 133 | href="javascript:toggleTags()"><?php echo __("tag cloud") ?></a> |
6b4163cb | 134 | </div> |
eb58af8d | 135 | <div id="feeds-frame"> </div> |
6b4163cb | 136 | </div> |
f69ea84d | 137 | |
6b4163cb | 138 | <div id="toolbar"> |
5238347d | 139 | |
6b4163cb AD |
140 | <div style="float : right"> |
141 | <select id="quickMenuChooser" onchange="quickMenuChange()"> | |
d1db26aa AD |
142 | <option value="qmcDefault" selected><?php echo __('Actions...') ?></option> |
143 | <option value="qmcSearch"><?php echo __('Search') ?></option> | |
efae7595 | 144 | <!-- <option value="qmcPrefs"><?php echo __('Preferences') ?></option> --> |
6b4163cb | 145 | <option disabled>--------</option> |
d1db26aa AD |
146 | <option style="color : #5050aa" disabled><?php echo __('Feed actions:') ?></option> |
147 | <option value="qmcAddFeed"><?php echo __(' Subscribe to feed') ?></option> | |
148 | <option value="qmcEditFeed"><?php echo __(' Edit this feed') ?></option> | |
c4a36709 | 149 | <!-- <option value="qmcClearFeed"><?php echo __(' Clear articles') ?></option> --> |
9a85081a | 150 | <option value="qmcRescoreFeed"><?php echo __(' Rescore feed') ?></option> |
d1db26aa | 151 | <option value="qmcRemoveFeed"><?php echo __(' Unsubscribe') ?></option> |
6b4163cb | 152 | <option disabled>--------</option> |
d1db26aa | 153 | <option style="color : #5050aa" disabled><?php echo __('All feeds:') ?></option> |
d1db26aa AD |
154 | <option value="qmcCatchupAll"><?php echo __(' Mark as read') ?></option> |
155 | <option value="qmcShowOnlyUnread"><?php echo __(' (Un)hide read feeds') ?></option> | |
6b4163cb | 156 | <option disabled>--------</option> |
d1db26aa AD |
157 | <option style="color : #5050aa" disabled><?php echo __('Other actions:') ?></option> |
158 | <option value="qmcAddFilter"><?php echo __(' Create filter') ?></option> | |
d16a5159 AD |
159 | <option value="qmcResetUI"><?php echo __(' Reset UI layout') ?></option> |
160 | ||
238eff01 | 161 | <option value="qmcHKhelp"><?php echo __(' Keyboard shortcuts') ?></option> |
6b4163cb AD |
162 | </select> |
163 | </div> | |
5238347d | 164 | |
e6312f6c | 165 | <form id="main_toolbar_form" onsubmit='return false'> |
5238347d | 166 | |
8389b150 | 167 | <input type="submit" value="<<" |
8a8f7c55 | 168 | id="collapse_feeds_btn" onclick="collapse_feedlist()" class="button" |
8389b150 AD |
169 | title="<?php echo __('Collapse feedlist') ?>" style="display : none"> |
170 | ||
171 | <input type="submit" value="<?php echo __("Toggle Feedlist") ?>" | |
8a8f7c55 | 172 | id="toggle_feeds_btn" class="button" |
24c1e1c1 AD |
173 | onclick="toggle_feedlist()" style="display : none"> |
174 | ||
58daed52 AD |
175 | |
176 | ||
feead173 AD |
177 | <?php if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?> |
178 | ||
d1db26aa | 179 | <?php echo __('Search:') ?> |
3dc8ee84 | 180 | <input name="query" type="search" |
6e6504bc | 181 | onKeyPress="return filterCR(event, viewCurrentFeed)" |
b0005823 | 182 | onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();"> |
8551c73a | 183 | |
feead173 AD |
184 | <?php } ?> |
185 | ||
d1db26aa | 186 | <?php echo __('View:') ?> |
3c2d7945 | 187 | <select name="view_mode" onchange="viewModeChanged()"> |
d1db26aa AD |
188 | <option selected value="adaptive"><?php echo __('Adaptive') ?></option> |
189 | <option value="all_articles"><?php echo __('All Articles') ?></option> | |
190 | <option value="marked"><?php echo __('Starred') ?></option> | |
191 | <option value="unread"><?php echo __('Unread') ?></option> | |
f0601b87 | 192 | </select> |
164f4738 | 193 | |
d1db26aa | 194 | <?php echo __('Limit:') ?> |
1d3a17c7 | 195 | <?php |
86b682ce | 196 | $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All"); |
f1b9a8ee | 197 | |
86b682ce | 198 | $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT'); |
cb1083a1 | 199 | |
86b682ce AD |
200 | if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) { |
201 | $limits[$def_art_limit] = $def_art_limit; | |
202 | } | |
1572afe5 | 203 | |
86b682ce AD |
204 | asort($limits); |
205 | ||
206 | if (!$def_art_limit) { | |
207 | $def_art_limit = 30; | |
208 | } | |
209 | ||
210 | print_select_hash("limit", $def_art_limit, $limits, | |
3c2d7945 | 211 | 'onchange="viewLimitChanged()"'); |
86b682ce AD |
212 | |
213 | ?> | |
2df7a749 AD |
214 | |
215 | | |
216 | ||
217 | <input class="button" type="submit" | |
218 | onclick="return viewCurrentFeed('ForceUpdate')" | |
d1db26aa | 219 | value="<?php echo __('Update') ?>"> |
2df7a749 | 220 | |
86b682ce | 221 | </form> |
1572afe5 | 222 | |
86b682ce AD |
223 | <!-- <input class="button" type="submit" |
224 | onclick="quickMenuGo('qmcSearch')" value="Search (tmp)"> --> | |
1572afe5 | 225 | |
11befbb2 AD |
226 | <!-- <input class="button" type="submit" |
227 | onclick="catchupCurrentFeed()" value="Mark as read"> --> | |
f0601b87 | 228 | |
6b4163cb AD |
229 | </div> |
230 | ||
80e4dc34 | 231 | <?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?> |
b76affe9 | 232 | <div id="headlines-frame" class="headlines_normal"> |
d1db26aa | 233 | <div class="whiteBox"><?php echo __('No feed selected.') ?></div></div> |
17ec931d | 234 | <div id="content-frame"><div class="whiteBox"> </div></div> |
91cdbe52 | 235 | <div id="resize-grabber" |
94047498 | 236 | onmouseover="enable_resize(true)" onmouseout="enable_resize(false)" |
91cdbe52 | 237 | title="<?php echo __('Drag me to resize panels') ?>"> </div> |
80e4dc34 | 238 | <?php } else { ?> |
b76affe9 | 239 | <div id="headlines-frame" class="headlines_cdm"> |
d1db26aa | 240 | <div class="whiteBox"><?php echo __('No feed selected.') ?></div></div> |
80e4dc34 | 241 | <?php } ?> |
6b4163cb | 242 | |
c2625f8e | 243 | <div id="footer"> |
461766f3 AD |
244 | <?php if (defined('_DEBUG_USER_SWITCH')) { ?> |
245 | <select id="userSwitch" onchange="userSwitch()"> | |
246 | <?php | |
247 | foreach (array('admin', 'fox', 'test') as $u) { | |
248 | $op_sel = ($u == $_SESSION["name"]) ? "selected" : ""; | |
249 | print "<option $op_sel>$u</option>"; | |
250 | } | |
251 | ?> | |
252 | </select> | |
aff31ecf | 253 | <?php } ?> |
03a11e23 | 254 | <a href="http://tt-rss.org/">Tiny Tiny RSS</a> v<?php echo VERSION ?> © 2005–2008 <a href="http://bah.org.ru/">Andrew Dolgov</a> |
c2625f8e | 255 | </div> |
1cd17194 | 256 | |
1d3a17c7 | 257 | <?php db_close($link); ?> |
1cd17194 | 258 | |
97dcd654 AD |
259 | <script type="text/javascript"> |
260 | /* for IE */ | |
261 | function statechange() { | |
262 | if (document.readyState == "interactive") init(); | |
263 | } | |
264 | ||
265 | if (document.readyState) { | |
266 | if (document.readyState == "interactive" || document.readyState == "complete") { | |
267 | init(); | |
268 | } else { | |
269 | document.onreadystatechange = statechange; | |
270 | } | |
271 | } | |
272 | </script> | |
273 | ||
1cd17194 AD |
274 | </body> |
275 | </html> |