]> git.wh0rd.org - tt-rss.git/blob - prefs.php
more http auth related fixes, unified login sequence function
[tt-rss.git] / prefs.php
1 <?
2 session_start();
3
4 require_once "version.php";
5 require_once "config.php";
6 require_once "db-prefs.php";
7 require_once "functions.php";
8
9 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
10
11 login_sequence($link);
12 ?>
13 <html>
14 <head>
15 <title>Tiny Tiny RSS : Preferences</title>
16 <link rel="stylesheet" href="tt-rss.css" type="text/css">
17
18 <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
19
20 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
21
22 <? } else { ?>
23
24 <link title="Compact Stylesheet" rel="alternate stylesheet"
25 type="text/css" href="tt-rss_compact.css"/>
26
27 <? } ?>
28
29
30 <script type="text/javascript" src="functions.js"></script>
31 <script type="text/javascript" src="prefs.js"></script>
32
33 <!--[if gte IE 5.5000]>
34 <script type="text/javascript" src="pngfix.js"></script>
35 <![endif]-->
36 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
37 </head>
38
39 <body onload="init()">
40
41 <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
42 <? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
43 <tr>
44 <td colspan="2">
45 <table cellspacing="0" cellpadding="0" width="100%"><tr>
46 <td rowspan="2" class="header" valign="middle">
47 <img src="images/ttrss_logo.png" alt="logo">
48 </td>
49 <td align="right" valign="top">
50 <div id="notify"><span id="notify_body"></div>
51 </td>
52 </tr><tr><td class="welcomePrompt">
53 <? if (!SINGLE_USER_MODE) { ?>
54 <? if (USE_HTTP_AUTH) { ?>
55 <table align="right"><tr>
56 <td class="httpWelcomePrompt">Hello, <b> <?= $_SESSION["name"] ?></b></td>
57 <td><form action="tt-rss.php" method="POST">
58 <input type="hidden" name="ForceLogout" value="yes">
59 <input type="submit" class="button" value="Logout">
60 </form>
61 </td></tr></table>
62 <? } else { ?>
63 Hello, <b><?= $_SESSION["name"] ?></b>
64 (<a href="logout.php">Logout</a>)
65 <? } ?>
66 </td>
67 <? } ?>
68 </tr></table>
69 </td>
70 </tr>
71 <? } ?>
72 <tr>
73 <td class="prefsTabs" align="left" valign="bottom">
74 <input id="genConfigTab" class="prefsTab" type="submit" value="Preferences"
75 onclick="selectTab('genConfig')">
76 <input id="feedConfigTab" class="prefsTab" type="submit" value="Feed Configuration"
77 onclick="selectTab('feedConfig')">
78 <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering"
79 onclick="selectTab('filterConfig')">
80 <? if (get_pref($link, 'ENABLE_LABELS')) { ?>
81 <input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor"
82 onclick="selectTab('labelConfig')">
83 <? } ?>
84 <? if ($_SESSION["access_level"] >= 10) { ?>
85 <input id="userConfigTab" class="prefsTab" type="submit" value="User Manager"
86 onclick="selectTab('userConfig')">
87 <? } ?>
88 </td>
89 <td class="prefsToolbar" valign="middle" align="right">
90 <input type="submit" onclick="gotoMain()" class="button" value="Return to main">
91 </td>
92 </tr>
93 </tr>
94 <td id="prefContent" class="prefContent" valign="top" colspan="2">
95
96 <p>Loading, please wait...</p>
97
98 </td>
99 </tr>
100 <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
101 <tr>
102 <td class="footer" colspan="2">
103 <a href="http://bah.spb.su/~fox/tt-rss/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
104 <? if (WEB_DEMO_MODE) { ?>
105 <br>Running in demo mode, some functionality is disabled.
106 <? } ?>
107 </td>
108 </td>
109 <? } ?>
110 </table>
111
112 <? db_close($link); ?>
113
114 </body>
115 </html>