]>
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 | |
1d3a17c7 | 40 | <?php if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?> |
da5d0d09 | 41 | |
430bf183 | 42 | <link rel="stylesheet" href="tt-rss_compact.css" type="text/css"> |
da5d0d09 | 43 | |
1d3a17c7 | 44 | <?php } else { ?> |
da5d0d09 | 45 | |
430bf183 AD |
46 | <link title="Compact Stylesheet" rel="alternate stylesheet" |
47 | type="text/css" href="tt-rss_compact.css"/> | |
da5d0d09 | 48 | |
1d3a17c7 | 49 | <?php } ?> |
628eb1bd | 50 | |
c0266b88 AD |
51 | <link rel="shortcut icon" type="image/png" href="images/favicon.png"> |
52 | ||
a58069db AD |
53 | <script type="text/javascript" src="prototype.js"></script> |
54 | ||
1d3a17c7 AD |
55 | <script type="text/javascript" src="tt-rss.js?<?php echo $dt_add ?>"></script> |
56 | <script type="text/javascript" src="functions.js?<?php echo $dt_add ?>"></script> | |
6b4163cb AD |
57 | <script type="text/javascript" src="feedlist.js?<?php echo $dt_add ?>"></script> |
58 | <script type="text/javascript" src="viewfeed.js?<?php echo $dt_add ?>"></script> | |
59 | ||
d5224f0d AD |
60 | <!--[if gte IE 5.5000]> |
61 | <script type="text/javascript" src="pngfix.js"></script> | |
96737ce9 | 62 | <link rel="stylesheet" type="text/css" href="tt-rss-ie.css"> |
d5224f0d | 63 | <![endif]--> |
d76a3b03 | 64 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
362698ad AD |
65 | |
66 | <script type="text/javascript"> | |
67 | if (navigator.userAgent.match("Opera")) { | |
68 | document.write('<link rel="stylesheet" type="text/css" href="opera.css">'); | |
69 | } | |
6b9bf6c2 AD |
70 | if (navigator.userAgent.match("Gecko") && !navigator.userAgent.match("KHTML")) { |
71 | document.write('<link rel="stylesheet" type="text/css" href="gecko.css">'); | |
72 | } | |
362698ad | 73 | </script> |
1cd17194 AD |
74 | </head> |
75 | ||
97dcd654 AD |
76 | <body> |
77 | ||
6b4163cb AD |
78 | <!-- <div id="overlay"><div id="overlay_inner">Loading, please wait...</div></div> --> |
79 | ||
af106b0e AD |
80 | <div id="fatal_error"><div id="fatal_error_inner"> |
81 | <h1>Fatal Error</h1> | |
462a192b | 82 | <div id="fatal_error_msg">Unknown Error</div> |
af106b0e | 83 | </div></div> |
2055d4a6 | 84 | |
97dcd654 AD |
85 | <script type="text/javascript"> |
86 | if (document.addEventListener) { | |
87 | document.addEventListener("DOMContentLoaded", init, null); | |
88 | } | |
89 | window.onload = init; | |
90 | </script> | |
1cd17194 | 91 | |
71ad883b AD |
92 | <div id="noDaemonWarning"> |
93 | <b>Warning:</b> Update daemon is enabled in configuration, but daemon | |
94 | process is not running, which prevents all feeds from updating. Please | |
95 | start the daemon process or contact instance owner. | |
96 | </div> | |
27981ca3 | 97 | |
0ee1d1a0 AD |
98 | <ul id="debug_output"></ul> |
99 | ||
cea10627 AD |
100 | <div id="infoBoxShadow"><div id="infoBox"> </div></div> |
101 | ||
6b4163cb AD |
102 | <div id="header"> |
103 | <?php if (!SINGLE_USER_MODE) { ?> | |
104 | <div style="float : right"> | |
1d3a17c7 | 105 | Hello, <b><?php echo $_SESSION["name"] ?></b> |
82e1fe00 | 106 | (<a href="logout.php">Logout</a>) |
28fa9253 | 107 | </div> |
6b4163cb AD |
108 | <?php } ?> |
109 | <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"> | |
110 | </div> | |
caa4e57f | 111 | |
6b4163cb AD |
112 | <div id="feeds-holder"> |
113 | <div id="dispSwitch"> | |
114 | <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a> | |
115 | </div> | |
116 | <div id="feeds-frame">-fixme-</div> | |
117 | </div> | |
f69ea84d | 118 | |
6b4163cb | 119 | <div id="toolbar"> |
5238347d | 120 | |
6b4163cb AD |
121 | <div style="float : right"> |
122 | <select id="quickMenuChooser" onchange="quickMenuChange()"> | |
123 | <option value="qmcDefault" selected>Actions...</option> | |
124 | <option value="qmcPrefs">Preferences</option> | |
125 | <option value="qmcSearch">Search</option> | |
126 | <option disabled>--------</option> | |
127 | <option style="color : #5050aa" disabled>Feed actions:</option> | |
128 | <option value="qmcAddFeed"> Subscribe to feed</option> | |
129 | <option value="qmcRemoveFeed"> Unsubscribe</option> | |
130 | <!-- <option>Edit this feed</option> --> | |
131 | <option disabled>--------</option> | |
132 | <option style="color : #5050aa" disabled>All feeds:</option> | |
133 | <?php if (!ENABLE_UPDATE_DAEMON && !DAEMON_REFRESH_ONLY) { ?> | |
134 | <option value="qmcUpdateFeeds"> Update</option> | |
135 | <?php } ?> | |
136 | <option value="qmcCatchupAll"> Mark as read</option> | |
137 | <option value="qmcShowOnlyUnread"> Show only unread</option> | |
138 | <option disabled>--------</option> | |
139 | <option style="color : #5050aa" disabled>Other actions:</option> | |
140 | <option value="qmcAddFilter"> Create filter</option> | |
141 | </select> | |
142 | </div> | |
5238347d | 143 | |
164f4738 | 144 | <form id="main_toolbar_form"> |
5238347d | 145 | |
1d3a17c7 | 146 | <?php if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?> |
164f4738 AD |
147 | <input name="query" |
148 | onKeyPress="return filterCR(event)" | |
b0005823 | 149 | onblur="javascript:enableHotkeys();" onfocus="javascript:disableHotkeys();"> |
164f4738 AD |
150 | <input class="button" type="submit" |
151 | onclick="return viewCurrentFeed(0)" value="Search"> | |
152 | | |
1d3a17c7 | 153 | <?php } ?> |
f0601b87 | 154 | |
86b682ce AD |
155 | View: |
156 | <select name="view_mode" onchange="viewCurrentFeed(0, '')"> | |
157 | <option selected value="adaptive">Adaptive</option> | |
158 | <option value="all_articles">All Articles</option> | |
159 | <option value="marked">Starred</option> | |
160 | <option value="unread">Unread</option> | |
f0601b87 | 161 | </select> |
164f4738 AD |
162 | |
163 | Limit: | |
1d3a17c7 | 164 | <?php |
86b682ce | 165 | $limits = array(15 => 15, 30 => 30, 60 => 60, 0 => "All"); |
f1b9a8ee | 166 | |
86b682ce | 167 | $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT'); |
cb1083a1 | 168 | |
86b682ce AD |
169 | if ($def_art_limit >= 0 && !array_key_exists($def_art_limit, $limits)) { |
170 | $limits[$def_art_limit] = $def_art_limit; | |
171 | } | |
1572afe5 | 172 | |
86b682ce AD |
173 | asort($limits); |
174 | ||
175 | if (!$def_art_limit) { | |
176 | $def_art_limit = 30; | |
177 | } | |
178 | ||
179 | print_select_hash("limit", $def_art_limit, $limits, | |
180 | 'onchange="viewCurrentFeed(0, \'\')"'); | |
181 | ||
182 | ?> | |
183 | </form> | |
1572afe5 | 184 | |
86b682ce AD |
185 | <!-- <input class="button" type="submit" |
186 | onclick="quickMenuGo('qmcSearch')" value="Search (tmp)"> --> | |
1572afe5 | 187 | |
86b682ce | 188 | <input class="button" type="submit" |
f0e2373a | 189 | onclick="viewCurrentFeed('ForceUpdate')" value="Update"> |
f0601b87 | 190 | |
86b682ce | 191 | <input class="button" type="submit" |
fce24838 | 192 | onclick="catchupCurrentFeed()" value="Mark as read"> |
f0601b87 | 193 | |
6b4163cb AD |
194 | </div> |
195 | ||
196 | <div id="headlines-frame"> -fixme- </div> | |
197 | ||
198 | <div id="content-frame"> -fixme- </div> | |
199 | ||
200 | <div id="footer"> | |
201 | <a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> v<?php echo VERSION ?> © 2005-2006 Andrew Dolgov | |
202 | </div> | |
1cd17194 | 203 | |
1d3a17c7 | 204 | <?php db_close($link); ?> |
1cd17194 | 205 | |
97dcd654 AD |
206 | <script type="text/javascript"> |
207 | /* for IE */ | |
208 | function statechange() { | |
209 | if (document.readyState == "interactive") init(); | |
210 | } | |
211 | ||
212 | if (document.readyState) { | |
213 | if (document.readyState == "interactive" || document.readyState == "complete") { | |
214 | init(); | |
215 | } else { | |
216 | document.onreadystatechange = statechange; | |
217 | } | |
218 | } | |
219 | </script> | |
220 | ||
1cd17194 AD |
221 | </body> |
222 | </html> |