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