]> git.wh0rd.org - tt-rss.git/blame_incremental - prefs.php
use author attribute
[tt-rss.git] / prefs.php
... / ...
CommitLineData
1<?
2 session_start();
3
4 require_once "sanity_check.php";
5 require_once "version.php";
6 require_once "config.php";
7 require_once "db-prefs.php";
8 require_once "functions.php";
9
10 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
11
12 login_sequence($link);
13?>
14<html>
15<head>
16 <title>Tiny Tiny RSS : Preferences</title>
17 <link rel="stylesheet" href="tt-rss.css" type="text/css">
18
19 <? $user_theme = $_SESSION["theme"];
20 if ($user_theme) { ?>
21 <link rel="stylesheet" type="text/css" href="themes/<?= $user_theme ?>/theme.css">
22 <? } ?>
23
24 <? $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
25 <? if ($user_css_url) { ?>
26 <link type="text/css" href="<?= $user_css_url ?>"/>
27 <? } ?>
28
29 <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
30
31 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
32
33 <? } else { ?>
34
35 <link title="Compact Stylesheet" rel="alternate stylesheet"
36 type="text/css" href="tt-rss_compact.css"/>
37
38 <? } ?>
39
40
41 <script type="text/javascript" src="functions.js"></script>
42 <script type="text/javascript" src="prefs.js"></script>
43
44 <!--[if gte IE 5.5000]>
45 <script type="text/javascript" src="pngfix.js"></script>
46 <![endif]-->
47 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
48</head>
49
50<body>
51
52<div id="piggie" class="invisible">&nbsp;</div>
53
54<script type="text/javascript">
55if (document.addEventListener) {
56 document.addEventListener("DOMContentLoaded", init, null);
57}
58window.onload = init;
59</script>
60
61<table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
62<? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
63<tr>
64 <td colspan="2">
65 <table cellspacing="0" cellpadding="0" width="100%"><tr>
66 <td rowspan="2" class="header" valign="middle">
67 <img src="images/ttrss_logo.png" alt="logo">
68 </td>
69 <td valign="top" class="notifyBox">
70 <div id="notify"><span id="notify_body">&nbsp;</span></div>
71 </td>
72 </tr><tr><td class="welcomePrompt">
73 <? if (!SINGLE_USER_MODE) { ?>
74 Hello, <b><?= $_SESSION["name"] ?></b>
75 (<a href="logout.php">Logout</a>)
76 <? } ?>
77 </td>
78 </tr></table>
79 </td>
80</tr>
81<? } else { ?>
82<tr>
83 <td class="small">
84 <div id="notify"><span id="notify_body">&nbsp;</span></div>
85 <div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
86 </td><td class="welcomePrompt">
87 <? if (!SINGLE_USER_MODE) { ?>
88 Hello, <b><?= $_SESSION["name"] ?></b>
89 (<a href="logout.php">Logout</a>)
90 <? } ?>
91</td></tr>
92<? } ?>
93<tr>
94 <td class="prefsTabs" align="left" valign="bottom">
95 <input id="genConfigTab" class="prefsTab" type="submit" value="Preferences"
96 onclick="selectTab('genConfig')">
97 <input id="feedConfigTab" class="prefsTab" type="submit" value="Feed Configuration"
98 onclick="selectTab('feedConfig')">
99 <? if (ENABLE_FEED_BROWSER) { ?>
100 <input id="feedBrowserTab" class="prefsTab" type="submit" value="Feed Browser"
101 onclick="selectTab('feedBrowser')">
102 <? } ?>
103 <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering"
104 onclick="selectTab('filterConfig')">
105 <? if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) { ?>
106 <input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor"
107 onclick="selectTab('labelConfig')">
108 <? } ?>
109 <? if ($_SESSION["access_level"] >= 10) { ?>
110 <input id="userConfigTab" class="prefsTab" type="submit" value="User Manager"
111 onclick="selectTab('userConfig')">
112 <? } ?>
113 </td>
114 <td class="prefsToolbar" valign="middle" align="right">
115 <input type="submit" onclick="gotoMain()" class="button" value="Return to main">
116 </td>
117 </tr>
118</tr>
119 <td id="prefContent" class="prefContent" valign="top" colspan="2">
120
121 <p>Loading, please wait...</p>
122
123 </td>
124</tr>
125<? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
126<tr>
127 <td class="footer" colspan="2">
128 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
129 <? if (WEB_DEMO_MODE) { ?>
130 <br>Running in demo mode, some functionality is disabled.
131 <? } ?>
132 </td>
133</td>
134<? } ?>
135</table>
136
137<? db_close($link); ?>
138
139<script type="text/javascript">
140 /* for IE */
141 function statechange() {
142 if (document.readyState == "interactive") init();
143 }
144
145 if (document.readyState) {
146 if (document.readyState == "interactive" || document.readyState == "complete") {
147 init();
148 } else {
149 document.onreadystatechange = statechange;
150 }
151 }
152</script>
153
154</body>
155</html>