]> git.wh0rd.org - tt-rss.git/blame_incremental - prefs.php
fix bug when content preview was non-clickable
[tt-rss.git] / prefs.php
... / ...
CommitLineData
1<?php
2 require_once "functions.php";
3
4 basic_nosid_redirect_check();
5
6 require_once "sessions.php";
7
8 require_once "sanity_check.php";
9 require_once "version.php";
10 require_once "config.php";
11 require_once "db-prefs.php";
12
13 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
14
15 login_sequence($link);
16
17 $dt_add = get_script_dt_add();
18
19?>
20<html>
21<head>
22 <title>Tiny Tiny RSS : Preferences</title>
23 <link rel="stylesheet" href="tt-rss.css" type="text/css">
24
25 <?php $user_theme = $_SESSION["theme"];
26 if ($user_theme) { ?>
27 <link rel="stylesheet" type="text/css" href="themes/<?php echo $user_theme ?>/theme.css">
28 <?php } ?>
29
30 <?php if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?>
31
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 } ?>
36
37 <?php if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
38
39 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
40
41 <?php } else { ?>
42
43 <link title="Compact Stylesheet" rel="alternate stylesheet"
44 type="text/css" href="tt-rss_compact.css"/>
45
46 <?php } ?>
47
48 <script type="text/javascript" src="prototype.js"></script>
49
50 <script type="text/javascript" src="functions.js?<?php echo $dt_add ?>"></script>
51 <script type="text/javascript" src="prefs.js?<?php echo $dt_add ?>"></script>
52
53 <div id="infoBoxShadow"><div id="infoBox">BAH</div></div>
54
55 <!--[if gte IE 5.5000]>
56 <script type="text/javascript" src="pngfix.js"></script>
57 <link rel="stylesheet" type="text/css" href="tt-rss-ie.css">
58 <![endif]-->
59 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
60
61 <script type="text/javascript">
62 if (navigator.userAgent.match("Opera")) {
63 document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
64 }
65 if (navigator.userAgent.match("Gecko") && !navigator.userAgent.match("KHTML")) {
66 document.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
67 }
68 </script>
69</head>
70
71<body>
72
73<div id="piggie">&nbsp;</div>
74
75<iframe id="backReqBox"></iframe>
76
77<script type="text/javascript">
78if (document.addEventListener) {
79 document.addEventListener("DOMContentLoaded", init, null);
80}
81window.onload = init;
82</script>
83
84<ul id="debug_output"></ul>
85
86<div id="fatal_error"><div id="fatal_error_inner">
87 <h1>Fatal Error</h1>
88 <div id="fatal_error_msg">Unknown Error</div>
89</div></div>
90
91<table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
92<?php if (get_pref($link, 'DISPLAY_HEADER')) { ?>
93<tr>
94 <td colspan="2">
95 <table cellspacing="0" cellpadding="0" width="100%"><tr>
96 <td rowspan="2" class="header" valign="middle">
97 <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS">
98 </td>
99 <td valign="top" class="notifyBox">
100 <div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
101 </td>
102 </tr><tr><td class="welcomePrompt">
103 <?php if (!SINGLE_USER_MODE) { ?>
104 Hello, <b><?php echo $_SESSION["name"] ?></b>
105 (<a href="logout.php">Logout</a>)
106 <?php } ?>
107 </td>
108 </tr></table>
109 </td>
110</tr>
111<?php } else { ?>
112<tr>
113 <td class="small">
114 <div id="notify" class="notify_sm"><span id="notify_body">&nbsp;</span></div>
115 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
116 </td><td class="welcomePrompt">
117 <?php if (!SINGLE_USER_MODE) { ?>
118 Hello, <b><?php echo $_SESSION["name"] ?></b>
119 (<a href="logout.php">Logout</a>)
120 <?php } ?>
121</td></tr>
122<?php } ?>
123<tr>
124 <td class="prefsTabs" align="left" valign="bottom">
125 <input id="genConfigTab" class="prefsTab" type="submit" value="Preferences"
126 onclick="selectTab('genConfig')">
127 <input id="feedConfigTab" class="prefsTab" type="submit" value="My Feeds"
128 onclick="selectTab('feedConfig')">
129 <?php if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) { ?>
130 <input id="feedBrowserTab" class="prefsTab" type="submit" value="Other Feeds"
131 onclick="selectTab('feedBrowser')">
132 <?php } ?>
133 <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering"
134 onclick="selectTab('filterConfig')">
135 <?php if (get_pref($link, 'ENABLE_LABELS')) { ?>
136 <input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor"
137 onclick="selectTab('labelConfig')">
138 <?php } ?>
139 <?php if ($_SESSION["access_level"] >= 10) { ?>
140 <input id="userConfigTab" class="prefsTab" type="submit" value="User Manager"
141 onclick="selectTab('userConfig')">
142 <?php } ?>
143 </td>
144 <td class="prefsToolbar" valign="middle" align="right">
145 <input type="submit" onclick="gotoMain()" class="button" value="Return to main">
146 </td>
147 </tr>
148</tr>
149 <td id="prefContent" class="prefContent" valign="top" colspan="2">
150
151 <p>Loading, please wait...</p>
152
153 </td>
154</tr>
155<?php if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
156<tr>
157 <td class="footer" colspan="2">
158 <a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> v<?php echo VERSION ?> &copy; 2005-2006 Andrew Dolgov
159 <?php if (WEB_DEMO_MODE) { ?>
160 <br>Running in demo mode, some functionality is disabled.
161 <?php } ?>
162 </td>
163</td>
164<?php } ?>
165</table>
166
167<?php db_close($link); ?>
168
169<script type="text/javascript">
170 /* for IE */
171 function statechange() {
172 if (document.readyState == "interactive") init();
173 }
174
175 if (document.readyState) {
176 if (document.readyState == "interactive" || document.readyState == "complete") {
177 init();
178 } else {
179 document.onreadystatechange = statechange;
180 }
181 }
182</script>
183
184</body>
185</html>