]>
git.wh0rd.org - tt-rss.git/blob - prefs.php
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();
15 no_cache_incantation();
18 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
19 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22 <title
>Tiny Tiny RSS
: Preferences
</title
>
23 <link rel
="stylesheet" href
="tt-rss.css" type
="text/css">
25 <?php
$user_theme = $_SESSION["theme"];
27 <link rel
="stylesheet" type
="text/css" href
="themes/<?php echo $user_theme ?>/theme.css">
30 <?php
if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?
>
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 ?>"/>
37 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
39 <script type
="text/javascript" src
="prototype.js"></script
>
41 <script type
="text/javascript" src
="functions.js?<?php echo $dt_add ?>"></script
>
42 <script type
="text/javascript" src
="prefs.js?<?php echo $dt_add ?>"></script
>
44 <div id
="infoBoxShadow"><div id
="infoBox">BAH
</div
></div
>
46 <!--[if gte IE
5.5000]>
47 <script type
="text/javascript" src
="pngfix.js"></script
>
48 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
50 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
52 <script type
="text/javascript">
53 if (navigator
.userAgent
.match("Opera")) {
54 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
56 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
57 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
64 <div id
="piggie"> 
;</div
>
66 <iframe id
="backReqBox"></iframe
>
68 <script type
="text/javascript">
69 if (document
.addEventListener
) {
70 document
.addEventListener("DOMContentLoaded", init
, null);
75 <ul id
="debug_output"></ul
>
77 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
79 <div id
="fatal_error"><div id
="fatal_error_inner">
81 <div id
="fatal_error_msg"><?php
echo _('Unknown Error') ?
></div
>
85 <?php
if (!SINGLE_USER_MODE
) { ?
>
86 <div style
="float : right">
87 <?php
echo _('Hello,') ?
> <b
><?php
echo $_SESSION["name"] ?
></b
>
88 (<a href
="logout.php">Logout
</a
>)
91 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
95 <a href
="#" onclick
="gotoMain()">Exit preferences
</a
>
98 <div
class="firstTab"> 
;</div
>
100 <div id
="genConfigTab" class="prefsTab"
101 onclick
="selectTab('genConfig')"><?php
echo _('Preferences') ?
></div
>
102 <div id
="feedConfigTab" class="prefsTab"
103 onclick
="selectTab('feedConfig')"><?php
echo _('My Feeds') ?
></div
>
104 <?php
if (ENABLE_FEED_BROWSER
&& !SINGLE_USER_MODE
) { ?
>
105 <div id
="feedBrowserTab" class="prefsTab"
106 onclick
="selectTab('feedBrowser')"><?php
echo _('Other Feeds') ?
></div
>
108 <div id
="filterConfigTab" class="prefsTab"
109 onclick
="selectTab('filterConfig')"><?php
echo _('Content Filtering') ?
></div
>
110 <?php
if (get_pref($link, 'ENABLE_LABELS')) { ?
>
111 <div id
="labelConfigTab" class="prefsTab"
112 onclick
="selectTab('labelConfig')"><?php
echo _('Label Editor') ?
></div
>
114 <?php
if ($_SESSION["access_level"] >= 10) { ?
>
115 <div id
="userConfigTab" class="prefsTab"
116 onclick
="selectTab('userConfig')"><?php
echo _('User Manager') ?
></div
>
119 <div id
="prefContent">
120 <p
><?php
echo _('Loading, please wait...') ?
></p
>
123 <?php
echo _("Your browser doesn't support Javascript, which is required
124 for this application to function properly. Please check your
125 browser settings.") ?
></div
>
129 <div id
="prefFooter">
130 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
131 <select id
="userSwitch" onchange
="userSwitch()">
133 foreach (array('admin', 'fox', 'test') as $u) {
134 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
135 print "<option $op_sel>$u</option>";
140 <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
>
143 <?php
db_close($link); ?
>
145 <script type
="text/javascript">
147 function statechange() {
148 if (document
.readyState
== "interactive") init();
151 if (document
.readyState
) {
152 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
155 document
.onreadystatechange
= statechange
;