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