]> git.wh0rd.org Git - tt-rss.git/blob - tt-rss.php
initial implementation of feedlist based on dijit.Tree
[tt-rss.git] / tt-rss.php
1 <?php
2         require_once "functions.php"; 
3         require_once "sessions.php";
4         require_once "sanity_check.php";
5         require_once "version.php"; 
6         require_once "config.php";
7         require_once "db-prefs.php";
8
9         $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); 
10
11         init_connection($link);
12
13         login_sequence($link);
14
15         $dt_add = time();
16
17         no_cache_incantation();
18
19         header('Content-Type: text/html; charset=utf-8');
20         
21 ?>
22 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
23         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
24 <html>
25 <head>
26         <title>Tiny Tiny RSS</title>
27
28         <link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"/>
29         <link rel="stylesheet" type="text/css" href="cdm.css?<?php echo $dt_add ?>"/>
30
31         <link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
32
33         <?php   $user_theme = get_user_theme_path($link);
34                 if ($user_theme) { ?>
35                         <link rel="stylesheet" type="text/css" href="<?php echo $user_theme ?>/theme.css?<?php echo $dt_add ?>">
36         <?php } ?>
37
38         <?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
39         <?php if ($user_css_url) { ?>
40                 <link rel="stylesheet" type="text/css" href="<?php echo $user_css_url ?>"/> 
41         <?php } ?>
42
43         <link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
44
45         <script type="text/javascript" src="lib/prototype.js"></script>
46         <script type="text/javascript" src="lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls,builder"></script>
47         <script type="text/javascript" src="lib/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
48         <script type="text/javascript" charset="utf-8" src="localized_js.php?<?php echo $dt_add ?>"></script>
49         <script type="text/javascript" charset="utf-8" src="tt-rss.js?<?php echo $dt_add ?>"></script>
50         <script type="text/javascript" charset="utf-8" src="functions.js?<?php echo $dt_add ?>"></script>
51         <script type="text/javascript" charset="utf-8" src="feedlist.js?<?php echo $dt_add ?>"></script>
52         <script type="text/javascript" charset="utf-8" src="viewfeed.js?<?php echo $dt_add ?>"></script>
53
54         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
55
56         <script type="text/javascript">
57                 Event.observe(window, 'load', function() {
58                         init();
59                 });
60         </script>
61 </head>
62
63 <body id="ttrssMain" class="claro">
64
65 <div id="overlay" style="display : block">
66         <div id="overlay_inner">
67                 <?php echo __("Loading, please wait...") ?>
68
69                 <div id="l_progress_o">
70                         <div id="l_progress_i"></div>
71                 </div>
72
73         <noscript>
74                 <p>
75                 <?php print_error(__("Your browser doesn't support Javascript, which is required
76                 for this application to function properly. Please check your
77                 browser settings.")) ?></p>
78         </noscript>
79         </div>
80 </div> 
81
82 <div id="hotkey_help_overlay" style="display : none" onclick="Element.hide(this)">
83         <?php rounded_table_start("hho"); ?>
84         <?php include "help/3.php" ?>
85         <?php rounded_table_end(); ?>
86 </div>
87
88 <div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
89 <div id="cmdline" style="display : none"></div>
90 <div id="auxDlg" style="display : none"></div>
91
92 <div id="main" dojoType="dijit.layout.BorderContainer">
93
94 <div id="header" dojoType="dijit.layout.ContentPane" region="top">
95         <div class="topLinks" id="topLinks">
96
97         <?php if (!SINGLE_USER_MODE) { ?>
98                         <?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
99         <?php } ?>
100         <a href="prefs.php"><?php echo __('Preferences') ?></a>
101
102         <?php if (defined('FEEDBACK_URL') && FEEDBACK_URL) { ?>
103                 | <a target="_blank" class="feedback" href="<?php echo FEEDBACK_URL ?>">
104                                 <?php echo __('Comments?') ?></a>
105         <?php } ?>
106
107         <?php if (!SINGLE_USER_MODE) { ?>
108                         | <a href="logout.php"><?php echo __('Logout') ?></a>
109         <?php } ?>
110
111         <img id="newVersionIcon" style="display:none;" onclick="javascript:explainError(2)" 
112                 width="13" height="13" 
113                 src="<?php echo theme_image($link, 'images/new_version.png') ?>"
114                 title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>" 
115                 alt="new_version_icon"/>
116
117         </div>
118
119         <img src="<?php echo theme_image($link, 'images/ttrss_logo.png') ?>" alt="Tiny Tiny RSS"/>      
120 </div>
121
122 <div id="feeds-holder" dojoType="dijit.layout.ContentPane" region="leading" style="width : 20%" splitter="true">
123         <div id="dispSwitch"> 
124                 <a id="dispSwitchPrompt" 
125                         href="javascript:toggleTags()"><?php echo __("tag cloud") ?></a>
126         </div>
127         <div id="feeds-frame"><div id="feedTree"></div></div>
128 </div>
129
130 <div dojoType="dijit.layout.BorderContainer" region="center" id="content-wrap">
131
132 <div id="toolbar" dojoType="dijit.layout.ContentPane" region="top">
133
134                 <div class="actionChooser">
135                         <select id="quickMenuChooser" onchange="quickMenuChange()">
136                                         <option value="qmcDefault" selected="selected"><?php echo __('Actions...') ?></option>
137                                         <option value="qmcSearch"><?php echo __('Search...') ?></option>
138                                         <optgroup label="<?php echo __('Feed actions:') ?>">
139                                         <option value="qmcAddFeed"><?php echo __('Subscribe to feed...') ?></option>
140                                         <option value="qmcEditFeed"><?php echo __('Edit this feed...') ?></option>
141                                         <option value="qmcRescoreFeed"><?php echo __('Rescore feed') ?></option>
142                                         <option value="qmcRemoveFeed"><?php echo __('Unsubscribe') ?></option>
143                                         </optgroup>
144                                         <optgroup label="<?php echo __('All feeds:') ?>">
145                                         <option value="qmcCatchupAll"><?php echo __('Mark as read') ?></option>
146                                         <option value="qmcShowOnlyUnread"><?php echo __('(Un)hide read feeds') ?></option>
147                                         </optgroup>
148                                         <optgroup label="<?php echo __('Categories:') ?>">
149
150                                         <option value="qmcToggleReorder"><?php echo __('Toggle reordering mode') ?></option>
151                                         <option value="qmcResetCats"><?php echo __('Reset order') ?></option>
152                                         </optgroup>
153
154                                         <optgroup label="<?php echo __('Other actions:') ?>">
155
156                                         <option value="qmcAddLabel"><?php echo __('Create label...') ?></option>
157                                         <option value="qmcAddFilter"><?php echo __('Create filter...') ?></option>
158                                         <option value="qmcResetUI"><?php echo __('Reset UI layout') ?></option>
159                                         <option value="qmcHKhelp"><?php echo __('Keyboard shortcuts help') ?></option>
160                                         </optgroup>
161
162                         </select>
163                 </div>
164
165                 <form id="main_toolbar_form" action="" onsubmit='return false'>
166
167                 <button id="collapse_feeds_btn" onclick="collapse_feedlist()"
168                         title="<?php echo __('Collapse feedlist') ?>" style="display : none">
169                         &lt;&lt;</button>
170
171                 <select name="view_mode" title="<?php echo __('Show articles') ?>" 
172                                 onchange="viewModeChanged()">
173                         <option selected="selected" value="adaptive"><?php echo __('Adaptive') ?></option>
174                         <option value="all_articles"><?php echo __('All Articles') ?></option>
175                         <option value="marked"><?php echo __('Starred') ?></option>
176                         <option value="published"><?php echo __('Published') ?></option>
177                         <option value="unread"><?php echo __('Unread') ?></option>
178                         <!-- <option value="noscores"><?php echo __('Ignore Scoring') ?></option> -->
179                         <option value="updated"><?php echo __('Updated') ?></option>
180                 </select>
181
182                 <select title="<?php echo __('Sort articles') ?>" 
183                                 name="order_by" onchange="viewModeChanged()">
184                         <option selected="selected" value="default"><?php echo __('Default') ?></option>
185                         <option value="date"><?php echo __('Date') ?></option>
186                         <option value="title"><?php echo __('Title') ?></option>
187                         <option value="score"><?php echo __('Score') ?></option>
188                 </select>
189
190                 <button name="update" onclick="return scheduleFeedUpdate()">
191                         <?php echo __('Update') ?></button>
192
193                 <button onclick="return catchupCurrentFeed()">
194                         <?php echo __('Mark as read') ?></button>
195
196                 </form>
197
198         </div>
199
200         <div id="headlines-wrap-inner" dojoType="dijit.layout.BorderContainer" region="center">
201
202                 <div id="headlines-toolbar" dojoType="dijit.layout.ContentPane" region="top">
203                 </div>
204
205                 <div id="headlines-frame" dojoType="dijit.layout.ContentPane" region="center">
206                         <div id="headlinesInnerContainer">
207                                 <div class="whiteBox"><?php echo __('Loading, please wait...') ?></div>
208                         </div>
209                 </div>
210
211                 <?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
212                 <div id="content-insert" dojoType="dijit.layout.ContentPane" region="bottom"
213                         style="height : 50%" splitter="true"></div>
214                 <?php } ?>
215
216         </div>
217 </div>
218
219 <div id="footer" dojoType="dijit.layout.ContentPane" region="bottom">
220         <a href="http://tt-rss.org/">Tiny Tiny RSS</a>
221         <?php if (!defined('HIDE_VERSION')) { ?>
222                  v<?php echo VERSION ?> 
223         <?php } ?>
224         &copy; 2005&ndash;<?php echo date('Y') ?> <a href="http://fakecake.org/">Andrew Dolgov</a>
225 </div>
226
227 </div>
228
229 <?php db_close($link); ?>
230
231 </body>
232 </html>