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