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