2 if (!file_exists("config.php")) {
3 print "<b>Fatal Error</b>: You forgot to copy
4 <b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
8 // we need a separate check here because functions.php might get parsed
9 // incorrectly before 5.3 because of :: syntax.
10 if (version_compare(PHP_VERSION
, '5.3.0', '<')) {
11 print "<b>Fatal Error</b>: PHP version 5.3.0 or newer required.\n";
15 set_include_path(dirname(__FILE__
) ."/include" . PATH_SEPARATOR
.
18 require_once "sessions.php";
19 require_once "functions.php";
20 require_once "sanity_check.php";
21 require_once "version.php";
22 require_once "config.php";
23 require_once "db-prefs.php";
24 require_once "lib/Mobile_Detect.php";
26 $mobile = new Mobile_Detect();
28 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
30 if (!init_connection($link)) return;
34 if (!$_REQUEST['mobile']) {
35 if ($mobile->isTablet() && $pluginhost->get_plugin("digest")) {
36 header('Location: backend.php?op=digest');
38 } else if ($mobile->isMobile()) {
39 header('Location: mobile/index.php');
45 login_sequence($link);
47 no_cache_incantation();
49 header('Content-Type: text/html; charset=utf-8');
52 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
53 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
56 <title
><?php
echo get_site_title() ?
></title
>
58 <?php
echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?
>
59 <?php
echo stylesheet_tag("tt-rss.css"); ?
>
60 <?php
echo stylesheet_tag("cdm.css"); ?
>
62 <?php
print_user_stylesheet($link) ?
>
64 <style type
="text/css">
66 foreach ($pluginhost->get_plugins() as $n => $p) {
67 if (method_exists($p, "get_css")) {
74 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png"/>
75 <link rel
="icon" type
="image/png" sizes
="72x72" href
="images/favicon-72px.png" />
78 foreach (array("lib/prototype.js",
79 "lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls",
82 "lib/dojo/tt-rss-layer.js",
84 "errors.php?mode=js") as $jsfile) {
86 echo javascript_tag($jsfile);
90 <script type
="text/javascript">
92 require 'lib/jshrink/Minifier.php';
96 foreach ($pluginhost->get_plugins() as $n => $p) {
97 if (method_exists($p, "get_js")) {
98 echo JShrink\Minifier
::minify($p->get_js());
102 print get_minified_js(array("tt-rss",
103 "functions", "feedlist", "viewfeed", "FeedTree"));
108 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8"/>
110 <script type
="text/javascript">
111 Event
.observe(window
, 'load', function() {
117 <body id
="ttrssMain" class="claro">
119 <div id
="overlay" style
="display : block">
120 <div id
="overlay_inner">
121 <div
class="insensitive"><?php
echo __("Loading, please wait...") ?
></div
>
122 <div dojoType
="dijit.ProgressBar" places
="0" style
="width : 300px" id
="loading_bar"
123 progress
="0" maximum
="100">
125 <noscript
><br
/><?php
print_error('Javascript is disabled. Please enable it.') ?
></noscript
>
130 <img id
="net-alert" style
="display : none"
131 title
="<?php echo __("Communication problem with server
.") ?>"
132 src
="images/alert.png"/>
134 <img id
="newVersionIcon" style
="display:none" onclick
="newVersionDlg()"
135 width
="13" height
="13"
136 src
="images/new_version.png"
137 title
="<?php echo __('New version of Tiny Tiny RSS is available!') ?>"
138 alt
="new_version_icon"/>
141 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
142 <div id
="cmdline" style
="display : none"></div
>
143 <div id
="auxDlg" style
="display : none"></div
>
144 <div id
="headlines-tmp" style
="display : none"></div
>
146 <div id
="main" dojoType
="dijit.layout.BorderContainer">
148 <div id
="feeds-holder" dojoType
="dijit.layout.ContentPane" region
="leading" style
="width : 20%" splitter
="true">
149 <div id
="feedlistLoading">
150 <img src
='images/indicator_tiny.gif'/>
151 <?php
echo __("Loading, please wait..."); ?
></div
>
152 <div id
="feedTree"></div
>
155 <div dojoType
="dijit.layout.BorderContainer" region
="center" id
="header-wrap" gutters
="false">
156 <div dojoType
="dijit.layout.BorderContainer" region
="center" id
="content-wrap">
158 <div id
="toolbar" dojoType
="dijit.layout.ContentPane" region
="top">
159 <div id
="main-toolbar" dojoType
="dijit.Toolbar">
161 <form id
="main_toolbar_form" action
="" onsubmit
='return false'>
163 <button dojoType
="dijit.form.Button" id
="collapse_feeds_btn"
164 onclick
="collapse_feedlist()"
165 title
="<?php echo __('Collapse feedlist') ?>" style
="display : inline">
168 <select name
="view_mode" title
="<?php echo __('Show articles') ?>"
169 onchange
="viewModeChanged()"
170 dojoType
="dijit.form.Select">
171 <option selected
="selected" value
="adaptive"><?php
echo __('Adaptive') ?
></option
>
172 <option value
="all_articles"><?php
echo __('All Articles') ?
></option
>
173 <option value
="marked"><?php
echo __('Starred') ?
></option
>
174 <option value
="published"><?php
echo __('Published') ?
></option
>
175 <option value
="unread"><?php
echo __('Unread') ?
></option
>
176 <!-- <option value
="noscores"><?php
echo __('Ignore Scoring') ?
></option
> -->
177 <option value
="updated"><?php
echo __('Updated') ?
></option
>
180 <select title
="<?php echo __('Sort articles') ?>"
181 onchange
="viewModeChanged()"
182 dojoType
="dijit.form.Select" name
="order_by">
183 <option selected
="selected" value
="default"><?php
echo __('Default') ?
></option
>
184 <option value
="date"><?php
echo __('Date') ?
></option
>
185 <option value
="title"><?php
echo __('Title') ?
></option
>
186 <option value
="score"><?php
echo __('Score') ?
></option
>
190 <button dojoType
="dijit.form.Button" name
="update" style
="display : none"
191 onclick
="viewCurrentFeed()">
192 <?php
echo __('Update') ?
></button
>
194 <button dojoType
="dijit.form.Button"
195 onclick
="catchupCurrentFeed()">
196 <?php
echo __('Mark as read') ?
></button
>
200 <div
class="actionChooser">
202 <button id
="net-alert" dojoType
="dijit.form.Button" style
="display : none" disabled
="true"
203 title
="<?php echo __("Communication problem with server
.") ?>">
205 src
="images/alert.png" />
208 <button id
="newVersionIcon" dojoType
="dijit.form.Button" style
="display : none">
209 <img onclick
="newVersionDlg()"
210 src
="images/new_version.png"
211 title
="<?php echo __('New version of Tiny Tiny RSS is available!') ?>" />
215 <div dojoType
="dijit.form.DropDownButton">
216 <span
><?php
echo __('Actions...') ?
></span
>
217 <div dojoType
="dijit.Menu" style
="display: none">
218 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcPrefs')"><?php
echo __('Preferences...') ?
></div
>
219 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcSearch')"><?php
echo __('Search...') ?
></div
>
220 <div dojoType
="dijit.MenuItem" disabled
="1"><?php
echo __('Feed actions:') ?
></div
>
221 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcAddFeed')"><?php
echo __('Subscribe to feed...') ?
></div
>
222 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcEditFeed')"><?php
echo __('Edit this feed...') ?
></div
>
223 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcRescoreFeed')"><?php
echo __('Rescore feed') ?
></div
>
224 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcRemoveFeed')"><?php
echo __('Unsubscribe') ?
></div
>
225 <div dojoType
="dijit.MenuItem" disabled
="1"><?php
echo __('All feeds:') ?
></div
>
226 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcCatchupAll')"><?php
echo __('Mark as read') ?
></div
>
227 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcShowOnlyUnread')"><?php
echo __('(Un)hide read feeds') ?
></div
>
228 <div dojoType
="dijit.MenuItem" disabled
="1"><?php
echo __('Other actions:') ?
></div
>
229 <?php
if ($pluginhost->get_plugin("digest")) { ?
>
230 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcDigest')"><?php
echo __('Switch to digest...') ?
></div
>
232 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcTagCloud')"><?php
echo __('Show tag cloud...') ?
></div
>
233 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
234 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcToggleWidescreen')"><?php
echo __('Toggle widescreen mode') ?
></div
>
236 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcTagSelect')"><?php
echo __('Select by tags...') ?
></div
>
237 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcAddLabel')"><?php
echo __('Create label...') ?
></div
>
238 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcAddFilter')"><?php
echo __('Create filter...') ?
></div
>
239 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcHKhelp')"><?php
echo __('Keyboard shortcuts help') ?
></div
>
240 <?php
if (!$_SESSION["hide_logout"]) { ?
>
241 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcLogout')"><?php
echo __('Logout') ?
></div
>
246 </div
> <!-- toolbar
-->
247 </div
> <!-- toolbar pane
-->
249 <div id
="headlines-wrap-inner" dojoType
="dijit.layout.BorderContainer" region
="center">
251 <div id
="headlines-toolbar" dojoType
="dijit.layout.ContentPane" region
="top">
254 <div id
="headlines-frame" dojoType
="dijit.layout.ContentPane"
255 onscroll
="headlines_scroll_handler(this)" region
="center">
256 <div id
="headlinesInnerContainer">
257 <div
class="whiteBox"><?php
echo __('Loading, please wait...') ?
></div
>
261 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
262 <div id
="content-insert" dojoType
="dijit.layout.ContentPane" region
="bottom"
263 style
="height : 50%" splitter
="true"></div
>
271 <?php
db_close($link); ?
>