]>
Commit | Line | Data |
---|---|---|
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) { ?> | |
37 | <link type="text/css" href="<?php echo $user_css_url ?>"/> | |
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"> | |
76 | <p>Loading, please wait...</p> | |
77 | <noscript> | |
78 | <div class="error"> | |
79 | Your browser doesn't support Javascript, which is required | |
80 | for this application to function properly. Please check your | |
81 | browser settings.</div> | |
82 | </noscript> | |
83 | </div> | |
84 | </div> | |
6b4163cb | 85 | |
33b8cab4 AD |
86 | <div id="notify" class="notify"><span id="notify_body"> </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"> |
94 | if (document.addEventListener) { | |
95 | document.addEventListener("DOMContentLoaded", init, null); | |
96 | } | |
97 | window.onload = init; | |
98 | </script> | |
1cd17194 | 99 | |
71ad883b AD |
100 | <div id="noDaemonWarning"> |
101 | <b>Warning:</b> Update daemon is enabled in configuration, but daemon | |
102 | process is not running, which prevents all feeds from updating. Please | |
103 | start the daemon process or contact instance owner. | |
104 | </div> | |
27981ca3 | 105 | |
0ee1d1a0 AD |
106 | <ul id="debug_output"></ul> |
107 | ||
cea10627 AD |
108 | <div id="infoBoxShadow"><div id="infoBox"> </div></div> |
109 | ||
c2625f8e AD |
110 | <div id="header"> |
111 | <?php if (!SINGLE_USER_MODE) { ?> | |
112 | <div style="float : right"> | |
113 | Hello, <b><?php echo $_SESSION["name"] ?></b> | |
114 | (<a href="logout.php">Logout</a>) | |
115 | </div> | |
116 | <?php } ?> | |
3f59e8cd | 117 | <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/> |
c2625f8e | 118 | </div> |
caa4e57f | 119 | |
6b4163cb AD |
120 | <div id="feeds-holder"> |
121 | <div id="dispSwitch"> | |
122 | <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a> | |
123 | </div> | |
eb58af8d | 124 | <div id="feeds-frame"> </div> |
6b4163cb | 125 | </div> |
f69ea84d | 126 | |
6b4163cb | 127 | <div id="toolbar"> |
5238347d | 128 | |
6b4163cb AD |
129 | <div style="float : right"> |
130 | <select id="quickMenuChooser" onchange="quickMenuChange()"> | |
131 | <option value="qmcDefault" selected>Actions...</option> | |
132 | <option value="qmcPrefs">Preferences</option> | |
133 | <option value="qmcSearch">Search</option> | |
134 | <option disabled>--------</option> | |
135 | <option style="color : #5050aa" disabled>Feed actions:</option> | |
136 | <option value="qmcAddFeed"> Subscribe to feed</option> | |
137 | <option value="qmcRemoveFeed"> Unsubscribe</option> | |
138 | <!-- <option>Edit this feed</option> --> | |
139 | <option disabled>--------</option> | |
140 | <option style="color : #5050aa" disabled>All feeds:</option> | |
141 | <?php if (!ENABLE_UPDATE_DAEMON && !DAEMON_REFRESH_ONLY) { ?> | |
142 | <option value="qmcUpdateFeeds"> Update</option> | |
143 | <?php } ?> | |
144 | <option value="qmcCatchupAll"> Mark as read</option> | |
145 | <option value="qmcShowOnlyUnread"> Show only unread</option> | |
146 | <option disabled>--------</option> | |
147 | <option style="color : #5050aa" disabled>Other actions:</option> | |
148 | <option value="qmcAddFilter"> Create filter</option> | |
149 | </select> | |
150 | </div> | |
5238347d | 151 | |
164f4738 | 152 | <form id="main_toolbar_form"> |
5238347d | 153 | |
c91c2249 | 154 | Search: <input name="query" |
6e6504bc | 155 | onKeyPress="return filterCR(event, viewCurrentFeed)" |
b0005823 | 156 | onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();"> |
164f4738 | 157 | |
86b682ce AD |
158 | View: |
159 | <select name="view_mode" onchange="viewCurrentFeed(0, '')"> | |
160 | <option selected value="adaptive">Adaptive</option> | |
161 | <option value="all_articles">All Articles</option> | |
162 | <option value="marked">Starred</option> | |
163 | <option value="unread">Unread</option> | |
f0601b87 | 164 | </select> |
164f4738 AD |
165 | |
166 | Limit: | |
1d3a17c7 | 167 | <?php |
86b682ce | 168 | $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All"); |
f1b9a8ee | 169 | |
86b682ce | 170 | $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT'); |
cb1083a1 | 171 | |
86b682ce AD |
172 | if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) { |
173 | $limits[$def_art_limit] = $def_art_limit; | |
174 | } | |
1572afe5 | 175 | |
86b682ce AD |
176 | asort($limits); |
177 | ||
178 | if (!$def_art_limit) { | |
179 | $def_art_limit = 30; | |
180 | } | |
181 | ||
182 | print_select_hash("limit", $def_art_limit, $limits, | |
183 | 'onchange="viewCurrentFeed(0, \'\')"'); | |
184 | ||
185 | ?> | |
186 | </form> | |
1572afe5 | 187 | |
86b682ce AD |
188 | <!-- <input class="button" type="submit" |
189 | onclick="quickMenuGo('qmcSearch')" value="Search (tmp)"> --> | |
1572afe5 | 190 | |
86b682ce | 191 | <input class="button" type="submit" |
f0e2373a | 192 | onclick="viewCurrentFeed('ForceUpdate')" value="Update"> |
f0601b87 | 193 | |
11befbb2 AD |
194 | <!-- <input class="button" type="submit" |
195 | onclick="catchupCurrentFeed()" value="Mark as read"> --> | |
f0601b87 | 196 | |
6b4163cb AD |
197 | </div> |
198 | ||
80e4dc34 | 199 | <?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?> |
b6adf039 | 200 | <div id="headlines-frame" class="headlines_normal"><div class="whiteBox">No feed selected.</div></div> |
17ec931d | 201 | <div id="content-frame"><div class="whiteBox"> </div></div> |
80e4dc34 | 202 | <?php } else { ?> |
b6adf039 | 203 | <div id="headlines-frame" class="headlines_cdm"><div class="whiteBox">No feed selected.</div></div> |
80e4dc34 | 204 | <?php } ?> |
6b4163cb | 205 | |
c2625f8e | 206 | <div id="footer"> |
461766f3 AD |
207 | <?php if (defined('_DEBUG_USER_SWITCH')) { ?> |
208 | <select id="userSwitch" onchange="userSwitch()"> | |
209 | <?php | |
210 | foreach (array('admin', 'fox', 'test') as $u) { | |
211 | $op_sel = ($u == $_SESSION["name"]) ? "selected" : ""; | |
212 | print "<option $op_sel>$u</option>"; | |
213 | } | |
214 | ?> | |
215 | </select> | |
aff31ecf | 216 | <?php } ?> |
c2625f8e AD |
217 | <a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> v<?php echo VERSION ?> © 2005-2006 Andrew Dolgov |
218 | </div> | |
1cd17194 | 219 | |
1d3a17c7 | 220 | <?php db_close($link); ?> |
1cd17194 | 221 | |
97dcd654 AD |
222 | <script type="text/javascript"> |
223 | /* for IE */ | |
224 | function statechange() { | |
225 | if (document.readyState == "interactive") init(); | |
226 | } | |
227 | ||
228 | if (document.readyState) { | |
229 | if (document.readyState == "interactive" || document.readyState == "complete") { | |
230 | init(); | |
231 | } else { | |
232 | document.onreadystatechange = statechange; | |
233 | } | |
234 | } | |
235 | </script> | |
236 | ||
1cd17194 AD |
237 | </body> |
238 | </html> |