]> git.wh0rd.org Git - tt-rss.git/blob - prefs.php
add some basic "did I forget to create config.php" sanity checks
[tt-rss.git] / prefs.php
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_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
20         <? if ($user_css_url) { ?>
21                 <link type="text/css" href="<?= $user_css_url ?>"/> 
22         <? } ?>
23
24         <? if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
25
26                 <link rel="stylesheet" href="tt-rss_compact.css" type="text/css">
27
28         <? } else { ?>
29
30                 <link title="Compact Stylesheet" rel="alternate stylesheet" 
31                         type="text/css" href="tt-rss_compact.css"/> 
32
33         <? } ?>
34
35         
36         <script type="text/javascript" src="functions.js"></script>
37         <script type="text/javascript" src="prefs.js"></script>
38
39         <!--[if gte IE 5.5000]>
40                 <script type="text/javascript" src="pngfix.js"></script>
41         <![endif]-->
42         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
43 </head>
44
45 <body onload="init()">
46
47 <table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main">
48 <? if (get_pref($link, 'DISPLAY_HEADER')) { ?>
49 <tr>
50         <td colspan="2">
51                 <table cellspacing="0" cellpadding="0" width="100%"><tr>
52                         <td rowspan="2" class="header" valign="middle"> 
53                                 <img src="images/ttrss_logo.png" alt="logo">    
54                         </td>
55                         <td align="right" valign="top">
56                                 <div id="notify"><span id="notify_body"></div>
57                         </td>
58                 </tr><tr><td class="welcomePrompt">
59                         <? if (!SINGLE_USER_MODE) { ?>
60                                 Hello, <b><?= $_SESSION["name"] ?></b>
61                                 (<a href="logout.php">Logout</a>)
62                         <? } ?>
63                         </td>
64                 </tr></table>
65         </td>
66 </tr>
67 <? } ?>
68 <tr>
69         <td class="prefsTabs" align="left" valign="bottom">
70                 <input id="genConfigTab" class="prefsTab" type="submit" value="Preferences"
71                         onclick="selectTab('genConfig')">
72                 <input id="feedConfigTab" class="prefsTab" type="submit" value="Feed Configuration"
73                         onclick="selectTab('feedConfig')">
74                 <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering"
75                         onclick="selectTab('filterConfig')">
76                 <? if (get_pref($link, 'ENABLE_LABELS')) { ?>
77                 <input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor"
78                         onclick="selectTab('labelConfig')">
79                 <? } ?>
80                 <? if ($_SESSION["access_level"] >= 10) { ?>
81                 <input id="userConfigTab" class="prefsTab" type="submit" value="User Manager"
82                         onclick="selectTab('userConfig')">
83                 <? } ?>         
84         </td>
85         <td class="prefsToolbar" valign="middle" align="right"> 
86                 <input type="submit" onclick="gotoMain()" class="button" value="Return to main">
87         </td>
88         </tr>
89 </tr>
90         <td id="prefContent" class="prefContent" valign="top" colspan="2">
91
92                 <p>Loading, please wait...</p>
93
94         </td>
95 </tr>
96 <? if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
97 <tr>
98         <td class="footer" colspan="2">
99                 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
100                 <? if (WEB_DEMO_MODE) { ?>
101                 <br>Running in demo mode, some functionality is disabled.
102                 <? } ?>
103         </td>
104 </td>
105 <? } ?>
106 </table>
107
108 <? db_close($link); ?>
109
110 </body>
111 </html>