2 if (file_exists("install") && !file_exists("config.php")) {
3 header("Location: install/");
6 if (!file_exists("config.php")) {
7 print "<b>Fatal Error</b>: You forgot to copy
8 <b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
12 // we need a separate check here because functions.php might get parsed
13 // incorrectly before 5.3 because of :: syntax.
14 if (version_compare(PHP_VERSION
, '5.3.0', '<')) {
15 print "<b>Fatal Error</b>: PHP version 5.3.0 or newer required.\n";
19 set_include_path(dirname(__FILE__
) ."/include" . PATH_SEPARATOR
.
22 require_once "sessions.php";
23 require_once "functions.php";
24 require_once "sanity_check.php";
25 require_once "version.php";
26 require_once "config.php";
27 require_once "db-prefs.php";
28 require_once "lib/Mobile_Detect.php";
30 $mobile = new Mobile_Detect();
32 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
34 if (!init_connection($link)) return;
38 if (!$_REQUEST['mobile']) {
39 if ($mobile->isTablet() && $pluginhost->get_plugin("digest")) {
40 header('Location: backend.php?op=digest');
42 } else if ($mobile->isMobile() && $pluginhost->get_plugin("mobile")) {
43 header('Location: backend.php?op=mobile');
45 } else if ($mobile->isMobile() && $pluginhost->get_plugin("digest")) {
46 header('Location: backend.php?op=digest');
51 login_sequence($link);
53 no_cache_incantation();
55 header('Content-Type: text/html; charset=utf-8');
58 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
59 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
62 <title
>Tiny Tiny RSS
</title
>
64 <?php
echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?
>
65 <?php
echo stylesheet_tag("tt-rss.css"); ?
>
66 <?php
echo stylesheet_tag("cdm.css"); ?
>
68 <?php
print_user_stylesheet($link) ?
>
70 <style type
="text/css">
72 foreach ($pluginhost->get_plugins() as $n => $p) {
73 if (method_exists($p, "get_css")) {
80 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png"/>
81 <link rel
="icon" type
="image/png" sizes
="72x72" href
="images/favicon-72px.png" />
84 foreach (array("lib/prototype.js",
85 "lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls",
88 "lib/dojo/tt-rss-layer.js",
89 "errors.php?mode=js") as $jsfile) {
91 echo javascript_tag($jsfile);
95 <script type
="text/javascript">
97 require 'lib/jshrink/Minifier.php';
101 foreach ($pluginhost->get_plugins() as $n => $p) {
102 if (method_exists($p, "get_js")) {
103 echo JShrink\Minifier
::minify($p->get_js());
107 print get_minified_js(array("tt-rss",
108 "functions", "feedlist", "viewfeed", "FeedTree"));
110 init_js_translations();
114 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8"/>
116 <script type
="text/javascript">
117 Event
.observe(window
, 'load', function() {
123 <body id
="ttrssMain" class="claro">
125 <div id
="overlay" style
="display : block">
126 <div id
="overlay_inner">
127 <div
class="insensitive"><?php
echo __("Loading, please wait...") ?
></div
>
128 <div dojoType
="dijit.ProgressBar" places
="0" style
="width : 300px" id
="loading_bar"
129 progress
="0" maximum
="100">
131 <noscript
><br
/><?php
print_error('Javascript is disabled. Please enable it.') ?
></noscript
>
135 <div style
="display : none" onclick
="Element.hide(this)" id
="small_article_preview"></div
>
137 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
138 <div id
="cmdline" style
="display : none"></div
>
139 <div id
="auxDlg" style
="display : none"></div
>
140 <div id
="headlines-tmp" style
="display : none"></div
>
142 <div id
="main" dojoType
="dijit.layout.BorderContainer">
144 <div id
="feeds-holder" dojoType
="dijit.layout.ContentPane" region
="leading" style
="width : 20%" splitter
="true">
145 <div id
="feedlistLoading">
146 <img src
='images/indicator_tiny.gif'/>
147 <?php
echo __("Loading, please wait..."); ?
></div
>
148 <div id
="feedTree"></div
>
151 <div dojoType
="dijit.layout.BorderContainer" region
="center" id
="header-wrap" gutters
="false">
152 <div dojoType
="dijit.layout.BorderContainer" region
="center" id
="content-wrap">
154 <div id
="toolbar" dojoType
="dijit.layout.ContentPane" region
="top">
155 <div id
="main-toolbar" dojoType
="dijit.Toolbar">
157 <form id
="main_toolbar_form" action
="" onsubmit
='return false'>
159 <button dojoType
="dijit.form.Button" id
="collapse_feeds_btn"
160 onclick
="collapse_feedlist()"
161 title
="<?php echo __('Collapse feedlist') ?>" style
="display : inline">
164 <select name
="view_mode" title
="<?php echo __('Show articles') ?>"
165 onchange
="viewModeChanged()"
166 dojoType
="dijit.form.Select">
167 <option selected
="selected" value
="adaptive"><?php
echo __('Adaptive') ?
></option
>
168 <option value
="all_articles"><?php
echo __('All Articles') ?
></option
>
169 <option value
="marked"><?php
echo __('Starred') ?
></option
>
170 <option value
="published"><?php
echo __('Published') ?
></option
>
171 <option value
="unread"><?php
echo __('Unread') ?
></option
>
172 <option value
="unread_first"><?php
echo __('Unread First') ?
></option
>
173 <option value
="has_note"><?php
echo __('With Note') ?
></option
>
174 <!-- <option value
="noscores"><?php
echo __('Ignore Scoring') ?
></option
> -->
177 <select title
="<?php echo __('Sort articles') ?>"
178 onchange
="viewModeChanged()"
179 dojoType
="dijit.form.Select" name
="order_by">
180 <option selected
="selected" value
="default"><?php
echo __('Default') ?
></option
>
181 <option value
="date"><?php
echo __('Date') ?
></option
>
182 <option value
="title"><?php
echo __('Title') ?
></option
>
183 <option value
="score"><?php
echo __('Score') ?
></option
>
187 <button dojoType
="dijit.form.Button" name
="update" style
="display : none"
188 onclick
="viewCurrentFeed()">
189 <?php
echo __('Update') ?
></button
>
191 <button dojoType
="dijit.form.Button"
192 onclick
="catchupCurrentFeed()">
193 <?php
echo __('Mark as read') ?
></button
>
197 <div
class="actionChooser">
199 <button id
="net-alert" dojoType
="dijit.form.Button" style
="display : none" disabled
="true"
200 title
="<?php echo __("Communication problem with server
.") ?>">
202 src
="images/alert.png" />
205 <button id
="newVersionIcon" dojoType
="dijit.form.Button" style
="display : none">
206 <img onclick
="newVersionDlg()"
207 src
="images/new_version.png"
208 title
="<?php echo __('New version of Tiny Tiny RSS is available!') ?>" />
212 <div dojoType
="dijit.form.DropDownButton">
213 <span
><?php
echo __('Actions...') ?
></span
>
214 <div dojoType
="dijit.Menu" style
="display: none">
215 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcPrefs')"><?php
echo __('Preferences...') ?
></div
>
216 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcSearch')"><?php
echo __('Search...') ?
></div
>
217 <div dojoType
="dijit.MenuItem" disabled
="1"><?php
echo __('Feed actions:') ?
></div
>
218 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcAddFeed')"><?php
echo __('Subscribe to feed...') ?
></div
>
219 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcEditFeed')"><?php
echo __('Edit this feed...') ?
></div
>
220 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcRescoreFeed')"><?php
echo __('Rescore feed') ?
></div
>
221 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcRemoveFeed')"><?php
echo __('Unsubscribe') ?
></div
>
222 <div dojoType
="dijit.MenuItem" disabled
="1"><?php
echo __('All feeds:') ?
></div
>
223 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcCatchupAll')"><?php
echo __('Mark as read') ?
></div
>
224 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcShowOnlyUnread')"><?php
echo __('(Un)hide read feeds') ?
></div
>
225 <div dojoType
="dijit.MenuItem" disabled
="1"><?php
echo __('Other actions:') ?
></div
>
226 <?php
if ($pluginhost->get_plugin("digest")) { ?
>
227 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcDigest')"><?php
echo __('Switch to digest...') ?
></div
>
229 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcTagCloud')"><?php
echo __('Show tag cloud...') ?
></div
>
230 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
231 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcToggleWidescreen')"><?php
echo __('Toggle widescreen mode') ?
></div
>
233 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcTagSelect')"><?php
echo __('Select by tags...') ?
></div
>
234 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcAddLabel')"><?php
echo __('Create label...') ?
></div
>
235 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcAddFilter')"><?php
echo __('Create filter...') ?
></div
>
236 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcHKhelp')"><?php
echo __('Keyboard shortcuts help') ?
></div
>
237 <?php
if (!$_SESSION["hide_logout"]) { ?
>
238 <div dojoType
="dijit.MenuItem" onclick
="quickMenuGo('qmcLogout')"><?php
echo __('Logout') ?
></div
>
243 </div
> <!-- toolbar
-->
244 </div
> <!-- toolbar pane
-->
246 <div id
="headlines-wrap-inner" dojoType
="dijit.layout.BorderContainer" region
="center">
248 <div id
="headlines-toolbar" dojoType
="dijit.layout.ContentPane" region
="top">
251 <div id
="headlines-frame" dojoType
="dijit.layout.ContentPane"
252 onscroll
="headlines_scroll_handler(this)" region
="center">
253 <div id
="headlinesInnerContainer">
254 <div
class="whiteBox"><?php
echo __('Loading, please wait...') ?
></div
>
258 <?php
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?
>
259 <div id
="content-insert" dojoType
="dijit.layout.ContentPane" region
="bottom"
260 style
="height : 50%" splitter
="true"></div
>
268 <?php
db_close($link); ?
>