]> git.wh0rd.org Git - tt-rss.git/blob - prefs.php
atom-to-html: remove horribly scaled feed icon (refs #754)
[tt-rss.git] / prefs.php
1 <?php
2         if (file_exists("install") && !file_exists("config.php")) {
3                 header("Location: install/");
4         }
5
6         set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
7                 get_include_path());
8
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";
12                 exit;
13         }
14
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";
22
23         if (!init_plugins()) return;
24
25         login_sequence();
26
27         header('Content-Type: text/html; charset=utf-8');
28 ?>
29 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
30         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
31 <html>
32 <head>
33         <title>Tiny Tiny RSS : <?php echo __("Preferences") ?></title>
34
35         <?php stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?>
36         <?php stylesheet_tag("css/layout.css"); ?>
37
38         <?php if ($_SESSION["uid"]) {
39                 $theme = get_pref( "USER_CSS_THEME", $_SESSION["uid"], false);
40                 if ($theme && file_exists("themes/$theme")) {
41                         stylesheet_tag("themes/$theme");
42                 } else {
43                         stylesheet_tag("themes/default.css");
44                 }
45         }
46         ?>
47
48         <?php print_user_stylesheet() ?>
49
50         <link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
51         <link rel="icon" type="image/png" sizes="72x72" href="images/favicon-72px.png" />
52
53         <?php
54         foreach (array("lib/prototype.js",
55                                 "lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls",
56                                 "lib/dojo/dojo.js",
57                                 "lib/dojo/tt-rss-layer.js",
58                                 "errors.php?mode=js") as $jsfile) {
59
60                 javascript_tag($jsfile);
61
62         } ?>
63
64         <script type="text/javascript">
65                 require({cache:{}});
66         <?php
67                 require 'lib/jshrink/Minifier.php';
68
69                 foreach (PluginHost::getInstance()->get_plugins() as $n => $p) {
70                         if (method_exists($p, "get_prefs_js")) {
71                                 echo JShrink\Minifier::minify($p->get_prefs_js());
72                         }
73                 }
74
75                 print get_minified_js(array("../lib/CheckBoxTree","functions", "deprecated", "prefs", "PrefFeedTree", "PrefFilterTree", "PrefLabelTree"));
76
77                 init_js_translations();
78         ?>
79         </script>
80
81         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
82
83         <script type="text/javascript">
84                 Event.observe(window, 'load', function() {
85                         init();
86                 });
87         </script>
88
89 </head>
90
91 <body id="ttrssPrefs" class="claro">
92
93 <div id="notify" class="notify" style="display : none"></div>
94 <div id="cmdline" style="display : none"></div>
95
96 <div id="overlay">
97         <div id="overlay_inner">
98                 <div class="insensitive"><?php echo __("Loading, please wait...") ?></div>
99                 <div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar"
100              progress="0" maximum="100">
101                 </div>
102                 <noscript><br/><?php print_error('Javascript is disabled. Please enable it.') ?></noscript>
103         </div>
104 </div>
105
106 <div id="header" dojoType="dijit.layout.ContentPane" region="top">
107         <!-- <a href='#' onclick="showHelp()"><?php echo __("Keyboard shortcuts") ?></a> | -->
108         <a href="#" onclick="gotoMain()"><?php echo __('Exit preferences') ?></a>
109 </div>
110
111 <div id="main" dojoType="dijit.layout.BorderContainer">
112
113 <div dojoType="dijit.layout.TabContainer" region="center" id="pref-tabs">
114 <div id="genConfigTab" dojoType="dijit.layout.ContentPane"
115         href="backend.php?op=pref-prefs"
116         title="<?php echo __('Preferences') ?>"></div>
117 <div id="feedConfigTab" dojoType="dijit.layout.ContentPane"
118         href="backend.php?op=pref-feeds"
119         title="<?php echo __('Feeds') ?>"></div>
120 <div id="filterConfigTab" dojoType="dijit.layout.ContentPane"
121         href="backend.php?op=pref-filters"
122         title="<?php echo __('Filters') ?>"></div>
123 <div id="labelConfigTab" dojoType="dijit.layout.ContentPane"
124         href="backend.php?op=pref-labels"
125         title="<?php echo __('Labels') ?>"></div>
126 <?php if ($_SESSION["access_level"] >= 10) { ?>
127         <div id="userConfigTab" dojoType="dijit.layout.ContentPane"
128                 href="backend.php?op=pref-users"
129                 title="<?php echo __('Users') ?>"></div>
130         <div id="systemConfigTab" dojoType="dijit.layout.ContentPane"
131                 href="backend.php?op=pref-system"
132                 title="<?php echo __('System') ?>"></div>
133 <?php } ?>
134 <?php
135         PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TABS,
136                 "hook_prefs_tabs", false);
137 ?>
138 </div>
139
140 <div id="footer" dojoType="dijit.layout.ContentPane" region="bottom">
141         <a class="insensitive" target="_blank" href="http://tt-rss.org/">
142         Tiny Tiny RSS</a>
143         <?php if (!defined('HIDE_VERSION')) { ?>
144                  v<?php echo VERSION ?>
145         <?php } ?>
146         &copy; 2005-<?php echo date('Y') ?>
147         <a class="insensitive" target="_blank"
148         href="http://fakecake.org/">Andrew Dolgov</a>
149 </div> <!-- footer -->
150
151 </div>
152
153 </body>
154 </html>