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