]>
Commit | Line | Data |
---|---|---|
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("tt-rss.css"); ?> | |
37 | <?php stylesheet_tag("prefs.css"); ?> | |
38 | ||
39 | <?php if ($_SESSION["uid"]) { | |
40 | $theme = get_pref( "USER_CSS_THEME", $_SESSION["uid"], false); | |
41 | if ($theme) { | |
42 | stylesheet_tag("themes/$theme"); | |
43 | } | |
44 | } | |
45 | ?> | |
46 | ||
47 | <?php print_user_stylesheet() ?> | |
48 | ||
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" /> | |
51 | ||
52 | <?php | |
53 | foreach (array("lib/prototype.js", | |
54 | "lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls", | |
55 | "lib/dojo/dojo.js", | |
56 | "lib/dojo/tt-rss-layer.js", | |
57 | "errors.php?mode=js") as $jsfile) { | |
58 | ||
59 | javascript_tag($jsfile); | |
60 | ||
61 | } ?> | |
62 | ||
63 | <script type="text/javascript"> | |
64 | require({cache:{}}); | |
65 | <?php | |
66 | require 'lib/jshrink/Minifier.php'; | |
67 | ||
68 | foreach (PluginHost::getInstance()->get_plugins() as $n => $p) { | |
69 | if (method_exists($p, "get_prefs_js")) { | |
70 | echo JShrink\Minifier::minify($p->get_prefs_js()); | |
71 | } | |
72 | } | |
73 | ||
74 | print get_minified_js(array("../lib/CheckBoxTree","functions", "deprecated", "prefs", "PrefFeedTree", "PrefFilterTree", "PrefLabelTree")); | |
75 | ||
76 | init_js_translations(); | |
77 | ?> | |
78 | </script> | |
79 | ||
80 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
81 | ||
82 | <script type="text/javascript"> | |
83 | Event.observe(window, 'load', function() { | |
84 | init(); | |
85 | }); | |
86 | </script> | |
87 | ||
88 | </head> | |
89 | ||
90 | <body id="ttrssPrefs" class="claro"> | |
91 | ||
92 | <div id="notify" class="notify" style="display : none"></div> | |
93 | <div id="cmdline" style="display : none"></div> | |
94 | ||
95 | <div id="overlay"> | |
96 | <div id="overlay_inner"> | |
97 | <div class="insensitive"><?php echo __("Loading, please wait...") ?></div> | |
98 | <div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar" | |
99 | progress="0" maximum="100"> | |
100 | </div> | |
101 | <noscript><br/><?php print_error('Javascript is disabled. Please enable it.') ?></noscript> | |
102 | </div> | |
103 | </div> | |
104 | ||
105 | <div id="header" dojoType="dijit.layout.ContentPane" region="top"> | |
106 | <!-- <a href='#' onclick="showHelp()"><?php echo __("Keyboard shortcuts") ?></a> | --> | |
107 | <a href="#" onclick="gotoMain()"><?php echo __('Exit preferences') ?></a> | |
108 | </div> | |
109 | ||
110 | <div id="main" dojoType="dijit.layout.BorderContainer"> | |
111 | ||
112 | <div dojoType="dijit.layout.TabContainer" region="center" id="pref-tabs"> | |
113 | <div id="genConfigTab" dojoType="dijit.layout.ContentPane" | |
114 | href="backend.php?op=pref-prefs" | |
115 | title="<?php echo __('Preferences') ?>"></div> | |
116 | <div id="feedConfigTab" dojoType="dijit.layout.ContentPane" | |
117 | href="backend.php?op=pref-feeds" | |
118 | title="<?php echo __('Feeds') ?>"></div> | |
119 | <div id="filterConfigTab" dojoType="dijit.layout.ContentPane" | |
120 | href="backend.php?op=pref-filters" | |
121 | title="<?php echo __('Filters') ?>"></div> | |
122 | <div id="labelConfigTab" dojoType="dijit.layout.ContentPane" | |
123 | href="backend.php?op=pref-labels" | |
124 | title="<?php echo __('Labels') ?>"></div> | |
125 | <?php if ($_SESSION["access_level"] >= 10) { ?> | |
126 | <div id="userConfigTab" dojoType="dijit.layout.ContentPane" | |
127 | href="backend.php?op=pref-users" | |
128 | title="<?php echo __('Users') ?>"></div> | |
129 | <div id="systemConfigTab" dojoType="dijit.layout.ContentPane" | |
130 | href="backend.php?op=pref-system" | |
131 | title="<?php echo __('System') ?>"></div> | |
132 | <?php } ?> | |
133 | <?php | |
134 | PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TABS, | |
135 | "hook_prefs_tabs", false); | |
136 | ?> | |
137 | </div> | |
138 | ||
139 | <div id="footer" dojoType="dijit.layout.ContentPane" region="bottom"> | |
140 | <a class="insensitive" target="_blank" href="http://tt-rss.org/"> | |
141 | Tiny Tiny RSS</a> | |
142 | <?php if (!defined('HIDE_VERSION')) { ?> | |
143 | v<?php echo VERSION ?> | |
144 | <?php } ?> | |
145 | © 2005-<?php echo date('Y') ?> | |
146 | <a class="insensitive" target="_blank" | |
147 | href="http://fakecake.org/">Andrew Dolgov</a> | |
148 | </div> <!-- footer --> | |
149 | ||
150 | </div> | |
151 | ||
152 | </body> | |
153 | </html> |