]>
Commit | Line | Data |
---|---|---|
1d3a17c7 | 1 | <?php |
d0c6dd29 AD |
2 | if (file_exists("install") && !file_exists("config.php")) { |
3 | header("Location: install/"); | |
4 | } | |
5 | ||
88e8fb3a AD |
6 | set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR . |
7 | get_include_path()); | |
107d0cf3 | 8 | |
d0c6dd29 AD |
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 | ||
1df0f48b | 15 | require_once "sessions.php"; |
23419d11 | 16 | require_once "functions.php"; |
66581886 | 17 | require_once "sanity_check.php"; |
da497bab | 18 | require_once "version.php"; |
ab49d368 AD |
19 | require_once "config.php"; |
20 | require_once "db-prefs.php"; | |
21 | ||
da497bab | 22 | $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); |
c93f38c4 | 23 | |
5f0a3741 | 24 | if (!init_connection($link)) return; |
324944f3 | 25 | |
b8aa49bc | 26 | login_sequence($link); |
53515ff1 | 27 | |
dc56b3b7 | 28 | no_cache_incantation(); |
da497bab | 29 | |
03208748 | 30 | header('Content-Type: text/html; charset=utf-8'); |
ab49d368 | 31 | ?> |
da497bab | 32 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
3f59e8cd | 33 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
007bda35 AD |
34 | <html> |
35 | <head> | |
99534a3d | 36 | <title>Tiny Tiny RSS : <?php echo __("Preferences") ?></title> |
b5d4716a AD |
37 | |
38 | <?php echo stylesheet_tag("lib/dijit/themes/claro/claro.css"); ?> | |
39 | <?php echo stylesheet_tag("tt-rss.css"); ?> | |
f820f205 | 40 | <?php echo stylesheet_tag("prefs.css"); ?> |
ab49d368 | 41 | |
5d40efc9 AD |
42 | <?php if ($_SESSION["uid"]) { |
43 | $theme = get_pref($link, "USER_CSS_THEME", $_SESSION["uid"], false); | |
44 | if ($theme) { | |
45 | echo stylesheet_tag("themes/$theme"); | |
46 | } | |
47 | } | |
48 | ?> | |
49 | ||
88e4e597 | 50 | <?php print_user_stylesheet($link) ?> |
da497bab | 51 | |
74d5c8fa | 52 | <link rel="shortcut icon" type="image/png" href="images/favicon.png"/> |
efc7243c | 53 | <link rel="icon" type="image/png" sizes="72x72" href="images/favicon-72px.png" /> |
c0266b88 | 54 | |
b5d4716a AD |
55 | <?php |
56 | foreach (array("lib/prototype.js", | |
57 | "lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls", | |
58 | "lib/dojo/dojo.js", | |
59 | "lib/dijit/dijit.js", | |
60 | "lib/dojo/tt-rss-layer.js", | |
b5d4716a AD |
61 | "errors.php?mode=js") as $jsfile) { |
62 | ||
63 | echo javascript_tag($jsfile); | |
a7750ac6 | 64 | |
b5d4716a | 65 | } ?> |
14f69488 | 66 | |
6065f3ad AD |
67 | <script type="text/javascript"> |
68 | <?php | |
107997e6 | 69 | require 'lib/jshrink/Minifier.php'; |
6065f3ad AD |
70 | |
71 | global $pluginhost; | |
72 | ||
73 | foreach ($pluginhost->get_plugins() as $n => $p) { | |
74 | if (method_exists($p, "get_prefs_js")) { | |
107997e6 | 75 | echo JShrink\Minifier::minify($p->get_prefs_js()); |
6065f3ad AD |
76 | } |
77 | } | |
78 | ||
c670a80d AD |
79 | print get_minified_js(array("functions", "deprecated", "prefs")); |
80 | ||
bcbb2ec7 | 81 | init_js_translations(); |
6065f3ad AD |
82 | ?> |
83 | </script> | |
b1895692 | 84 | |
74d5c8fa | 85 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
da497bab | 86 | |
362698ad | 87 | <script type="text/javascript"> |
44258fa9 AD |
88 | Event.observe(window, 'load', function() { |
89 | init(); | |
90 | }); | |
362698ad | 91 | </script> |
44258fa9 | 92 | |
007bda35 AD |
93 | </head> |
94 | ||
e331188f AD |
95 | <body id="ttrssPrefs" class="claro"> |
96 | ||
d62796de AD |
97 | <div id="notify" class="notify"><span id="notify_body"> </span></div> |
98 | <div id="cmdline" style="display : none"></div> | |
99 | ||
08827aaf AD |
100 | <div id="overlay"> |
101 | <div id="overlay_inner"> | |
fcc36744 AD |
102 | <div class="insensitive"><?php echo __("Loading, please wait...") ?></div> |
103 | <div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar" | |
104 | progress="0" maximum="100"> | |
08827aaf | 105 | </div> |
5a941e7e | 106 | <noscript><br/><?php print_error('Javascript is disabled. Please enable it.') ?></noscript> |
08827aaf | 107 | </div> |
da497bab | 108 | </div> |
08827aaf | 109 | |
74d5c8fa | 110 | <img id="piggie" src="images/piggie.png" style="display : none" alt="piggie"/> |
746dcf42 | 111 | |
d62796de | 112 | <div id="header" dojoType="dijit.layout.ContentPane" region="top"> |
b8cb4d08 | 113 | <!-- <a href='#' onclick="showHelp()"><?php echo __("Keyboard shortcuts") ?></a> | --> |
da497bab | 114 | <a href="#" onclick="gotoMain()"><?php echo __('Exit preferences') ?></a> |
3f59e8cd AD |
115 | </div> |
116 | ||
da497bab AD |
117 | <div id="main" dojoType="dijit.layout.BorderContainer"> |
118 | ||
d62796de | 119 | <div dojoType="dijit.layout.TabContainer" region="center" id="pref-tabs"> |
da497bab | 120 | <div id="genConfigTab" dojoType="dijit.layout.ContentPane" |
d62796de AD |
121 | href="backend.php?op=pref-prefs" |
122 | title="<?php echo __('Preferences') ?>"></div> | |
da497bab | 123 | <div id="feedConfigTab" dojoType="dijit.layout.ContentPane" |
d62796de AD |
124 | href="backend.php?op=pref-feeds" |
125 | title="<?php echo __('Feeds') ?>"></div> | |
da497bab | 126 | <div id="filterConfigTab" dojoType="dijit.layout.ContentPane" |
d62796de AD |
127 | href="backend.php?op=pref-filters" |
128 | title="<?php echo __('Filters') ?>"></div> | |
da497bab | 129 | <div id="labelConfigTab" dojoType="dijit.layout.ContentPane" |
d62796de AD |
130 | href="backend.php?op=pref-labels" |
131 | title="<?php echo __('Labels') ?>"></div> | |
132 | <?php if ($_SESSION["access_level"] >= 10) { ?> | |
da497bab | 133 | <div id="userConfigTab" dojoType="dijit.layout.ContentPane" |
d62796de AD |
134 | href="backend.php?op=pref-users" |
135 | title="<?php echo __('Users') ?>"></div> | |
207d8118 | 136 | <?php } ?> |
6cbe53c9 AD |
137 | <?php |
138 | $pluginhost->run_hooks($pluginhost::HOOK_PREFS_TABS, | |
139 | "hook_prefs_tabs", false); | |
140 | ?> | |
1f8274d3 | 141 | </div> |
3f59e8cd | 142 | |
d62796de | 143 | <div id="footer" dojoType="dijit.layout.ContentPane" region="bottom"> |
da497bab | 144 | <a class="insensitive" target="_blank" href="http://tt-rss.org/"> |
9e662b4d AD |
145 | Tiny Tiny RSS</a> |
146 | <?php if (!defined('HIDE_VERSION')) { ?> | |
147 | v<?php echo VERSION ?> | |
148 | <?php } ?> | |
149 | © 2005-<?php echo date('Y') ?> | |
da497bab AD |
150 | <a class="insensitive" target="_blank" |
151 | href="http://fakecake.org/">Andrew Dolgov</a> | |
d62796de AD |
152 | </div> <!-- footer --> |
153 | ||
23c2a4e7 AD |
154 | </div> |
155 | ||
1d3a17c7 | 156 | <?php db_close($link); ?> |
007bda35 AD |
157 | |
158 | </body> | |
159 | </html> |