]> git.wh0rd.org - tt-rss.git/blob - tt-rss.php
change COMBINED_DISPLAY_MODE help text
[tt-rss.git] / tt-rss.php
1 <?
2 session_start();
3
4 require_once "sanity_check.php";
5 require_once "version.php";
6 require_once "config.php";
7 require_once "db-prefs.php";
8 require_once "functions.php";
9
10 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
11
12 login_sequence($link);
13
14 ?>
15 <html>
16 <head>
17 <title>Tiny Tiny RSS</title>
18
19 <link rel="stylesheet" type="text/css" href="tt-rss.css">
20
21 <? $user_theme = $_SESSION["theme"];
22 if ($user_theme) { ?>
23 <link rel="stylesheet" type="text/css" href="themes/<?= $user_theme ?>/theme.css">
24 <? } ?>
25
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
31 <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
32
33 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
34
35 <? } else { ?>
36
37 <link title="Compact Stylesheet" rel="alternate stylesheet"
38 type="text/css" href="tt-rss_compact.css"/>
39
40 <? } ?>
41
42 <script type="text/javascript" src="functions.js"></script>
43 <script type="text/javascript" src="tt-rss.js"></script>
44 <!--[if gte IE 5.5000]>
45 <script type="text/javascript" src="pngfix.js"></script>
46 <![endif]-->
47 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
48 </head>
49
50 <body onload="init()">
51
52 <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
53 <? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
54 <tr>
55 <td colspan="2" class="headerBox">
56 <table cellspacing="0" cellpadding="0" width="100%"><tr>
57 <td rowspan="2" class="header" valign="middle">
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">&nbsp;</span></div>
62 </td>
63
64 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
65
66 </tr><tr><td class="welcomePrompt">
67 <? if (!SINGLE_USER_MODE) { ?>
68 Hello, <b><?= $_SESSION["name"] ?></b>
69 (<a href="logout.php">Logout</a>)
70 <? } ?>
71 </td>
72 </tr></table>
73 </td>
74 </tr>
75 <? } else { ?>
76 <tr><td align="right" colspan="2">
77 <div id="notify"><span id="notify_body">&nbsp;</span></div>
78 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
79 </td></tr>
80 <? } ?>
81 <tr>
82 <td valign="top" rowspan="3" class="feeds">
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">
91
92 <? if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?>
93
94 <iframe frameborder="0"
95 src="backend.php?op=error&msg=Loading,%20please wait..."
96 id="feeds-frame" name="feeds-frame" class="feedsFrameWithActions"> </iframe>
97
98 <div align="center">All feeds:
99
100 <select id="allFeedsChooser">
101 <option>Update</option>
102 <option>Mark as read</option>
103 <option>Show only unread</option>
104 </select>
105
106 <input type="submit" class="button" onclick="allFeedsMenuGo()" value="Go">
107
108 </div>
109
110 <? } else { ?>
111
112 <iframe frameborder="0"
113 src="backend.php?op=error&msg=Loading,%20please wait..."
114 id="feeds-frame" name="feeds-frame" class="feedsFrame"> </iframe>
115
116 <? } ?>
117
118 </td></tr></table>
119
120 </td>
121 <td valign="top" class="headlinesToolbarBox">
122 <table width="100%" cellpadding="0" cellspacing="0">
123
124 <tr><td class="headlinesToolbar" id="headlinesToolbar">
125 <input id="searchbox"
126 onblur="javascript:enableHotkeys()" onfocus="javascript:disableHotkeys()"
127 onchange="javascript:search()">
128 <select id="searchmodebox">
129 <option>This feed</option>
130 <option>All feeds</option>
131 </select>
132
133 <input type="submit"
134 class="button" onclick="javascript:search()" value="Search">
135
136 &nbsp;View:
137
138 <select id="viewbox" onchange="javascript:viewCurrentFeed(0, '')">
139 <option selected>Adaptive</option>
140 <option>All Articles</option>
141 <option>Starred</option>
142 <option>Unread</option>
143 </select>
144
145 &nbsp;Limit:
146
147 <select id="limitbox" onchange="javascript:viewCurrentFeed(0, '')">
148
149 <?
150 $limits = array(15 => 15, 30 => 30, 60 => 60);
151
152 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
153
154 print $def_art_limit;
155
156 if ($def_art_limit >= 0) {
157 $limits[$def_art_limit] = $def_art_limit;
158 }
159
160 asort($limits);
161
162 array_push($limits, 0);
163
164 foreach ($limits as $key) {
165 print "<option";
166 if ($key == $def_art_limit) { print " selected"; }
167 print ">";
168
169 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
170
171 print "</option>";
172 } ?>
173
174 </select>
175
176 <!-- &nbsp;Selection:
177
178 <select id="headopbox">
179 <option id="hopToggleRead">Toggle (un)read</option>
180 </select>
181
182 <input class="button" type="submit" onclick="headopGo()" value="Go"> -->
183
184 &nbsp;Feed: <input class="button" type="submit"
185 onclick="javascript:viewCurrentFeed(0, 'ForceUpdate')" value="Update">
186
187 <input class="button" type="submit" id="btnMarkFeedAsRead"
188 onclick="javascript:viewCurrentFeed(0, 'MarkAllRead')" value="Mark as read">
189
190 </td>
191 <td align="right">
192 Actions: <select id="quickMenuChooser">
193 <option id="qmcPrefs" selected>Preferences...</option>
194 <option disabled>--------</option>
195 <option style="color : #5050aa" disabled>Feed actions:</option>
196 <option id="qmcAddFeed">&nbsp;&nbsp;Add new feed...</option>
197 <option id="qmcRemoveFeed">&nbsp;&nbsp;Remove this feed...</option>
198 <!-- <option>Edit this feed</option> -->
199 <option disabled>--------</option>
200 <option style="color : #5050aa" disabled>All feeds:</option>
201 <option id="qmcUpdateFeeds">&nbsp;&nbsp;Update</option>
202 <option id="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option>
203 <option id="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option>
204 <option disabled>--------</option>
205 <option style="color : #5050aa" disabled>Other actions:</option>
206 <option id="qmcAddFilter">&nbsp;&nbsp;Add filter...</option>
207 </select>
208 <input type="submit" class="button" onclick="quickMenuGo()" value="Go">
209 </td>
210 </tr>
211 </table>
212 </td>
213 </tr>
214 <? if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
215 <tr>
216 <td id="headlines" class="headlines2" valign="top">
217 <iframe frameborder="0" name="headlines-frame"
218 id="headlines-frame" class="headlinesFrame"
219 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
220 </td>
221 </tr>
222 <? } else { ?>
223 <tr>
224 <td id="headlines" class="headlines" valign="top">
225 <iframe frameborder="0" name="headlines-frame"
226 id="headlines-frame" class="headlinesFrame"
227 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
228 </td>
229 </tr><tr>
230 <td class="content" id="content" valign="top">
231 <iframe frameborder="0" name="content-frame"
232 id="content-frame" class="contentFrame"> </iframe>
233 </td>
234 </tr>
235 <? } ?>
236 <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
237 <tr>
238 <td colspan="2" class="footer">
239 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
240 <? if (WEB_DEMO_MODE) { ?>
241 <br>Running in demo mode, some functionality is disabled.
242 <? } ?>
243 </td>
244 </td>
245 <? } ?>
246 </table>
247
248 <? db_close($link); ?>
249
250 </body>
251 </html>