]>
Commit | Line | Data |
---|---|---|
4062022e | 1 | <? |
0cc89acb | 2 | session_start(); |
66581886 AD |
3 | |
4 | require_once "sanity_check.php"; | |
4062022e AD |
5 | require_once "version.php"; |
6 | require_once "config.php"; | |
7 | require_once "db-prefs.php"; | |
ff485f1d | 8 | require_once "functions.php"; |
da5d0d09 | 9 | |
4062022e | 10 | $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); |
c93f38c4 | 11 | |
b8aa49bc | 12 | login_sequence($link); |
ff485f1d | 13 | |
4062022e | 14 | ?> |
1cd17194 AD |
15 | <html> |
16 | <head> | |
17 | <title>Tiny Tiny RSS</title> | |
da5d0d09 | 18 | |
430bf183 AD |
19 | <link rel="stylesheet" type="text/css" href="tt-rss.css"> |
20 | ||
503eb349 AD |
21 | <? $user_theme = $_SESSION["theme"]; |
22 | if ($user_theme) { ?> | |
23 | <link rel="stylesheet" type="text/css" href="themes/<?= $user_theme ?>/theme.css"> | |
24 | <? } ?> | |
25 | ||
386d7b5b AD |
26 | <? $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?> |
27 | <? if ($user_css_url) { ?> | |
28 | <link type="text/css" href="<?= $user_css_url ?>"/> | |
29 | <? } ?> | |
30 | ||
4062022e | 31 | <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?> |
da5d0d09 | 32 | |
430bf183 | 33 | <link rel="stylesheet" href="tt-rss_compact.css" type="text/css"> |
da5d0d09 AD |
34 | |
35 | <? } else { ?> | |
36 | ||
430bf183 AD |
37 | <link title="Compact Stylesheet" rel="alternate stylesheet" |
38 | type="text/css" href="tt-rss_compact.css"/> | |
da5d0d09 AD |
39 | |
40 | <? } ?> | |
628eb1bd | 41 | |
331900c6 | 42 | <script type="text/javascript" src="functions.js"></script> |
1cd17194 | 43 | <script type="text/javascript" src="tt-rss.js"></script> |
d5224f0d AD |
44 | <!--[if gte IE 5.5000]> |
45 | <script type="text/javascript" src="pngfix.js"></script> | |
46 | <![endif]--> | |
d76a3b03 | 47 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
1cd17194 AD |
48 | </head> |
49 | ||
50 | <body onload="init()"> | |
51 | ||
828a8ecc | 52 | <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main"> |
4062022e | 53 | <? if (get_pref($link, 'DISPLAY_HEADER')) { ?> |
1cd17194 | 54 | <tr> |
b8dc6247 | 55 | <td colspan="2" class="headerBox"> |
828a8ecc | 56 | <table cellspacing="0" cellpadding="0" width="100%"><tr> |
c93f38c4 | 57 | <td rowspan="2" class="header" valign="middle"> |
828a8ecc AD |
58 | <img src="images/ttrss_logo.png" alt="logo"> |
59 | </td> | |
60 | <td align="right" valign="top"> | |
61 | <div id="notify"><span id="notify_body"></div> | |
62 | </td> | |
69919a24 | 63 | |
76332f3c | 64 | <div id="userDlgShadow"><div id="userDlg"> </div></div> |
69919a24 | 65 | |
c93f38c4 | 66 | </tr><tr><td class="welcomePrompt"> |
7d4c898a | 67 | <? if (!SINGLE_USER_MODE) { ?> |
9f78104c AD |
68 | Hello, <b><?= $_SESSION["name"] ?></b> |
69 | (<a href="logout.php">Logout</a>) | |
8cb74804 AD |
70 | <? } ?> |
71 | </td> | |
828a8ecc | 72 | </tr></table> |
2c1dd701 AD |
73 | </td> |
74 | </tr> | |
69919a24 | 75 | <? } else { ?> |
b8dc6247 AD |
76 | <tr><td align="right" colspan="2"> |
77 | <div id="notify"><span id="notify_body"></div> | |
76332f3c | 78 | <div id="userDlgShadow"><div id="userDlg"> </div></div> |
b8dc6247 | 79 | </td></tr> |
da5d0d09 | 80 | <? } ?> |
1cd17194 | 81 | <tr> |
f0601b87 | 82 | <td valign="top" rowspan="3" class="feeds"> |
28fa9253 AD |
83 | <table class="innerFeedTable" |
84 | cellspacing="0" cellpadding="0" height="100%" width="100%"> | |
85 | <tr><td> | |
86 | <div id="dispSwitch"> | |
87 | <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a> | |
88 | </div> | |
89 | </td></tr> | |
90 | <tr><td height="100%" width="100%" valign="top"> | |
caa4e57f | 91 | |
1a66d16e AD |
92 | <!-- <div id="feeds"> </div> --> |
93 | ||
8143ae1f | 94 | |
5bfef089 | 95 | <iframe frameborder="0" |
6adbdbee | 96 | src="backend.php?op=error&msg=Loading,%20please wait..." |
5bfef089 | 97 | id="feeds-frame" name="feeds-frame" class="feedsFrame"> </iframe> |
7a991cac | 98 | |
28fa9253 AD |
99 | </td></tr></table> |
100 | ||
4062022e | 101 | <? if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?> |
7a991cac | 102 | |
3745788e | 103 | <div align="center">All feeds: |
caa4e57f | 104 | |
3745788e AD |
105 | <select id="allFeedsChooser"> |
106 | <option>Update</option> | |
107 | <option>Mark as read</option> | |
cbe45fa8 | 108 | <option>Show only unread</option> |
3745788e AD |
109 | </select> |
110 | ||
111 | <input type="submit" class="button" onclick="allFeedsMenuGo()" value="Go"> | |
27be66c3 | 112 | |
3745788e | 113 | </div> |
28fa9253 | 114 | |
caa4e57f | 115 | |
7a991cac AD |
116 | <? } ?> |
117 | ||
1cd17194 | 118 | </td> |
f0601b87 | 119 | <td valign="top" class="headlinesToolbarBox"> |
e828e31e | 120 | <table width="100%" cellpadding="0" cellspacing="0"> |
ac43eba1 | 121 | |
ac43eba1 | 122 | <tr><td class="headlinesToolbar" id="headlinesToolbar"> |
4ce19859 | 123 | <input id="searchbox" |
f0601b87 AD |
124 | onblur="javascript:enableHotkeys()" onfocus="javascript:disableHotkeys()" |
125 | onchange="javascript:search()"> | |
52b51244 AD |
126 | <select id="searchmodebox"> |
127 | <option>This feed</option> | |
128 | <option>All feeds</option> | |
129 | </select> | |
130 | ||
ac43eba1 | 131 | <input type="submit" |
4ce19859 | 132 | class="button" onclick="javascript:search()" value="Search"> |
f0601b87 | 133 | |
033e47e0 AD |
134 | |
135 | ||
136 | View: | |
f0601b87 AD |
137 | |
138 | <select id="viewbox" onchange="javascript:viewCurrentFeed(0, '')"> | |
d6f55ce8 | 139 | <option>All Articles</option> |
f0601b87 | 140 | <option>Starred</option> |
ac43eba1 | 141 | <option selected>Unread</option> |
b5aa95e7 | 142 | <option>Unread or Starred</option> |
bdd01d3f | 143 | <option>Unread or Updated</option> |
f0601b87 AD |
144 | </select> |
145 | ||
cb1083a1 AD |
146 | Limit: |
147 | ||
148 | <select id="limitbox" onchange="javascript:viewCurrentFeed(0, '')"> | |
f1b9a8ee AD |
149 | |
150 | <? | |
151 | $limits = array(15 => 15, 30 => 30, 60 => 60); | |
152 | ||
4062022e AD |
153 | $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT'); |
154 | ||
155 | print $def_art_limit; | |
156 | ||
157 | if ($def_art_limit >= 0) { | |
158 | $limits[$def_art_limit] = $def_art_limit; | |
f1b9a8ee AD |
159 | } |
160 | ||
161 | asort($limits); | |
162 | ||
163 | array_push($limits, 0); | |
164 | ||
165 | foreach ($limits as $key) { | |
166 | print "<option"; | |
4062022e | 167 | if ($key == $def_art_limit) { print " selected"; } |
f1b9a8ee AD |
168 | print ">"; |
169 | ||
170 | if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; } | |
171 | ||
172 | print "</option>"; | |
173 | } ?> | |
4062022e | 174 | |
cb1083a1 AD |
175 | </select> |
176 | ||
ac43eba1 AD |
177 | Feed: <input class="button" type="submit" |
178 | onclick="javascript:viewCurrentFeed(0, 'ForceUpdate')" value="Update"> | |
f0601b87 | 179 | |
a7de14fc | 180 | <input class="button" type="submit" id="btnMarkFeedAsRead" |
ac43eba1 | 181 | onclick="javascript:viewCurrentFeed(0, 'MarkAllRead')" value="Mark as read"> |
f0601b87 | 182 | |
a14f82f2 AD |
183 | </td> |
184 | <td align="right"> | |
6de5d056 | 185 | Actions: <select id="quickMenuChooser"> |
cbe45fa8 | 186 | <option id="qmcPrefs" selected>Preferences...</option> |
7a991cac AD |
187 | <option disabled>--------</option> |
188 | <option style="color : #5050aa" disabled>Feed actions:</option> | |
cbe45fa8 AD |
189 | <option id="qmcAddFeed"> Add new feed</option> |
190 | <option id="qmcRemoveFeed"> Remove this feed</option> | |
e2f8f7b4 | 191 | <!-- <option>Edit this feed</option> --> |
7a991cac AD |
192 | <option disabled>--------</option> |
193 | <option style="color : #5050aa" disabled>All feeds:</option> | |
cbe45fa8 AD |
194 | <option id="qmcUpdateFeeds"> Update</option> |
195 | <option id="qmcCatchupAll"> Mark as read</option> | |
196 | <option id="qmcShowOnlyUnread"> Show only unread</option> | |
e2f8f7b4 AD |
197 | </select> |
198 | <input type="submit" class="button" onclick="quickMenuGo()" value="Go"> | |
a14f82f2 AD |
199 | </td> |
200 | </tr> | |
f0601b87 AD |
201 | </table> |
202 | </td> | |
203 | </tr><tr> | |
1cd17194 | 204 | <td id="headlines" class="headlines" valign="top"> |
5bfef089 | 205 | <iframe frameborder="0" name="headlines-frame" |
e828e31e AD |
206 | id="headlines-frame" class="headlinesFrame" |
207 | src="backend.php?op=error&msg=No%20feed%20selected."></iframe> | |
1cd17194 | 208 | </td> |
bb7cface | 209 | </tr><tr> |
1cd17194 | 210 | <td class="content" id="content" valign="top"> |
5bfef089 AD |
211 | <iframe frameborder="0" name="content-frame" |
212 | id="content-frame" class="contentFrame"> </iframe> | |
1cd17194 AD |
213 | </td> |
214 | </tr> | |
4062022e | 215 | <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?> |
1cd17194 | 216 | <tr> |
e828e31e | 217 | <td colspan="2" class="footer"> |
7325509d | 218 | <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> © 2005 Andrew Dolgov |
0b615681 AD |
219 | <? if (WEB_DEMO_MODE) { ?> |
220 | <br>Running in demo mode, some functionality is disabled. | |
221 | <? } ?> | |
1cd17194 AD |
222 | </td> |
223 | </td> | |
da5d0d09 | 224 | <? } ?> |
1cd17194 AD |
225 | </table> |
226 | ||
ab49d368 | 227 | <? db_close($link); ?> |
1cd17194 AD |
228 | |
229 | </body> | |
230 | </html> |