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