]> git.wh0rd.org - tt-rss.git/blob - tt-rss.php
disable hotkeys when userDlg is shown
[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 <? if (get_pref($link, 'COMBINED_DISPLAY_MODE'))
83 $feeds_rowspan = 2;
84 else
85 $feeds_rowspan = 3; ?>
86 <td valign="top" rowspan="<?= $feeds_rowspan ?>" class="feeds">
87 <table class="innerFeedTable"
88 cellspacing="0" cellpadding="0" height="100%" width="100%">
89 <tr><td>
90 <div id="dispSwitch">
91 <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
92 </div>
93 </td></tr>
94 <tr><td height="100%" width="100%" valign="top">
95
96 <? if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?>
97
98 <iframe frameborder="0"
99 src="backend.php?op=error&msg=Loading,%20please wait..."
100 id="feeds-frame" name="feeds-frame" class="feedsFrameWithActions"> </iframe>
101
102 <div align="center">All feeds:
103
104 <select id="allFeedsChooser">
105 <option>Update</option>
106 <option>Mark as read</option>
107 <option>Show only unread</option>
108 </select>
109
110 <input type="submit" class="button" onclick="allFeedsMenuGo()" value="Go">
111
112 </div>
113
114 <? } else { ?>
115
116 <iframe frameborder="0"
117 src="backend.php?op=error&msg=Loading,%20please wait..."
118 id="feeds-frame" name="feeds-frame" class="feedsFrame"> </iframe>
119
120 <? } ?>
121
122 </td></tr></table>
123
124 </td>
125 <td valign="top" class="headlinesToolbarBox">
126 <table width="100%" cellpadding="0" cellspacing="0">
127
128 <tr><td class="headlinesToolbar" id="headlinesToolbar">
129 <input id="searchbox"
130 onblur="javascript:enableHotkeys()" onfocus="javascript:disableHotkeys()"
131 onchange="javascript:search()">
132 <select id="searchmodebox">
133 <option>This feed</option>
134 <option>All feeds</option>
135 </select>
136
137 <input type="submit"
138 class="button" onclick="javascript:search()" value="Search">
139
140 &nbsp;View:
141
142 <select id="viewbox" onchange="javascript:viewCurrentFeed(0, '')">
143 <option selected>Adaptive</option>
144 <option>All Articles</option>
145 <option>Starred</option>
146 <option>Unread</option>
147 </select>
148
149 &nbsp;Limit:
150
151 <select id="limitbox" onchange="javascript:viewCurrentFeed(0, '')">
152
153 <?
154 $limits = array(15 => 15, 30 => 30, 60 => 60);
155
156 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
157
158 print $def_art_limit;
159
160 if ($def_art_limit >= 0) {
161 $limits[$def_art_limit] = $def_art_limit;
162 }
163
164 asort($limits);
165
166 array_push($limits, 0);
167
168 foreach ($limits as $key) {
169 print "<option";
170 if ($key == $def_art_limit) { print " selected"; }
171 print ">";
172
173 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
174
175 print "</option>";
176 } ?>
177
178 </select>
179
180 <!-- &nbsp;Selection:
181
182 <select id="headopbox">
183 <option id="hopToggleRead">Toggle (un)read</option>
184 </select>
185
186 <input class="button" type="submit" onclick="headopGo()" value="Go"> -->
187
188 &nbsp;Feed: <input class="button" type="submit"
189 onclick="javascript:viewCurrentFeed(0, 'ForceUpdate')" value="Update">
190
191 <input class="button" type="submit" id="btnMarkFeedAsRead"
192 onclick="javascript:viewCurrentFeed(0, 'MarkAllRead')" value="Mark as read">
193
194 </td>
195 <td align="right">
196 Actions: <select id="quickMenuChooser">
197 <option id="qmcPrefs" selected>Preferences...</option>
198 <option disabled>--------</option>
199 <option style="color : #5050aa" disabled>Feed actions:</option>
200 <option id="qmcAddFeed">&nbsp;&nbsp;Add new feed...</option>
201 <option id="qmcRemoveFeed">&nbsp;&nbsp;Remove this feed...</option>
202 <!-- <option>Edit this feed</option> -->
203 <option disabled>--------</option>
204 <option style="color : #5050aa" disabled>All feeds:</option>
205 <option id="qmcUpdateFeeds">&nbsp;&nbsp;Update</option>
206 <option id="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option>
207 <option id="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option>
208 <option disabled>--------</option>
209 <option style="color : #5050aa" disabled>Other actions:</option>
210 <option id="qmcAddFilter">&nbsp;&nbsp;Add filter...</option>
211 </select>
212 <input type="submit" class="button" onclick="quickMenuGo()" value="Go">
213 </td>
214 </tr>
215 </table>
216 </td>
217 </tr>
218 <? if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
219 <tr>
220 <td id="headlines" class="headlines2" valign="top">
221 <iframe frameborder="0" name="headlines-frame"
222 id="headlines-frame" class="headlinesFrame"
223 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
224 </td>
225 </tr>
226 <? } else { ?>
227 <tr>
228 <td id="headlines" class="headlines" valign="top">
229 <iframe frameborder="0" name="headlines-frame"
230 id="headlines-frame" class="headlinesFrame"
231 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
232 </td>
233 </tr><tr>
234 <td class="content" id="content" valign="top">
235 <iframe frameborder="0" name="content-frame"
236 id="content-frame" class="contentFrame"> </iframe>
237 </td>
238 </tr>
239 <? } ?>
240 <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
241 <tr>
242 <td colspan="2" class="footer">
243 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
244 <? if (WEB_DEMO_MODE) { ?>
245 <br>Running in demo mode, some functionality is disabled.
246 <? } ?>
247 </td>
248 </td>
249 <? } ?>
250 </table>
251
252 <? db_close($link); ?>
253
254 </body>
255 </html>