]>
git.wh0rd.org - tt-rss.git/blob - prefs.php
420bc086784634afea26b54e7376e98c475382e0
2 require_once "functions.php";
3 // require_once "sessions.php";
4 require_once "sanity_check.php";
5 require_once "version.php";
6 require_once "config.php";
7 require_once "db-prefs.php";
9 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
11 login_sequence($link);
13 $dt_add = get_script_dt_add();
16 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
17 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
20 <title
>Tiny Tiny RSS
: Preferences
</title
>
21 <link rel
="stylesheet" href
="tt-rss.css" type
="text/css">
23 <?php
$user_theme = $_SESSION["theme"];
25 <link rel
="stylesheet" type
="text/css" href
="themes/<?php echo $user_theme ?>/theme.css">
28 <?php
if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?
>
30 <?php
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
31 <?php
if ($user_css_url) { ?
>
32 <link type
="text/css" href
="<?php echo $user_css_url ?>"/>
35 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
37 <script type
="text/javascript" src
="prototype.js"></script
>
39 <script type
="text/javascript" src
="functions.js?<?php echo $dt_add ?>"></script
>
40 <script type
="text/javascript" src
="prefs.js?<?php echo $dt_add ?>"></script
>
42 <div id
="infoBoxShadow"><div id
="infoBox">BAH
</div
></div
>
44 <!--[if gte IE
5.5000]>
45 <script type
="text/javascript" src
="pngfix.js"></script
>
46 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
48 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
50 <script type
="text/javascript">
51 if (navigator
.userAgent
.match("Opera")) {
52 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
54 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
55 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
62 <div id
="piggie"> 
;</div
>
64 <iframe id
="backReqBox"></iframe
>
66 <script type
="text/javascript">
67 if (document
.addEventListener
) {
68 document
.addEventListener("DOMContentLoaded", init
, null);
73 <ul id
="debug_output"></ul
>
75 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
77 <div id
="fatal_error"><div id
="fatal_error_inner">
79 <div id
="fatal_error_msg"><?php
echo _('Unknown Error') ?
></div
>
83 <?php
if (!SINGLE_USER_MODE
) { ?
>
84 <div style
="float : right">
85 <?php
echo _('Hello,') ?
> <b
><?php
echo $_SESSION["name"] ?
></b
>
86 (<a href
="logout.php">Logout
</a
>)
89 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
93 <a href
="#" onclick
="gotoMain()">Exit preferences
</a
>
96 <div
class="firstTab"> 
;</div
>
98 <div id
="genConfigTab" class="prefsTab"
99 onclick
="selectTab('genConfig')"><?php
echo _('Preferences') ?
></div
>
100 <div id
="feedConfigTab" class="prefsTab"
101 onclick
="selectTab('feedConfig')"><?php
echo _('My Feeds') ?
></div
>
102 <?php
if (ENABLE_FEED_BROWSER
&& !SINGLE_USER_MODE
) { ?
>
103 <div id
="feedBrowserTab" class="prefsTab"
104 onclick
="selectTab('feedBrowser')"><?php
echo _('Other Feeds') ?
></div
>
106 <div id
="filterConfigTab" class="prefsTab"
107 onclick
="selectTab('filterConfig')"><?php
echo _('Content Filtering') ?
></div
>
108 <?php
if (get_pref($link, 'ENABLE_LABELS')) { ?
>
109 <div id
="labelConfigTab" class="prefsTab"
110 onclick
="selectTab('labelConfig')"><?php
echo _('Label Editor') ?
></div
>
112 <?php
if ($_SESSION["access_level"] >= 10) { ?
>
113 <div id
="userConfigTab" class="prefsTab"
114 onclick
="selectTab('userConfig')"><?php
echo _('User Manager') ?
></div
>
117 <div id
="prefContent">
118 <p
><?php
echo _('Loading, please wait...') ?
></p
>
121 <?php
echo _("Your browser doesn't support Javascript, which is required
122 for this application to function properly. Please check your
123 browser settings.") ?
></div
>
127 <div id
="prefFooter">
128 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
129 <select id
="userSwitch" onchange
="userSwitch()">
131 foreach (array('admin', 'fox', 'test') as $u) {
132 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
133 print "<option $op_sel>$u</option>";
138 <a href
="http://tt-rss.spb.ru/">Tiny Tiny RSS
</a
> v
<?php
echo VERSION ?
> ©
; 2005-2007 <a href
="http://bah.org.ru/">Andrew Dolgov
</a
>
141 <?php
db_close($link); ?
>
143 <script type
="text/javascript">
145 function statechange() {
146 if (document
.readyState
== "interactive") init();
149 if (document
.readyState
) {
150 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
153 document
.onreadystatechange
= statechange
;