]> git.wh0rd.org Git - tt-rss.git/blob - prefs.php
9d2d0a846766c034f8e77cb1d3cefdc4daf98327
[tt-rss.git] / prefs.php
1 <?php
2         error_reporting(E_ERROR | E_WARNING | E_PARSE);
3
4         require_once "functions.php"; 
5         require_once "sessions.php";
6         require_once "sanity_check.php";
7         require_once "version.php"; 
8         require_once "config.php";
9         require_once "db-prefs.php";
10
11         $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); 
12
13         login_sequence($link);
14
15         $dt_add = get_script_dt_add();
16
17         no_cache_incantation();
18         
19         header('Content-Type: text/html; charset=utf-8');
20         
21 ?>
22 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
23         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
24 <html>
25 <head>
26         <title>Tiny Tiny RSS : Preferences</title>
27         <link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"/>
28
29         <?php   $user_theme = get_user_theme_path($link);
30                 if ($user_theme) { ?>
31                 <link rel="stylesheet" type="text/css" href="<?php echo $user_theme ?>/theme.css"/>
32         <?php } ?>
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         <link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
40
41         <script type="text/javascript" src="lib/prototype.js"></script>
42         <script type="text/javascript" src="lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script>
43
44         <script type="text/javascript" charset="utf-8" src="localized_js.php?<?php echo $dt_add ?>"></script>
45
46         <script type="text/javascript" charset="utf-8" src="functions.js?<?php echo $dt_add ?>"></script>
47         <script type="text/javascript" charset="utf-8" src="prefs.js?<?php echo $dt_add ?>"></script>
48
49         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
50                 
51         <script type="text/javascript">
52                 Event.observe(window, 'load', function() {
53                         init();
54                 });
55         </script>
56
57 </head>
58
59 <body id="ttrssPrefs">
60
61 <div id="overlay">
62         <div id="overlay_inner">
63                 <?php echo __("Loading, please wait...") ?>
64
65                 <div id="l_progress_o">
66                         <div id="l_progress_i"></div>
67                 </div>
68
69         <noscript>
70                 <p><?php print_error(__("Your browser doesn't support Javascript, which is required
71                 for this application to function properly. Please check your
72                 browser settings.")) ?></p>
73         </noscript>
74         </div>
75 </div> 
76
77 <div id="hotkey_help_overlay" style="display : none" onclick="Element.hide(this)">
78         <?php rounded_table_start("hho"); ?>
79         <?php include "help/4.php" ?>
80         <?php rounded_table_end(); ?>
81 </div>
82
83 <img id="piggie" src="images/piggie.png" style="display : none" alt="piggie"/>
84
85 <ul id="debug_output" style='display : none'><li>&nbsp;</li></ul>
86
87 <div id="prefHeader">
88         <div class="topLinks">
89                 <?php if (!SINGLE_USER_MODE) { ?>
90                         <?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
91                 <?php } ?>
92                 <a href="#" onclick="gotoMain()"><?php echo __('Exit preferences') ?></a>
93                 <?php if (!SINGLE_USER_MODE) { ?>
94                         | <a href="logout.php"><?php echo __('Logout') ?></a>
95                 <?php } ?>
96         </div>
97         <img src="<?php echo $user_theme ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/> 
98 </div>
99
100 <div id="prefTabs">
101                 <div class='prefKbdHelp'>
102                         <img src="images/small_question.png" alt="?"/> <a href='#' onclick="Effect.Appear('hotkey_help_overlay', {duration: 0.3})"><?php echo __("Keyboard shortcuts") ?></a>
103                 </div>
104
105                 <div class="firstTab">&nbsp;</div>
106
107                 <div id="genConfigTab" class="prefsTab" 
108                         onclick="selectTab('genConfig')"><?php echo __('Preferences') ?></div>
109                 <div id="feedConfigTab" class="prefsTab" 
110                         onclick="selectTab('feedConfig')"><?php echo __('Feeds') ?></div>
111                 <div id="filterConfigTab" class="prefsTab" 
112                         onclick="selectTab('filterConfig')"><?php echo __('Filters') ?></div>
113                 <div id="labelConfigTab" class="prefsTab" 
114                         onclick="selectTab('labelConfig')"><?php echo __('Labels') ?></div>
115                 <?php if ($_SESSION["access_level"] >= 10) { ?>
116                 <div id="userConfigTab" class="prefsTab" 
117                         onclick="selectTab('userConfig')"><?php echo __('Users') ?></div>
118                 <?php } ?>              
119 </div>
120
121 <div id="prefContentOuter">
122 <div id="prefContent">
123         <p><?php echo __('Loading, please wait...') ?></p>
124         <noscript>
125                 <div class="error">
126                 <?php echo __("Your browser doesn't support Javascript, which is required
127                 for this application to function properly. Please check your
128                 browser settings.") ?></div>
129         </noscript>
130 </div>
131 </div>
132
133 <div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
134 <div id="infoBoxShadow"><div id="infoBox">BAH</div></div>
135
136 <div id="cmdline" style="display : none"></div>
137
138 <div id="errorBoxShadow" style="display : none">
139         <div id="errorBox">
140         <div id="xebTitle"><?php echo __('Fatal Exception') ?></div><div id="xebContent">&nbsp;</div>
141                 <div id="xebBtn" align='center'>
142                         <button onclick="closeErrorBox()"><?php echo __('Close this window') ?></button>
143                 </div>
144         </div>
145 </div>
146
147 <div id="dialog_overlay" style="display : none"> </div>
148
149 <div id="prefFooter">
150         <a href="http://tt-rss.org/">Tiny Tiny RSS</a>
151         <?php if (!defined('HIDE_VERSION')) { ?>
152                  v<?php echo VERSION ?> 
153         <?php } ?>
154         &copy; 2005&ndash;2010 <a href="http://bah.org.ru/">Andrew Dolgov</a>
155 </div>
156
157 <?php db_close($link); ?>
158
159 </body>
160 </html>