]> git.wh0rd.org - tt-rss.git/blame - prefs.php
implement per-user timezone support; store dates in UTC internally (closes #254)
[tt-rss.git] / prefs.php
CommitLineData
1d3a17c7 1<?php
d65981e2
AD
2 error_reporting(E_ERROR | E_WARNING | E_PARSE);
3
7ae65adf 4 require_once "functions.php";
1df0f48b 5 require_once "sessions.php";
66581886 6 require_once "sanity_check.php";
ab49d368
AD
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);
c93f38c4 12
324944f3
AD
13 init_connection($link);
14
b8aa49bc 15 login_sequence($link);
53515ff1 16
1b758780 17 $dt_add = get_script_dt_add();
53515ff1 18
dc56b3b7 19 no_cache_incantation();
03208748
AD
20
21 header('Content-Type: text/html; charset=utf-8');
22
ab49d368 23?>
3f59e8cd
AD
24<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
25 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
007bda35
AD
26<html>
27<head>
e828e31e 28 <title>Tiny Tiny RSS : Preferences</title>
74d5c8fa 29 <link rel="stylesheet" type="text/css" href="tt-rss.css?<?php echo $dt_add ?>"/>
e7df7538 30 <link rel="stylesheet" type="text/css" href="infobox.css?<?php echo $dt_add ?>"/>
ab49d368 31
d9084cf2 32 <?php $user_theme = get_user_theme_path($link);
503eb349 33 if ($user_theme) { ?>
dce46cad 34 <link rel="stylesheet" type="text/css" href="<?php echo $user_theme ?>/theme.css"/>
1d3a17c7 35 <?php } ?>
5d35cdcd 36
1d3a17c7
AD
37 <?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
38 <?php if ($user_css_url) { ?>
39 <link type="text/css" href="<?php echo $user_css_url ?>"/>
40 <?php } ?>
386d7b5b 41
74d5c8fa 42 <link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
c0266b88 43
fe7537b5 44 <script type="text/javascript" src="lib/prototype.js"></script>
bd40e88e 45 <script type="text/javascript" src="lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script>
a7750ac6 46
ff39ff9b 47 <script type="text/javascript" charset="utf-8" src="localized_js.php?<?php echo $dt_add ?>"></script>
14f69488 48
ff39ff9b
AD
49 <script type="text/javascript" charset="utf-8" src="functions.js?<?php echo $dt_add ?>"></script>
50 <script type="text/javascript" charset="utf-8" src="prefs.js?<?php echo $dt_add ?>"></script>
b1895692 51
74d5c8fa 52 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
44258fa9 53
362698ad 54 <script type="text/javascript">
44258fa9
AD
55 Event.observe(window, 'load', function() {
56 init();
57 });
362698ad 58 </script>
44258fa9 59
007bda35
AD
60</head>
61
27f5a18f 62<body id="ttrssPrefs">
97dcd654 63
08827aaf
AD
64<div id="overlay">
65 <div id="overlay_inner">
66 <?php echo __("Loading, please wait...") ?>
67
68 <div id="l_progress_o">
69 <div id="l_progress_i"></div>
70 </div>
71
72 <noscript>
4b67e71e 73 <p><?php print_error(__("Your browser doesn't support Javascript, which is required
08827aaf 74 for this application to function properly. Please check your
4b67e71e 75 browser settings.")) ?></p>
08827aaf
AD
76 </noscript>
77 </div>
78</div>
79
93f66472 80<div id="hotkey_help_overlay" style="display : none" onclick="Element.hide(this)">
746dcf42 81 <?php rounded_table_start("hho"); ?>
93f66472 82 <?php include "help/4.php" ?>
746dcf42 83 <?php rounded_table_end(); ?>
93f66472
AD
84</div>
85
74d5c8fa 86<img id="piggie" src="images/piggie.png" style="display : none" alt="piggie"/>
746dcf42 87
3f59e8cd 88<div id="prefHeader">
6352c214
AD
89 <div class="topLinks">
90 <?php if (!SINGLE_USER_MODE) { ?>
efae7595 91 <?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
6352c214
AD
92 <?php } ?>
93 <a href="#" onclick="gotoMain()"><?php echo __('Exit preferences') ?></a>
94 <?php if (!SINGLE_USER_MODE) { ?>
95 | <a href="logout.php"><?php echo __('Logout') ?></a>
96 <?php } ?>
97 </div>
e9823609 98 <img src="<?php echo theme_image($link, 'images/ttrss_logo.png') ?>" alt="Tiny Tiny RSS"/>
3f59e8cd
AD
99</div>
100
1f8274d3 101<div id="prefTabs">
d1628a4f 102 <div class='prefKbdHelp'>
883fee8d 103 <img src="<?php echo theme_image($link, 'images/small_question.png') ?>" alt="?"/> <a href='#' onclick="Effect.Appear('hotkey_help_overlay', {duration: 0.3})"><?php echo __("Keyboard shortcuts") ?></a>
d1628a4f
AD
104 </div>
105
656f4b6c
AD
106 <div class="firstTab">&nbsp;</div>
107
108 <div id="genConfigTab" class="prefsTab"
d1db26aa 109 onclick="selectTab('genConfig')"><?php echo __('Preferences') ?></div>
656f4b6c 110 <div id="feedConfigTab" class="prefsTab"
07b71436 111 onclick="selectTab('feedConfig')"><?php echo __('Feeds') ?></div>
656f4b6c 112 <div id="filterConfigTab" class="prefsTab"
af03c001 113 onclick="selectTab('filterConfig')"><?php echo __('Filters') ?></div>
656f4b6c 114 <div id="labelConfigTab" class="prefsTab"
af03c001 115 onclick="selectTab('labelConfig')"><?php echo __('Labels') ?></div>
1d3a17c7 116 <?php if ($_SESSION["access_level"] >= 10) { ?>
656f4b6c 117 <div id="userConfigTab" class="prefsTab"
af03c001 118 onclick="selectTab('userConfig')"><?php echo __('Users') ?></div>
1d3a17c7 119 <?php } ?>
1f8274d3 120</div>
3f59e8cd 121
727b0e56 122<div id="prefContentOuter">
3f59e8cd 123<div id="prefContent">
d1db26aa 124 <p><?php echo __('Loading, please wait...') ?></p>
84916243
AD
125 <noscript>
126 <div class="error">
d1db26aa 127 <?php echo __("Your browser doesn't support Javascript, which is required
84916243 128 for this application to function properly. Please check your
d3f24242 129 browser settings.") ?></div>
84916243 130 </noscript>
3f59e8cd 131</div>
727b0e56 132</div>
007bda35 133
1d8e4418 134<div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
5dda5455 135<div id="infoBoxShadow"><div id="infoBox">BAH</div></div>
78935092
AD
136<div id="cmdline" style="display : none"></div>
137
273d1e29
AD
138<div id="errorBoxShadow" style="display : none">
139 <div id="errorBox">
f88c7814
AD
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>
273d1e29
AD
144 </div>
145</div>
146
569720c5 147<div id="dialog_overlay" style="display : none"> </div>
5ede560f 148
23c2a4e7 149<div id="prefFooter">
8865bdc0
AD
150 <a href="http://tt-rss.org/">Tiny Tiny RSS</a>
151 <?php if (!defined('HIDE_VERSION')) { ?>
152 v<?php echo VERSION ?>
153 <?php } ?>
51d2d404 154 &copy; 2005&ndash;<?php echo date('Y') ?> <a href="http://fakecake.org/">Andrew Dolgov</a>
23c2a4e7
AD
155</div>
156
1d3a17c7 157<?php db_close($link); ?>
007bda35
AD
158
159</body>
160</html>