2 if (file_exists("install") && !file_exists("config.php")) {
3 header("Location: install/");
6 set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
9 if (!file_exists("config.php")) {
10 print "<b>Fatal Error</b>: You forgot to copy
11 <b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
15 require_once "autoload.php";
16 require_once "sessions.php";
17 require_once "functions.php";
18 require_once "sanity_check.php";
19 require_once "version.php";
20 require_once "config.php";
21 require_once "db-prefs.php";
23 if (!init_plugins()) return;
27 header('Content-Type: text/html; charset=utf-8');
29 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
30 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
33 <title>Tiny Tiny RSS : <?php echo __("Preferences") ?></title>
35 <?php echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?>
36 <?php echo stylesheet_tag("tt-rss.css"); ?>
37 <?php echo stylesheet_tag("prefs.css"); ?>
39 <?php if ($_SESSION["uid"]) {
40 $theme = get_pref( "USER_CSS_THEME", $_SESSION["uid"], false);
42 echo stylesheet_tag("themes/$theme");
47 <?php print_user_stylesheet() ?>
49 <link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
50 <link rel="icon" type="image/png" sizes="72x72" href="images/favicon-72px.png" />
53 foreach (array("lib/prototype.js",
54 "lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls",
57 "lib/CheckBoxTree.js",
58 "lib/dojo/tt-rss-layer.js",
59 "errors.php?mode=js") as $jsfile) {
61 echo javascript_tag($jsfile);
65 <script type="text/javascript">
67 require 'lib/jshrink/Minifier.php';
71 foreach ($pluginhost->get_plugins() as $n => $p) {
72 if (method_exists($p, "get_prefs_js")) {
73 echo JShrink\Minifier::minify($p->get_prefs_js());
77 print get_minified_js(array("functions", "deprecated", "prefs", "PrefFeedTree", "PrefFilterTree", "PrefLabelTree"));
79 init_js_translations();
83 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
85 <script type="text/javascript">
86 Event.observe(window, 'load', function() {
93 <body id="ttrssPrefs" class="claro">
95 <div id="notify" class="notify" style="display : none"></div>
96 <div id="cmdline" style="display : none"></div>
99 <div id="overlay_inner">
100 <div class="insensitive"><?php echo __("Loading, please wait...") ?></div>
101 <div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar"
102 progress="0" maximum="100">
104 <noscript><br/><?php print_error('Javascript is disabled. Please enable it.') ?></noscript>
108 <div id="header" dojoType="dijit.layout.ContentPane" region="top">
109 <!-- <a href='#' onclick="showHelp()"><?php echo __("Keyboard shortcuts") ?></a> | -->
110 <a href="#" onclick="gotoMain()"><?php echo __('Exit preferences') ?></a>
113 <div id="main" dojoType="dijit.layout.BorderContainer">
115 <div dojoType="dijit.layout.TabContainer" region="center" id="pref-tabs">
116 <div id="genConfigTab" dojoType="dijit.layout.ContentPane"
117 href="backend.php?op=pref-prefs"
118 title="<?php echo __('Preferences') ?>"></div>
119 <div id="feedConfigTab" dojoType="dijit.layout.ContentPane"
120 href="backend.php?op=pref-feeds"
121 title="<?php echo __('Feeds') ?>"></div>
122 <div id="filterConfigTab" dojoType="dijit.layout.ContentPane"
123 href="backend.php?op=pref-filters"
124 title="<?php echo __('Filters') ?>"></div>
125 <div id="labelConfigTab" dojoType="dijit.layout.ContentPane"
126 href="backend.php?op=pref-labels"
127 title="<?php echo __('Labels') ?>"></div>
128 <?php if ($_SESSION["access_level"] >= 10) { ?>
129 <div id="userConfigTab" dojoType="dijit.layout.ContentPane"
130 href="backend.php?op=pref-users"
131 title="<?php echo __('Users') ?>"></div>
132 <div id="systemConfigTab" dojoType="dijit.layout.ContentPane"
133 href="backend.php?op=pref-system"
134 title="<?php echo __('System') ?>"></div>
137 $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TABS,
138 "hook_prefs_tabs", false);
142 <div id="footer" dojoType="dijit.layout.ContentPane" region="bottom">
143 <a class="insensitive" target="_blank" href="http://tt-rss.org/">
145 <?php if (!defined('HIDE_VERSION')) { ?>
146 v<?php echo VERSION ?>
148 © 2005-<?php echo date('Y') ?>
149 <a class="insensitive" target="_blank"
150 href="http://fakecake.org/">Andrew Dolgov</a>
151 </div> <!-- footer -->