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
>
91 (<a href
="logout.php">Logout
</a
>)
99 <div id
="userDlg"> 
;</div
>
102 <td valign
="top" rowspan
="3" class="feeds">
104 <!-- <div id
="feeds"> 
;</div
> -->
106 <div id
="dispSwitch">
107 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
110 <iframe frameborder
="0"
111 src
="backend.php?op=error&msg=Loading,%20please wait..."
112 id
="feeds-frame" name
="feeds-frame" class="feedsFrame"> </iframe
>
114 <?
if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?
>
116 <div align
="center">All feeds
:
118 <select id
="allFeedsChooser">
119 <option
>Update
</option
>
120 <option
>Mark
as read
</option
>
121 <option
>Show only unread
</option
>
124 <input type
="submit" class="button" onclick
="allFeedsMenuGo()" value
="Go">
131 <td valign
="top" class="headlinesToolbarBox">
132 <table width
="100%" cellpadding
="0" cellspacing
="0">
134 <tr
><td
class="headlinesToolbar" id
="headlinesToolbar">
135 <input id
="searchbox"
136 onblur
="javascript:enableHotkeys()" onfocus
="javascript:disableHotkeys()"
137 onchange
="javascript:search()">
138 <select id
="searchmodebox">
139 <option
>This feed
</option
>
140 <option
>All feeds
</option
>
144 class="button" onclick
="javascript:search()" value
="Search">
150 <select id
="viewbox" onchange
="javascript:viewCurrentFeed(0, '')">
151 <option
>All Articles
</option
>
152 <option
>Starred
</option
>
153 <option selected
>Unread
</option
>
154 <option
>Unread
or Starred
</option
>
155 <option
>Unread
or Updated
</option
>
160 <select id
="limitbox" onchange
="javascript:viewCurrentFeed(0, '')">
163 $limits = array(15 => 15, 30 => 30, 60 => 60);
165 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
167 print $def_art_limit;
169 if ($def_art_limit >= 0) {
170 $limits[$def_art_limit] = $def_art_limit;
175 array_push($limits, 0);
177 foreach ($limits as $key) {
179 if ($key == $def_art_limit) { print " selected"; }
182 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
189  
;Feed
: <input
class="button" type
="submit"
190 onclick
="javascript:viewCurrentFeed(0, 'ForceUpdate')" value
="Update">
192 <input
class="button" type
="submit" id
="btnMarkFeedAsRead"
193 onclick
="javascript:viewCurrentFeed(0, 'MarkAllRead')" value
="Mark as read">
197 Actions
: <select id
="quickMenuChooser">
198 <option id
="qmcPrefs" selected
>Preferences
...</option
>
199 <option disabled
>--------</option
>
200 <option style
="color : #5050aa" disabled
>Feed actions
:</option
>
201 <option id
="qmcAddFeed"> 
; 
;Add
new feed
</option
>
202 <option id
="qmcRemoveFeed"> 
; 
;Remove this feed
</option
>
203 <!-- <option
>Edit this feed
</option
> -->
204 <option disabled
>--------</option
>
205 <option style
="color : #5050aa" disabled
>All feeds
:</option
>
206 <option id
="qmcUpdateFeeds"> 
; 
;Update
</option
>
207 <option id
="qmcCatchupAll"> 
; 
;Mark
as read
</option
>
208 <option id
="qmcShowOnlyUnread"> 
; 
;Show only unread
</option
>
210 <input type
="submit" class="button" onclick
="quickMenuGo()" value
="Go">
216 <td id
="headlines" class="headlines" valign
="top">
217 <iframe frameborder
="0" name
="headlines-frame"
218 id
="headlines-frame" class="headlinesFrame"
219 src
="backend.php?op=error&msg=No%20feed%20selected."></iframe
>
222 <td
class="content" id
="content" valign
="top">
223 <iframe frameborder
="0" name
="content-frame"
224 id
="content-frame" class="contentFrame"> </iframe
>
227 <?
if (get_pref($link, 'DISPLAY_FOOTER')) { ?
>
229 <td colspan
="2" class="footer">
230 <a href
="http://bah.spb.su/~fox/tt-rss/">Tiny
-Tiny RSS
</a
> v
<?
= VERSION ?
> ©
; 2005 Andrew Dolgov
231 <?
if (WEB_DEMO_MODE
) { ?
>
232 <br
>Running in demo mode
, some functionality is disabled
.
239 <?
db_close($link); ?
>