2 error_reporting(E_ERROR | E_WARNING | E_PARSE
);
4 require_once "functions.php";
8 require_once "sessions.php";
9 require_once "sanity_check.php";
10 require_once "version.php";
11 require_once "config.php";
12 require_once "db-prefs.php";
14 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
16 login_sequence($link);
18 $dt_add = get_script_dt_add();
20 no_cache_incantation();
23 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
24 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
27 <title
>Tiny Tiny RSS
: Preferences
</title
>
28 <link rel
="stylesheet" href
="tt-rss.css" type
="text/css">
30 <?php
$user_theme = $_SESSION["theme"];
32 <link rel
="stylesheet" type
="text/css" href
="themes/<?php echo $user_theme ?>/theme.css">
35 <?php
if ($user_theme) { $theme_image_path = "themes/$user_theme/"; } ?
>
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 ?>"/>
42 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
44 <script type
="text/javascript" src
="prototype.js"></script
>
46 <script type
="text/javascript" src
="functions.js?<?php echo $dt_add ?>"></script
>
47 <script type
="text/javascript" src
="prefs.js?<?php echo $dt_add ?>"></script
>
49 <div id
="infoBoxShadow"><div id
="infoBox">BAH
</div
></div
>
51 <!--[if gte IE
5.5000]>
52 <script type
="text/javascript" src
="pngfix.js"></script
>
53 <link rel
="stylesheet" type
="text/css" href
="tt-rss-ie.css">
55 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
57 <script type
="text/javascript">
58 if (navigator
.userAgent
.match("Opera")) {
59 document
.write('<link rel="stylesheet" type="text/css" href="opera.css">');
61 if (navigator
.userAgent
.match("Gecko") && !navigator
.userAgent
.match("KHTML")) {
62 document
.write('<link rel="stylesheet" type="text/css" href="gecko.css">');
69 <div id
="piggie"> 
;</div
>
71 <iframe id
="backReqBox"></iframe
>
73 <script type
="text/javascript">
74 if (document
.addEventListener
) {
75 document
.addEventListener("DOMContentLoaded", init
, null);
80 <ul id
="debug_output"></ul
>
82 <div id
="notify" class="notify"><span id
="notify_body"> 
;</span
></div
>
84 <div id
="fatal_error"><div id
="fatal_error_inner">
86 <div id
="fatal_error_msg"><?php
echo __('Unknown Error') ?
></div
>
90 <?php
if (!SINGLE_USER_MODE
) { ?
>
91 <div style
="float : right">
92 <?php
echo __('Hello,') ?
> <b
><?php
echo $_SESSION["name"] ?
></b
>
93 (<a href
="logout.php">Logout
</a
>)
96 <img src
="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt
="Tiny Tiny RSS"/>
100 <a href
="#" onclick
="gotoMain()">Exit preferences
</a
>
103 <div
class="firstTab"> 
;</div
>
105 <div id
="genConfigTab" class="prefsTab"
106 onclick
="selectTab('genConfig')"><?php
echo __('Preferences') ?
></div
>
107 <div id
="feedConfigTab" class="prefsTab"
108 onclick
="selectTab('feedConfig')"><?php
echo __('My Feeds') ?
></div
>
109 <?php
if (ENABLE_FEED_BROWSER
&& !SINGLE_USER_MODE
) { ?
>
110 <div id
="feedBrowserTab" class="prefsTab"
111 onclick
="selectTab('feedBrowser')"><?php
echo __('Other Feeds') ?
></div
>
113 <div id
="filterConfigTab" class="prefsTab"
114 onclick
="selectTab('filterConfig')"><?php
echo __('Content Filtering') ?
></div
>
115 <?php
if (get_pref($link, 'ENABLE_LABELS')) { ?
>
116 <div id
="labelConfigTab" class="prefsTab"
117 onclick
="selectTab('labelConfig')"><?php
echo __('Label Editor') ?
></div
>
119 <?php
if ($_SESSION["access_level"] >= 10) { ?
>
120 <div id
="userConfigTab" class="prefsTab"
121 onclick
="selectTab('userConfig')"><?php
echo __('User Manager') ?
></div
>
124 <div id
="prefContent">
125 <p
><?php
echo __('Loading, please wait...') ?
></p
>
128 <?php
echo __("Your browser doesn't support Javascript, which is required
129 for this application to function properly. Please check your
130 browser settings.") ?
></div
>
134 <div id
="prefFooter">
135 <?php
if (defined('_DEBUG_USER_SWITCH')) { ?
>
136 <select id
="userSwitch" onchange
="userSwitch()">
138 foreach (array('admin', 'fox', 'test') as $u) {
139 $op_sel = ($u == $_SESSION["name"]) ?
"selected" : "";
140 print "<option $op_sel>$u</option>";
145 <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
>
148 <?php
db_close($link); ?
>
150 <script type
="text/javascript">
152 function statechange() {
153 if (document
.readyState
== "interactive") init();
156 if (document
.readyState
) {
157 if (document
.readyState
== "interactive" || document
.readyState
== "complete") {
160 document
.onreadystatechange
= statechange
;