]> git.wh0rd.org - tt-rss.git/blame - tt-rss.php
sql-ize prefs.php
[tt-rss.git] / tt-rss.php
CommitLineData
4062022e
AD
1<?
2 require_once "version.php";
3 require_once "config.php";
4 require_once "db-prefs.php";
da5d0d09 5
4062022e
AD
6 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
7?>
1cd17194
AD
8<html>
9<head>
10 <title>Tiny Tiny RSS</title>
da5d0d09 11
430bf183
AD
12 <link rel="stylesheet" type="text/css" href="tt-rss.css">
13
4062022e 14 <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
da5d0d09 15
430bf183 16 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
da5d0d09
AD
17
18 <? } else { ?>
19
430bf183
AD
20 <link title="Compact Stylesheet" rel="alternate stylesheet"
21 type="text/css" href="tt-rss_compact.css"/>
da5d0d09
AD
22
23 <? } ?>
628eb1bd 24
331900c6 25 <script type="text/javascript" src="functions.js"></script>
1cd17194 26 <script type="text/javascript" src="tt-rss.js"></script>
d5224f0d
AD
27 <!--[if gte IE 5.5000]>
28 <script type="text/javascript" src="pngfix.js"></script>
29 <![endif]-->
d76a3b03 30 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
1cd17194
AD
31</head>
32
33<body onload="init()">
34
4062022e 35<? if (get_pref($link, 'ENABLE_SPLASH')) { ?>
2f587484
AD
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
828a8ecc 45<table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
4062022e 46<? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
1cd17194 47<tr>
b3a9dadd 48 <td colspan="2" class="headerBox">
828a8ecc
AD
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>
e2f8f7b4 57
f84a97a3
AD
58 <div id="userDlg">&nbsp;</div>
59
2c1dd701
AD
60 </td>
61</tr>
da5d0d09 62<? } ?>
1cd17194 63<tr>
f0601b87 64 <td valign="top" rowspan="3" class="feeds">
caa4e57f 65
1a66d16e
AD
66 <!-- <div id="feeds">&nbsp;</div> -->
67
8143ae1f
AD
68 <div id="dispSwitch">
69 <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
70 </div>
71
5bfef089 72 <iframe frameborder="0"
6adbdbee 73 src="backend.php?op=error&msg=Loading,%20please wait..."
5bfef089 74 id="feeds-frame" name="feeds-frame" class="feedsFrame"> </iframe>
7a991cac 75
4062022e 76 <? if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?>
7a991cac 77
3745788e 78 <div align="center">All feeds:
caa4e57f 79
3745788e
AD
80 <select id="allFeedsChooser">
81 <option>Update</option>
82 <option>Mark as read</option>
cbe45fa8 83 <option>Show only unread</option>
3745788e
AD
84 </select>
85
86 <input type="submit" class="button" onclick="allFeedsMenuGo()" value="Go">
27be66c3 87
3745788e 88 </div>
caa4e57f 89
7a991cac
AD
90 <? } ?>
91
1cd17194 92 </td>
f0601b87 93 <td valign="top" class="headlinesToolbarBox">
e828e31e 94 <table width="100%" cellpadding="0" cellspacing="0">
ac43eba1 95
ac43eba1 96 <tr><td class="headlinesToolbar" id="headlinesToolbar">
4ce19859 97 <input id="searchbox"
f0601b87
AD
98 onblur="javascript:enableHotkeys()" onfocus="javascript:disableHotkeys()"
99 onchange="javascript:search()">
52b51244
AD
100 <select id="searchmodebox">
101 <option>This feed</option>
102 <option>All feeds</option>
103 </select>
104
ac43eba1 105 <input type="submit"
4ce19859 106 class="button" onclick="javascript:search()" value="Search">
f0601b87 107
033e47e0
AD
108 &nbsp;
109
110 View:
f0601b87
AD
111
112 <select id="viewbox" onchange="javascript:viewCurrentFeed(0, '')">
d6f55ce8 113 <option>All Articles</option>
f0601b87 114 <option>Starred</option>
ac43eba1 115 <option selected>Unread</option>
b5aa95e7 116 <option>Unread or Starred</option>
bdd01d3f 117 <option>Unread or Updated</option>
f0601b87
AD
118 </select>
119
cb1083a1
AD
120 &nbsp;Limit:
121
122 <select id="limitbox" onchange="javascript:viewCurrentFeed(0, '')">
f1b9a8ee
AD
123
124 <?
125 $limits = array(15 => 15, 30 => 30, 60 => 60);
126
4062022e
AD
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;
f1b9a8ee
AD
133 }
134
135 asort($limits);
136
137 array_push($limits, 0);
138
139 foreach ($limits as $key) {
140 print "<option";
4062022e 141 if ($key == $def_art_limit) { print " selected"; }
f1b9a8ee
AD
142 print ">";
143
144 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
145
146 print "</option>";
147 } ?>
4062022e 148
cb1083a1
AD
149 </select>
150
ac43eba1
AD
151 &nbsp;Feed: <input class="button" type="submit"
152 onclick="javascript:viewCurrentFeed(0, 'ForceUpdate')" value="Update">
f0601b87 153
a7de14fc 154 <input class="button" type="submit" id="btnMarkFeedAsRead"
ac43eba1 155 onclick="javascript:viewCurrentFeed(0, 'MarkAllRead')" value="Mark as read">
f0601b87 156
a14f82f2
AD
157 </td>
158 <td align="right">
6de5d056 159 Actions: <select id="quickMenuChooser">
cbe45fa8 160 <option id="qmcPrefs" selected>Preferences...</option>
7a991cac
AD
161 <option disabled>--------</option>
162 <option style="color : #5050aa" disabled>Feed actions:</option>
cbe45fa8
AD
163 <option id="qmcAddFeed">&nbsp;&nbsp;Add new feed</option>
164 <option id="qmcRemoveFeed">&nbsp;&nbsp;Remove this feed</option>
e2f8f7b4 165 <!-- <option>Edit this feed</option> -->
7a991cac
AD
166 <option disabled>--------</option>
167 <option style="color : #5050aa" disabled>All feeds:</option>
cbe45fa8
AD
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>
e2f8f7b4
AD
171 </select>
172 <input type="submit" class="button" onclick="quickMenuGo()" value="Go">
a14f82f2
AD
173 </td>
174 </tr>
f0601b87
AD
175 </table>
176 </td>
177</tr><tr>
1cd17194 178 <td id="headlines" class="headlines" valign="top">
5bfef089 179 <iframe frameborder="0" name="headlines-frame"
e828e31e
AD
180 id="headlines-frame" class="headlinesFrame"
181 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
1cd17194 182 </td>
bb7cface 183</tr><tr>
1cd17194 184 <td class="content" id="content" valign="top">
5bfef089
AD
185 <iframe frameborder="0" name="content-frame"
186 id="content-frame" class="contentFrame"> </iframe>
1cd17194
AD
187 </td>
188</tr>
4062022e 189<? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
1cd17194 190<tr>
e828e31e 191 <td colspan="2" class="footer">
7936e979 192 <a href="http://bah.spb.su/~fox/tt-rss/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
0b615681
AD
193 <? if (WEB_DEMO_MODE) { ?>
194 <br>Running in demo mode, some functionality is disabled.
195 <? } ?>
1cd17194
AD
196 </td>
197</td>
da5d0d09 198<? } ?>
1cd17194
AD
199</table>
200
201
202</body>
203</html>