]> git.wh0rd.org - tt-rss.git/blame - prefs.php
fix typo in feedlist generator
[tt-rss.git] / prefs.php
CommitLineData
1d3a17c7 1<?php
7ae65adf 2 require_once "functions.php";
1df0f48b 3 require_once "sessions.php";
66581886 4 require_once "sanity_check.php";
ab49d368
AD
5 require_once "version.php";
6 require_once "config.php";
7 require_once "db-prefs.php";
8
9 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
c93f38c4 10
b8aa49bc 11 login_sequence($link);
53515ff1 12
1b758780 13 $dt_add = get_script_dt_add();
53515ff1 14
dc56b3b7 15 no_cache_incantation();
1df0f48b 16
ab49d368 17?>
3f59e8cd
AD
18<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
19 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
007bda35
AD
20<html>
21<head>
e828e31e 22 <title>Tiny Tiny RSS : Preferences</title>
007bda35 23 <link rel="stylesheet" href="tt-rss.css" type="text/css">
ab49d368 24
1d3a17c7 25 <?php $user_theme = $_SESSION["theme"];
503eb349 26 if ($user_theme) { ?>
1d3a17c7
AD
27 <link rel="stylesheet" type="text/css" href="themes/<?php echo $user_theme ?>/theme.css">
28 <?php } ?>
503eb349 29
1d3a17c7 30 <?php if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?>
5d35cdcd 31
1d3a17c7
AD
32 <?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
33 <?php if ($user_css_url) { ?>
34 <link type="text/css" href="<?php echo $user_css_url ?>"/>
35 <?php } ?>
386d7b5b 36
c0266b88
AD
37 <link rel="shortcut icon" type="image/png" href="images/favicon.png">
38
14f69488
AD
39 <script type="text/javascript" src="prototype.js"></script>
40
1d3a17c7
AD
41 <script type="text/javascript" src="functions.js?<?php echo $dt_add ?>"></script>
42 <script type="text/javascript" src="prefs.js?<?php echo $dt_add ?>"></script>
b1895692 43
59a543f0
AD
44 <div id="infoBoxShadow"><div id="infoBox">BAH</div></div>
45
25cb5736
AD
46 <!--[if gte IE 5.5000]>
47 <script type="text/javascript" src="pngfix.js"></script>
d1793994 48 <link rel="stylesheet" type="text/css" href="tt-rss-ie.css">
25cb5736 49 <![endif]-->
007bda35 50 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
362698ad
AD
51
52 <script type="text/javascript">
53 if (navigator.userAgent.match("Opera")) {
54 document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
55 }
6b9bf6c2
AD
56 if (navigator.userAgent.match("Gecko") && !navigator.userAgent.match("KHTML")) {
57 document.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
58 }
362698ad 59 </script>
007bda35
AD
60</head>
61
97dcd654
AD
62<body>
63
d437c8cf 64<div id="piggie">&nbsp;</div>
1cac3c31 65
48c6406b
AD
66<iframe id="backReqBox"></iframe>
67
97dcd654
AD
68<script type="text/javascript">
69if (document.addEventListener) {
70 document.addEventListener("DOMContentLoaded", init, null);
71}
72window.onload = init;
73</script>
007bda35 74
a7565293
AD
75<ul id="debug_output"></ul>
76
3f59e8cd
AD
77<div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
78
a7565293
AD
79<div id="fatal_error"><div id="fatal_error_inner">
80 <h1>Fatal Error</h1>
d3f24242 81 <div id="fatal_error_msg"><?php echo _('Unknown Error') ?></div>
a7565293
AD
82</div></div>
83
3f59e8cd
AD
84<div id="prefHeader">
85 <?php if (!SINGLE_USER_MODE) { ?>
86 <div style="float : right">
d3f24242 87 <?php echo _('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b>
e6720996 88 (<a href="logout.php">Logout</a>)
3f59e8cd
AD
89 </div>
90 <?php } ?>
91 <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/>
92</div>
93
3f59e8cd
AD
94 <div class="return">
95 <a href="#" onclick="gotoMain()">Exit preferences</a>
96 </div>
97
656f4b6c
AD
98 <div class="firstTab">&nbsp;</div>
99
100 <div id="genConfigTab" class="prefsTab"
d3f24242 101 onclick="selectTab('genConfig')"><?php echo _('Preferences') ?></div>
656f4b6c 102 <div id="feedConfigTab" class="prefsTab"
d3f24242 103 onclick="selectTab('feedConfig')"><?php echo _('My Feeds') ?></div>
1d3a17c7 104 <?php if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) { ?>
656f4b6c 105 <div id="feedBrowserTab" class="prefsTab"
d3f24242 106 onclick="selectTab('feedBrowser')"><?php echo _('Other Feeds') ?></div>
1d3a17c7 107 <?php } ?>
656f4b6c 108 <div id="filterConfigTab" class="prefsTab"
d3f24242 109 onclick="selectTab('filterConfig')"><?php echo _('Content Filtering') ?></div>
1d3a17c7 110 <?php if (get_pref($link, 'ENABLE_LABELS')) { ?>
656f4b6c 111 <div id="labelConfigTab" class="prefsTab"
d3f24242 112 onclick="selectTab('labelConfig')"><?php echo _('Label Editor') ?></div>
1d3a17c7
AD
113 <?php } ?>
114 <?php if ($_SESSION["access_level"] >= 10) { ?>
656f4b6c 115 <div id="userConfigTab" class="prefsTab"
d3f24242 116 onclick="selectTab('userConfig')"><?php echo _('User Manager') ?></div>
1d3a17c7 117 <?php } ?>
3f59e8cd
AD
118
119<div id="prefContent">
d3f24242 120 <p><?php echo _('Loading, please wait...') ?></p>
84916243
AD
121 <noscript>
122 <div class="error">
d3f24242 123 <?php echo _("Your browser doesn't support Javascript, which is required
84916243 124 for this application to function properly. Please check your
d3f24242 125 browser settings.") ?></div>
84916243 126 </noscript>
3f59e8cd 127</div>
007bda35 128
23c2a4e7
AD
129<div id="prefFooter">
130 <?php if (defined('_DEBUG_USER_SWITCH')) { ?>
131 <select id="userSwitch" onchange="userSwitch()">
132 <?php
133 foreach (array('admin', 'fox', 'test') as $u) {
134 $op_sel = ($u == $_SESSION["name"]) ? "selected" : "";
135 print "<option $op_sel>$u</option>";
136 }
137 ?>
138 </select>
aff31ecf 139 <?php } ?>
17b3e8e6 140 <a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> v<?php echo VERSION ?> &copy; 2005-2007 <a href="http://bah.org.ru/">Andrew Dolgov</a>
23c2a4e7
AD
141</div>
142
1d3a17c7 143<?php db_close($link); ?>
007bda35 144
97dcd654
AD
145<script type="text/javascript">
146 /* for IE */
147 function statechange() {
148 if (document.readyState == "interactive") init();
149 }
150
151 if (document.readyState) {
152 if (document.readyState == "interactive" || document.readyState == "complete") {
153 init();
154 } else {
155 document.onreadystatechange = statechange;
156 }
157 }
158</script>
159
007bda35
AD
160</body>
161</html>