]>
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 "sessions.php"; | |
16 | require_once "functions.php"; | |
17 | require_once "sanity_check.php"; | |
18 | require_once "version.php"; | |
19 | require_once "config.php"; | |
20 | require_once "db-prefs.php"; | |
21 | ||
22 | $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); | |
23 | ||
24 | if (!init_connection($link)) return; | |
25 | ||
26 | login_sequence($link); | |
27 | ||
28 | no_cache_incantation(); | |
29 | ||
30 | header('Content-Type: text/html; charset=utf-8'); | |
31 | ?> | |
32 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
33 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
34 | <html> | |
35 | <head> | |
36 | <title>Tiny Tiny RSS : <?php echo __("Preferences") ?></title> | |
37 | ||
38 | <?php echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?> | |
39 | <?php echo stylesheet_tag("tt-rss.css"); ?> | |
40 | <?php echo stylesheet_tag("prefs.css"); ?> | |
41 | ||
42 | <?php print_user_stylesheet($link) ?> | |
43 | ||
44 | <link rel="shortcut icon" type="image/png" href="images/favicon.png"/> | |
45 | <link rel="icon" type="image/png" sizes="72x72" href="images/favicon-72px.png" /> | |
46 | ||
47 | <?php | |
48 | foreach (array("lib/prototype.js", | |
49 | "lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls", | |
50 | "lib/dojo/dojo.js", | |
51 | "lib/dijit/dijit.js", | |
52 | "lib/dojo/tt-rss-layer.js", | |
53 | "errors.php?mode=js") as $jsfile) { | |
54 | ||
55 | echo javascript_tag($jsfile); | |
56 | ||
57 | } ?> | |
58 | ||
59 | <script type="text/javascript"> | |
60 | <?php | |
61 | require 'lib/jshrink/Minifier.php'; | |
62 | ||
63 | global $pluginhost; | |
64 | ||
65 | foreach ($pluginhost->get_plugins() as $n => $p) { | |
66 | if (method_exists($p, "get_prefs_js")) { | |
67 | echo JShrink\Minifier::minify($p->get_prefs_js()); | |
68 | } | |
69 | } | |
70 | ||
71 | print get_minified_js(array("functions", "deprecated", "prefs")); | |
72 | ||
73 | init_js_translations(); | |
74 | ?> | |
75 | </script> | |
76 | ||
77 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
78 | ||
79 | <script type="text/javascript"> | |
80 | Event.observe(window, 'load', function() { | |
81 | init(); | |
82 | }); | |
83 | </script> | |
84 | ||
85 | </head> | |
86 | ||
87 | <body id="ttrssPrefs" class="claro"> | |
88 | ||
89 | <div id="notify" class="notify"><span id="notify_body"> </span></div> | |
90 | <div id="cmdline" style="display : none"></div> | |
91 | ||
92 | <div id="overlay"> | |
93 | <div id="overlay_inner"> | |
94 | <div class="insensitive"><?php echo __("Loading, please wait...") ?></div> | |
95 | <div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar" | |
96 | progress="0" maximum="100"> | |
97 | </div> | |
98 | <noscript><br/><?php print_error('Javascript is disabled. Please enable it.') ?></noscript> | |
99 | </div> | |
100 | </div> | |
101 | ||
102 | <img id="piggie" src="images/piggie.png" style="display : none" alt="piggie"/> | |
103 | ||
104 | <div id="header" dojoType="dijit.layout.ContentPane" region="top"> | |
105 | <!-- <a href='#' onclick="showHelp()"><?php echo __("Keyboard shortcuts") ?></a> | --> | |
106 | <a href="#" onclick="gotoMain()"><?php echo __('Exit preferences') ?></a> | |
107 | </div> | |
108 | ||
109 | <div id="main" dojoType="dijit.layout.BorderContainer"> | |
110 | ||
111 | <div dojoType="dijit.layout.TabContainer" region="center" id="pref-tabs"> | |
112 | <div id="genConfigTab" dojoType="dijit.layout.ContentPane" | |
113 | href="backend.php?op=pref-prefs" | |
114 | title="<?php echo __('Preferences') ?>"></div> | |
115 | <div id="feedConfigTab" dojoType="dijit.layout.ContentPane" | |
116 | href="backend.php?op=pref-feeds" | |
117 | title="<?php echo __('Feeds') ?>"></div> | |
118 | <div id="filterConfigTab" dojoType="dijit.layout.ContentPane" | |
119 | href="backend.php?op=pref-filters" | |
120 | title="<?php echo __('Filters') ?>"></div> | |
121 | <div id="labelConfigTab" dojoType="dijit.layout.ContentPane" | |
122 | href="backend.php?op=pref-labels" | |
123 | title="<?php echo __('Labels') ?>"></div> | |
124 | <?php if ($_SESSION["access_level"] >= 10) { ?> | |
125 | <div id="userConfigTab" dojoType="dijit.layout.ContentPane" | |
126 | href="backend.php?op=pref-users" | |
127 | title="<?php echo __('Users') ?>"></div> | |
128 | <?php } ?> | |
129 | <?php | |
130 | $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TABS, | |
131 | "hook_prefs_tabs", false); | |
132 | ?> | |
133 | </div> | |
134 | ||
135 | <div id="footer" dojoType="dijit.layout.ContentPane" region="bottom"> | |
136 | <a class="insensitive" target="_blank" href="http://tt-rss.org/"> | |
137 | Tiny Tiny RSS</a> © 2005-<?php echo date('Y') ?> | |
138 | <a class="insensitive" target="_blank" | |
139 | href="http://fakecake.org/">Andrew Dolgov</a> | |
140 | </div> <!-- footer --> | |
141 | ||
142 | </div> | |
143 | ||
144 | <?php db_close($link); ?> | |
145 | ||
146 | </body> | |
147 | </html> |