]> git.wh0rd.org - tt-rss.git/blob - tt-rss.php
fix owner_uid checking in OPML export (path2)
[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_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
22 <? if ($user_css_url) { ?>
23 <link type="text/css" href="<?= $user_css_url ?>"/>
24 <? } ?>
25
26 <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
27
28 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
29
30 <? } else { ?>
31
32 <link title="Compact Stylesheet" rel="alternate stylesheet"
33 type="text/css" href="tt-rss_compact.css"/>
34
35 <? } ?>
36
37 <script type="text/javascript" src="functions.js"></script>
38 <script type="text/javascript" src="tt-rss.js"></script>
39 <!--[if gte IE 5.5000]>
40 <script type="text/javascript" src="pngfix.js"></script>
41 <![endif]-->
42 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
43 </head>
44
45 <body onload="init()">
46
47 <? if (get_pref($link, 'ENABLE_SPLASH')) { ?>
48 <div id="splash">
49 <table width='100%' height='100%'><tr>
50 <td class="innerSplash" valign="middle" align="center">
51 <img src="images/ttrss_logo.png" alt="logo">
52 <p>Loading, please wait...</p>
53 </td></tr></table>
54 </div>
55 <? } ?>
56
57 <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
58 <? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
59 <tr>
60 <td colspan="2">
61 <table cellspacing="0" cellpadding="0" width="100%"><tr>
62 <td rowspan="2" class="header" valign="middle">
63 <img src="images/ttrss_logo.png" alt="logo">
64 </td>
65 <td align="right" valign="top">
66 <div id="notify"><span id="notify_body"></div>
67 </td>
68
69 <div id="userDlg">&nbsp;</div>
70
71 </tr><tr><td class="welcomePrompt">
72 <? if (!SINGLE_USER_MODE) { ?>
73 Hello, <b><?= $_SESSION["name"] ?></b>
74 (<a href="logout.php">Logout</a>)
75 <? } ?>
76 </td>
77 </tr></table>
78 </td>
79 </tr>
80 <? } else { ?>
81 <div id="userDlg">&nbsp;</div>
82 <? } ?>
83 <tr>
84 <td valign="top" rowspan="3" class="feeds">
85 <table class="innerFeedTable"
86 cellspacing="0" cellpadding="0" height="100%" width="100%">
87 <tr><td>
88 <div id="dispSwitch">
89 <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
90 </div>
91 </td></tr>
92 <tr><td height="100%" width="100%" valign="top">
93
94 <!-- <div id="feeds">&nbsp;</div> -->
95
96
97 <iframe frameborder="0"
98 src="backend.php?op=error&msg=Loading,%20please wait..."
99 id="feeds-frame" name="feeds-frame" class="feedsFrame"> </iframe>
100
101 </td></tr></table>
102
103 <? if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?>
104
105 <div align="center">All feeds:
106
107 <select id="allFeedsChooser">
108 <option>Update</option>
109 <option>Mark as read</option>
110 <option>Show only unread</option>
111 </select>
112
113 <input type="submit" class="button" onclick="allFeedsMenuGo()" value="Go">
114
115 </div>
116
117
118 <? } ?>
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;
137
138 View:
139
140 <select id="viewbox" onchange="javascript:viewCurrentFeed(0, '')">
141 <option>All Articles</option>
142 <option>Starred</option>
143 <option selected>Unread</option>
144 <option>Unread or Starred</option>
145 <option>Unread or Updated</option>
146 </select>
147
148 &nbsp;Limit:
149
150 <select id="limitbox" onchange="javascript:viewCurrentFeed(0, '')">
151
152 <?
153 $limits = array(15 => 15, 30 => 30, 60 => 60);
154
155 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
156
157 print $def_art_limit;
158
159 if ($def_art_limit >= 0) {
160 $limits[$def_art_limit] = $def_art_limit;
161 }
162
163 asort($limits);
164
165 array_push($limits, 0);
166
167 foreach ($limits as $key) {
168 print "<option";
169 if ($key == $def_art_limit) { print " selected"; }
170 print ">";
171
172 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
173
174 print "</option>";
175 } ?>
176
177 </select>
178
179 &nbsp;Feed: <input class="button" type="submit"
180 onclick="javascript:viewCurrentFeed(0, 'ForceUpdate')" value="Update">
181
182 <input class="button" type="submit" id="btnMarkFeedAsRead"
183 onclick="javascript:viewCurrentFeed(0, 'MarkAllRead')" value="Mark as read">
184
185 </td>
186 <td align="right">
187 Actions: <select id="quickMenuChooser">
188 <option id="qmcPrefs" selected>Preferences...</option>
189 <option disabled>--------</option>
190 <option style="color : #5050aa" disabled>Feed actions:</option>
191 <option id="qmcAddFeed">&nbsp;&nbsp;Add new feed</option>
192 <option id="qmcRemoveFeed">&nbsp;&nbsp;Remove this feed</option>
193 <!-- <option>Edit this feed</option> -->
194 <option disabled>--------</option>
195 <option style="color : #5050aa" disabled>All feeds:</option>
196 <option id="qmcUpdateFeeds">&nbsp;&nbsp;Update</option>
197 <option id="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option>
198 <option id="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option>
199 </select>
200 <input type="submit" class="button" onclick="quickMenuGo()" value="Go">
201 </td>
202 </tr>
203 </table>
204 </td>
205 </tr><tr>
206 <td id="headlines" class="headlines" valign="top">
207 <iframe frameborder="0" name="headlines-frame"
208 id="headlines-frame" class="headlinesFrame"
209 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
210 </td>
211 </tr><tr>
212 <td class="content" id="content" valign="top">
213 <iframe frameborder="0" name="content-frame"
214 id="content-frame" class="contentFrame"> </iframe>
215 </td>
216 </tr>
217 <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
218 <tr>
219 <td colspan="2" class="footer">
220 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
221 <? if (WEB_DEMO_MODE) { ?>
222 <br>Running in demo mode, some functionality is disabled.
223 <? } ?>
224 </td>
225 </td>
226 <? } ?>
227 </table>
228
229 <? db_close($link); ?>
230
231 </body>
232 </html>