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");
19 authenticate_user($link);
23 $_SESSION["name"] = "admin";
26 initialize_user_prefs($link, $_SESSION["uid"]);
27 // FIXME this needs to be moved somewhere after user creation
32 <title
>Tiny Tiny RSS
</title
>
34 <link rel
="stylesheet" type
="text/css" href
="tt-rss.css">
36 <?
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?
>
38 <link rel
="stylesheet" href
="tt-rss_compact.css" type
="text/css">
42 <link title
="Compact Stylesheet" rel
="alternate stylesheet"
43 type
="text/css" href
="tt-rss_compact.css"/>
47 <script type
="text/javascript" src
="functions.js"></script
>
48 <script type
="text/javascript" src
="tt-rss.js"></script
>
49 <!--[if gte IE
5.5000]>
50 <script type
="text/javascript" src
="pngfix.js"></script
>
52 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
55 <body onload
="init()">
57 <?
if (get_pref($link, 'ENABLE_SPLASH')) { ?
>
59 <table width
='100%' height
='100%'><tr
>
60 <td
class="innerSplash" valign
="middle" align
="center">
61 <img src
="images/ttrss_logo.png" alt
="logo">
62 <p
>Loading
, please wait
...</p
>
67 <table width
="100%" height
="100%" cellspacing
="0" cellpadding
="0" class="main">
68 <?
if (get_pref($link, 'DISPLAY_HEADER')) { ?
>
71 <table cellspacing
="0" cellpadding
="0" width
="100%"><tr
>
72 <td rowspan
="2" class="header" valign
="middle">
73 <img src
="images/ttrss_logo.png" alt
="logo">
75 <td align
="right" valign
="top">
76 <div id
="notify"><span id
="notify_body"></div
>
78 </tr
><tr
><td
class="welcomePrompt">
79 <?
if (!SINGLE_USER_MODE
) { ?
>
80 Hello
, <b
><?
= $_SESSION["name"] ?
></b
> (<a href
="logout.php">Logout
</a
>)</td
>
87 <td valign
="top" rowspan
="3" class="feeds">
89 <!-- <div id
="feeds"> 
;</div
> -->
92 <a id
="dispSwitchPrompt" href
="javascript:toggleTags()">display tags
</a
>
95 <iframe frameborder
="0"
96 src
="backend.php?op=error&msg=Loading,%20please wait..."
97 id
="feeds-frame" name
="feeds-frame" class="feedsFrame"> </iframe
>
99 <?
if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?
>
101 <div align
="center">All feeds
:
103 <select id
="allFeedsChooser">
104 <option
>Update
</option
>
105 <option
>Mark
as read
</option
>
106 <option
>Show only unread
</option
>
109 <input type
="submit" class="button" onclick
="allFeedsMenuGo()" value
="Go">
116 <td valign
="top" class="headlinesToolbarBox">
117 <table width
="100%" cellpadding
="0" cellspacing
="0">
119 <tr
><td
class="headlinesToolbar" id
="headlinesToolbar">
120 <input id
="searchbox"
121 onblur
="javascript:enableHotkeys()" onfocus
="javascript:disableHotkeys()"
122 onchange
="javascript:search()">
123 <select id
="searchmodebox">
124 <option
>This feed
</option
>
125 <option
>All feeds
</option
>
129 class="button" onclick
="javascript:search()" value
="Search">
135 <select id
="viewbox" onchange
="javascript:viewCurrentFeed(0, '')">
136 <option
>All Articles
</option
>
137 <option
>Starred
</option
>
138 <option selected
>Unread
</option
>
139 <option
>Unread
or Starred
</option
>
140 <option
>Unread
or Updated
</option
>
145 <select id
="limitbox" onchange
="javascript:viewCurrentFeed(0, '')">
148 $limits = array(15 => 15, 30 => 30, 60 => 60);
150 $def_art_limit = get_pref($link, 'DEFAULT_ARTICLE_LIMIT');
152 print $def_art_limit;
154 if ($def_art_limit >= 0) {
155 $limits[$def_art_limit] = $def_art_limit;
160 array_push($limits, 0);
162 foreach ($limits as $key) {
164 if ($key == $def_art_limit) { print " selected"; }
167 if ($limits[$key] == 0) { print "All"; } else { print $limits[$key]; }
174  
;Feed
: <input
class="button" type
="submit"
175 onclick
="javascript:viewCurrentFeed(0, 'ForceUpdate')" value
="Update">
177 <input
class="button" type
="submit" id
="btnMarkFeedAsRead"
178 onclick
="javascript:viewCurrentFeed(0, 'MarkAllRead')" value
="Mark as read">
182 Actions
: <select id
="quickMenuChooser">
183 <option id
="qmcPrefs" selected
>Preferences
...</option
>
184 <option disabled
>--------</option
>
185 <option style
="color : #5050aa" disabled
>Feed actions
:</option
>
186 <option id
="qmcAddFeed"> 
; 
;Add
new feed
</option
>
187 <option id
="qmcRemoveFeed"> 
; 
;Remove this feed
</option
>
188 <!-- <option
>Edit this feed
</option
> -->
189 <option disabled
>--------</option
>
190 <option style
="color : #5050aa" disabled
>All feeds
:</option
>
191 <option id
="qmcUpdateFeeds"> 
; 
;Update
</option
>
192 <option id
="qmcCatchupAll"> 
; 
;Mark
as read
</option
>
193 <option id
="qmcShowOnlyUnread"> 
; 
;Show only unread
</option
>
195 <input type
="submit" class="button" onclick
="quickMenuGo()" value
="Go">
201 <td id
="headlines" class="headlines" valign
="top">
202 <iframe frameborder
="0" name
="headlines-frame"
203 id
="headlines-frame" class="headlinesFrame"
204 src
="backend.php?op=error&msg=No%20feed%20selected."></iframe
>
207 <td
class="content" id
="content" valign
="top">
208 <iframe frameborder
="0" name
="content-frame"
209 id
="content-frame" class="contentFrame"> </iframe
>
212 <?
if (get_pref($link, 'DISPLAY_FOOTER')) { ?
>
214 <td colspan
="2" class="footer">
215 <a href
="http://bah.spb.su/~fox/tt-rss/">Tiny
-Tiny RSS
</a
> v
<?
= VERSION ?
> ©
; 2005 Andrew Dolgov
216 <?
if (WEB_DEMO_MODE
) { ?
>
217 <br
>Running in demo mode
, some functionality is disabled
.
224 <?
db_close($link); ?
>