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