]> git.wh0rd.org - tt-rss.git/blob - prefs.php
css layout for preferences
[tt-rss.git] / prefs.php
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 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
21 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22 <html>
23 <head>
24 <title>Tiny Tiny RSS : Preferences</title>
25 <link rel="stylesheet" href="tt-rss.css" type="text/css">
26
27 <?php $user_theme = $_SESSION["theme"];
28 if ($user_theme) { ?>
29 <link rel="stylesheet" type="text/css" href="themes/<?php echo $user_theme ?>/theme.css">
30 <?php } ?>
31
32 <?php if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?>
33
34 <?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
35 <?php if ($user_css_url) { ?>
36 <link type="text/css" href="<?php echo $user_css_url ?>"/>
37 <?php } ?>
38
39 <?php if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
40
41 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
42
43 <?php } else { ?>
44
45 <link title="Compact Stylesheet" rel="alternate stylesheet"
46 type="text/css" href="tt-rss_compact.css"/>
47
48 <?php } ?>
49
50 <link rel="shortcut icon" type="image/png" href="images/favicon.png">
51
52 <script type="text/javascript" src="prototype.js"></script>
53
54 <script type="text/javascript" src="functions.js?<?php echo $dt_add ?>"></script>
55 <script type="text/javascript" src="prefs.js?<?php echo $dt_add ?>"></script>
56
57 <div id="infoBoxShadow"><div id="infoBox">BAH</div></div>
58
59 <!--[if gte IE 5.5000]>
60 <script type="text/javascript" src="pngfix.js"></script>
61 <link rel="stylesheet" type="text/css" href="tt-rss-ie.css">
62 <![endif]-->
63 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
64
65 <script type="text/javascript">
66 if (navigator.userAgent.match("Opera")) {
67 document.write('<link rel="stylesheet" type="text/css" href="opera.css">');
68 }
69 if (navigator.userAgent.match("Gecko") && !navigator.userAgent.match("KHTML")) {
70 document.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
71 }
72 </script>
73 </head>
74
75 <body>
76
77 <div id="piggie">&nbsp;</div>
78
79 <iframe id="backReqBox"></iframe>
80
81 <script type="text/javascript">
82 if (document.addEventListener) {
83 document.addEventListener("DOMContentLoaded", init, null);
84 }
85 window.onload = init;
86 </script>
87
88 <ul id="debug_output"></ul>
89
90 <div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
91
92 <div id="fatal_error"><div id="fatal_error_inner">
93 <h1>Fatal Error</h1>
94 <div id="fatal_error_msg">Unknown Error</div>
95 </div></div>
96
97 <div id="prefHeader">
98 <?php if (!SINGLE_USER_MODE) { ?>
99 <div style="float : right">
100 Hello, <b><?php echo $_SESSION["name"] ?></b>
101 (<a href="logout.php">Logout</a>)
102 </div>
103 <?php } ?>
104 <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/>
105 </div>
106
107 <div id="prefTabs">
108 <div class="return">
109 <a href="#" onclick="gotoMain()">Exit preferences</a>
110 </div>
111
112 <input id="genConfigTab" class="prefsTab" type="submit" value="Preferences"
113 onclick="selectTab('genConfig')">
114 <input id="feedConfigTab" class="prefsTab" type="submit" value="My Feeds"
115 onclick="selectTab('feedConfig')">
116 <?php if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) { ?>
117 <input id="feedBrowserTab" class="prefsTab" type="submit" value="Other Feeds"
118 onclick="selectTab('feedBrowser')">
119 <?php } ?>
120 <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering"
121 onclick="selectTab('filterConfig')">
122 <?php if (get_pref($link, 'ENABLE_LABELS')) { ?>
123 <input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor"
124 onclick="selectTab('labelConfig')">
125 <?php } ?>
126 <?php if ($_SESSION["access_level"] >= 10) { ?>
127 <input id="userConfigTab" class="prefsTab" type="submit" value="User Manager"
128 onclick="selectTab('userConfig')">
129 <?php } ?>
130 </div>
131
132 <div id="prefContent">
133 <p>Loading, please wait...</p>
134 </div>
135
136 <?php db_close($link); ?>
137
138 <script type="text/javascript">
139 /* for IE */
140 function statechange() {
141 if (document.readyState == "interactive") init();
142 }
143
144 if (document.readyState) {
145 if (document.readyState == "interactive" || document.readyState == "complete") {
146 init();
147 } else {
148 document.onreadystatechange = statechange;
149 }
150 }
151 </script>
152
153 </body>
154 </html>