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 set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
11 require_once "sessions.php";
12 require_once "functions.php";
13 require_once "sanity_check.php";
14 require_once "version.php";
15 require_once "config.php";
16 require_once "db-prefs.php";
17 require_once "lib/Mobile_Detect.php";
19 $mobile = new Mobile_Detect();
21 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
23 if (!init_connection($link)) return;
27 if (!$_REQUEST['mobile']) {
28 if ($mobile->isTablet() && $pluginhost->get_plugin("digest")) {
29 header('Location: backend.php?op=digest');
31 } else if ($mobile->isMobile()) {
32 header('Location: mobile/index.php');
38 login_sequence($link);
42 no_cache_incantation();
44 header('Content-Type: text/html; charset=utf-8');
47 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
48 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
51 <title>Tiny Tiny RSS</title>
52 <link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
53 <link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"/>
54 <link rel="stylesheet" type="text/css" href="cdm.css?<?php echo $dt_add ?>"/>
56 <?php print_user_stylesheet($link) ?>
58 <script type="text/javascript">
61 <link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
63 <script type="text/javascript" src="lib/prototype.js"></script>
64 <script type="text/javascript" src="lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script>
65 <script type="text/javascript" src="lib/dojo/dojo.js"></script>
66 <script type="text/javascript" src="lib/dijit/dijit.js"></script>
67 <script type="text/javascript" src="lib/dojo/tt-rss-layer.js"></script>
69 <script type="text/javascript" charset="utf-8" src="localized_js.php?<?php echo $dt_add ?>"></script>
70 <script type="text/javascript" charset="utf-8" src="errors.php?mode=js"></script>
72 <script type="text/javascript">
74 require 'lib/jsmin.php';
78 foreach ($pluginhost->get_plugins() as $n => $p) {
79 if (method_exists($p, "get_js")) {
80 echo JSMin::minify($p->get_js());
84 foreach (array("tt-rss", "functions", "feedlist", "viewfeed", "FeedTree") as $js) {
85 if (!isset($_GET['debug'])) {
86 echo JSMin::minify(file_get_contents("js/$js.js"));
88 echo file_get_contents("js/$js.js");
94 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
96 <script type="text/javascript">
97 Event.observe(window, 'load', function() {
103 <body id="ttrssMain" class="claro">
105 <div id="overlay" style="display : block">
106 <div id="overlay_inner">
107 <div class="insensitive"><?php echo __("Loading, please wait...") ?></div>
108 <div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar"
109 progress="0" maximum="100">
111 <noscript><br/><?php print_error('Javascript is disabled. Please enable it.') ?></noscript>
116 <img id="net-alert" style="display : none"
117 title="<?php echo __("Communication problem with server.") ?>"
118 src="<?php echo theme_image($link, 'images/alert.png') ?>"/>
120 <?php if (!$_SESSION["hide_hello"]) { ?>
121 <?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
123 <a href="prefs.php"><?php echo __('Preferences') ?></a>
125 <?php if (defined('FEEDBACK_URL') && FEEDBACK_URL) { ?>
126 | <a target="_blank" class="feedback" href="<?php echo FEEDBACK_URL ?>">
127 <?php echo __('Comments?') ?></a>
130 <?php if (!$_SESSION["hide_logout"]) { ?>
131 | <a href="backend.php?op=logout"><?php echo __('Logout') ?></a>
134 <img id="newVersionIcon" style="display:none" onclick="newVersionDlg()"
135 width="13" height="13"
136 src="<?php echo theme_image($link, '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.TabContainer" region="center" id="content-tabs">
157 <div dojoType="dijit.layout.BorderContainer" region="center" id="content-wrap"
158 title="<?php echo __("News") ?>">
160 <div id="toolbar" dojoType="dijit.layout.ContentPane" region="top">
161 <div id="main-toolbar" dojoType="dijit.Toolbar">
163 <form id="main_toolbar_form" action="" onsubmit='return false'>
165 <button dojoType="dijit.form.Button" id="collapse_feeds_btn"
166 onclick="collapse_feedlist()"
167 title="<?php echo __('Collapse feedlist') ?>" style="display : inline">
170 <select name="view_mode" title="<?php echo __('Show articles') ?>"
171 onchange="viewModeChanged()"
172 dojoType="dijit.form.Select">
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>
182 <select title="<?php echo __('Sort articles') ?>"
183 onchange="viewModeChanged()"
184 dojoType="dijit.form.Select" name="order_by">
185 <option selected="selected" value="default"><?php echo __('Default') ?></option>
186 <option value="date"><?php echo __('Date') ?></option>
187 <option value="title"><?php echo __('Title') ?></option>
188 <option value="score"><?php echo __('Score') ?></option>
191 <button dojoType="dijit.form.Button" name="update"
192 onclick="viewCurrentFeed()">
193 <?php echo __('Update') ?></button>
195 <button dojoType="dijit.form.Button"
196 onclick="catchupCurrentFeed()">
197 <?php echo __('Mark as read') ?></button>
201 <div class="actionChooser">
202 <div dojoType="dijit.form.DropDownButton">
203 <span><?php echo __('Actions...') ?></span>
204 <div dojoType="dijit.Menu" style="display: none">
205 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcSearch')"><?php echo __('Search...') ?></div>
206 <div dojoType="dijit.MenuItem" disabled="1"><?php echo __('Feed actions:') ?></div>
207 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddFeed')"><?php echo __('Subscribe to feed...') ?></div>
208 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcEditFeed')"><?php echo __('Edit this feed...') ?></div>
209 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcRescoreFeed')"><?php echo __('Rescore feed') ?></div>
210 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcRemoveFeed')"><?php echo __('Unsubscribe') ?></div>
211 <div dojoType="dijit.MenuItem" disabled="1"><?php echo __('All feeds:') ?></div>
212 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcCatchupAll')"><?php echo __('Mark as read') ?></div>
213 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcShowOnlyUnread')"><?php echo __('(Un)hide read feeds') ?></div>
214 <div dojoType="dijit.MenuItem" disabled="1"><?php echo __('Other actions:') ?></div>
215 <?php if ($pluginhost->get_plugin("digest")) { ?>
216 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcDigest')"><?php echo __('Switch to digest...') ?></div>
218 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcTagCloud')"><?php echo __('Show tag cloud...') ?></div>
219 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcToggleWidescreen')"><?php echo __('Toggle widescreen mode') ?></div>
221 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcTagSelect')"><?php echo __('Select by tags...') ?></div>
222 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddLabel')"><?php echo __('Create label...') ?></div>
223 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddFilter')"><?php echo __('Create filter...') ?></div>
224 <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcHKhelp')"><?php echo __('Keyboard shortcuts help') ?></div>
228 </div> <!-- toolbar -->
229 </div> <!-- toolbar pane -->
231 <div id="headlines-wrap-inner" dojoType="dijit.layout.BorderContainer" region="center">
233 <div id="headlines-toolbar" dojoType="dijit.layout.ContentPane" region="top">
236 <div id="headlines-frame" dojoType="dijit.layout.ContentPane"
237 onscroll="headlines_scroll_handler(this)" region="center">
238 <div id="headlinesInnerContainer">
239 <div class="whiteBox"><?php echo __('Loading, please wait...') ?></div>
243 <?php if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
244 <div id="content-insert" dojoType="dijit.layout.ContentPane" region="bottom"
245 style="height : 50%" splitter="true"></div>
254 <?php db_close($link); ?>