4 require_once "version.php";
5 require_once "config.php";
6 require_once "db-prefs.php";
7 require_once "functions.php";
9 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
11 if (!SINGLE_USER_MODE) {
14 if (!$_SESSION["uid"]) {
15 header("Location: login.php?rt=tt-rss.php");
19 $force_logout = $_POST["ForceLogout"];
20 http_authenticate_user($link, $force_logout == "yes");
24 $_SESSION["name"] = "admin";
30 <title>Tiny Tiny RSS</title>
32 <link rel="stylesheet" type="text/css" href="tt-rss.css">
34 <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
36 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
40 <link title="Compact Stylesheet" rel="alternate stylesheet"
41 type="text/css" href="tt-rss_compact.css"/>
45 <script type="text/javascript" src="functions.js"></script>
46 <script type="text/javascript" src="tt-rss.js"></script>
47 <!--[if gte IE 5.5000]>
48 <script type="text/javascript" src="pngfix.js"></script>
50 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
53 <body onload="init()">
55 <? if (get_pref($link, 'ENABLE_SPLASH')) { ?>
57 <table width='100%' height='100%'><tr>
58 <td class="innerSplash" valign="middle" align="center">
59 <img src="images/ttrss_logo.png" alt="logo">
60 <p>Loading, please wait...</p>
65 <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
66 <? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
69 <table cellspacing="0" cellpadding="0" width="100%"><tr>
70 <td rowspan="2" class="header" valign="middle">
71 <img src="images/ttrss_logo.png" alt="logo">
73 <td align="right" valign="top">
74 <div id="notify"><span id="notify_body"></div>
77 <div id="userDlg"> </div>
79 </tr><tr><td class="welcomePrompt">
80 <? if (!SINGLE_USER_MODE) { ?>
81 <? if (USE_HTTP_AUTH) { ?>
82 <table align="right"><tr>
83 <td class="httpWelcomePrompt">Hello, <b><?= $_SESSION["name"] ?></b></td>
84 <td><form action="tt-rss.php" method="POST">
85 <input type="hidden" name="ForceLogout" value="yes">
86 <input type="submit" class="button" value="Logout">
90 Hello, <b><?= $_SESSION["name"] ?></b>(<a href="logout.php">Logout</a>)
98 <div id="userDlg"> </div>
101 <td valign="top" rowspan="3" class="feeds">
103 <!-- <div id="feeds"> </div> -->
105 <div id="dispSwitch">
106 <a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
109 <iframe frameborder="0"
110 src="backend.php?op=error&msg=Loading,%20please wait..."
111 id="feeds-frame" name="feeds-frame" class="feedsFrame"> </iframe>
113 <? if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?>
115 <div align="center">All feeds:
117 <select id="allFeedsChooser">
118 <option>Update</option>
119 <option>Mark as read</option>
120 <option>Show only unread</option>
123 <input type="submit" class="button" onclick="allFeedsMenuGo()" value="Go">
130 <td valign="top" class="headlinesToolbarBox">
131 <table width="100%" cellpadding="0" cellspacing="0">
133 <tr><td class="headlinesToolbar" id="headlinesToolbar">
134 <input id="searchbox"
135 onblur="javascript:enableHotkeys()" onfocus="javascript:disableHotkeys()"
136 onchange="javascript:search()">
137 <select id="searchmodebox">
138 <option>This feed</option>
139 <option>All feeds</option>
143 class="button" onclick="javascript:search()" value="Search">
149 <select id="viewbox" onchange="javascript:viewCurrentFeed(0, '')">
150 <option>All Articles</option>
151 <option>Starred</option>
152 <option selected>Unread</option>
153 <option>Unread or Starred</option>
154 <option>Unread or Updated</option>
159 <select id="limitbox" onchange="javascript:viewCurrentFeed(0, '')">
162 $limits = array(15 => 15, 30 => 30, 60 => 60);
164 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
166 print $def_art_limit;
168 if ($def_art_limit >= 0) {
169 $limits[$def_art_limit] = $def_art_limit;
174 array_push($limits, 0);
176 foreach ($limits as $key) {
178 if ($key == $def_art_limit) { print " selected"; }
181 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
188 Feed: <input class="button" type="submit"
189 onclick="javascript:viewCurrentFeed(0, 'ForceUpdate')" value="Update">
191 <input class="button" type="submit" id="btnMarkFeedAsRead"
192 onclick="javascript:viewCurrentFeed(0, 'MarkAllRead')" value="Mark as read">
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"> Add new feed</option>
201 <option id="qmcRemoveFeed"> 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"> Update</option>
206 <option id="qmcCatchupAll"> Mark as read</option>
207 <option id="qmcShowOnlyUnread"> Show only unread</option>
209 <input type="submit" class="button" onclick="quickMenuGo()" value="Go">
215 <td id="headlines" class="headlines" valign="top">
216 <iframe frameborder="0" name="headlines-frame"
217 id="headlines-frame" class="headlinesFrame"
218 src="backend.php?op=error&msg=No%20feed%20selected."></iframe>
221 <td class="content" id="content" valign="top">
222 <iframe frameborder="0" name="content-frame"
223 id="content-frame" class="contentFrame"> </iframe>
226 <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
228 <td colspan="2" class="footer">
229 <a href="http://bah.spb.su/~fox/tt-rss/">Tiny-Tiny RSS</a> v<?= VERSION ?> © 2005 Andrew Dolgov
230 <? if (WEB_DEMO_MODE) { ?>
231 <br>Running in demo mode, some functionality is disabled.
238 <? db_close($link); ?>