]>
Commit | Line | Data |
---|---|---|
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 | <script type="text/javascript"> | |
53 | if (document.addEventListener) { | |
54 | document.addEventListener("DOMContentLoaded", init, null); | |
55 | } | |
56 | window.onload = init; | |
57 | </script> | |
58 | ||
59 | <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main"> | |
60 | <? if (get_pref($link, 'DISPLAY_HEADER')) { ?> | |
61 | <tr> | |
62 | <td colspan="2"> | |
63 | <table cellspacing="0" cellpadding="0" width="100%"><tr> | |
64 | <td rowspan="2" class="header" valign="middle"> | |
65 | <img src="images/ttrss_logo.png" alt="logo"> | |
66 | </td> | |
67 | <td valign="top" class="notifyBox"> | |
68 | <div id="notify"><span id="notify_body"> </span></div> | |
69 | </td> | |
70 | </tr><tr><td class="welcomePrompt"> | |
71 | <? if (!SINGLE_USER_MODE) { ?> | |
72 | Hello, <b><?= $_SESSION["name"] ?></b> | |
73 | (<a href="logout.php">Logout</a>) | |
74 | <? } ?> | |
75 | </td> | |
76 | </tr></table> | |
77 | </td> | |
78 | </tr> | |
79 | <? } else { ?> | |
80 | <tr> | |
81 | <td class="small"> | |
82 | <div id="notify"><span id="notify_body"> </span></div> | |
83 | <div id="userDlgShadow"><div id="userDlg"> </div></div> | |
84 | </td><td class="welcomePrompt"> | |
85 | <? if (!SINGLE_USER_MODE) { ?> | |
86 | Hello, <b><?= $_SESSION["name"] ?></b> | |
87 | (<a href="logout.php">Logout</a>) | |
88 | <? } ?> | |
89 | </td></tr> | |
90 | <? } ?> | |
91 | <tr> | |
92 | <td class="prefsTabs" align="left" valign="bottom"> | |
93 | <input id="genConfigTab" class="prefsTab" type="submit" value="Preferences" | |
94 | onclick="selectTab('genConfig')"> | |
95 | <input id="feedConfigTab" class="prefsTab" type="submit" value="Feed Configuration" | |
96 | onclick="selectTab('feedConfig')"> | |
97 | <? if (ENABLE_FEED_BROWSER) { ?> | |
98 | <input id="feedBrowserTab" class="prefsTab" type="submit" value="Feed Browser" | |
99 | onclick="selectTab('feedBrowser')"> | |
100 | <? } ?> | |
101 | <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering" | |
102 | onclick="selectTab('filterConfig')"> | |
103 | <? if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) { ?> | |
104 | <input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor" | |
105 | onclick="selectTab('labelConfig')"> | |
106 | <? } ?> | |
107 | <? if ($_SESSION["access_level"] >= 10) { ?> | |
108 | <input id="userConfigTab" class="prefsTab" type="submit" value="User Manager" | |
109 | onclick="selectTab('userConfig')"> | |
110 | <? } ?> | |
111 | </td> | |
112 | <td class="prefsToolbar" valign="middle" align="right"> | |
113 | <input type="submit" onclick="gotoMain()" class="button" value="Return to main"> | |
114 | </td> | |
115 | </tr> | |
116 | </tr> | |
117 | <td id="prefContent" class="prefContent" valign="top" colspan="2"> | |
118 | ||
119 | <p>Loading, please wait...</p> | |
120 | ||
121 | </td> | |
122 | </tr> | |
123 | <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?> | |
124 | <tr> | |
125 | <td class="footer" colspan="2"> | |
126 | <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> © 2005 Andrew Dolgov | |
127 | <? if (WEB_DEMO_MODE) { ?> | |
128 | <br>Running in demo mode, some functionality is disabled. | |
129 | <? } ?> | |
130 | </td> | |
131 | </td> | |
132 | <? } ?> | |
133 | </table> | |
134 | ||
135 | <? db_close($link); ?> | |
136 | ||
137 | <script type="text/javascript"> | |
138 | /* for IE */ | |
139 | function statechange() { | |
140 | if (document.readyState == "interactive") init(); | |
141 | } | |
142 | ||
143 | if (document.readyState) { | |
144 | if (document.readyState == "interactive" || document.readyState == "complete") { | |
145 | init(); | |
146 | } else { | |
147 | document.onreadystatechange = statechange; | |
148 | } | |
149 | } | |
150 | </script> | |
151 | ||
152 | </body> | |
153 | </html> |