4 require_once "version.php";
5 require_once "config.php";
6 require_once "db-prefs.php";
7 require_once "functions.php";
9 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
11 if (!SINGLE_USER_MODE
) {
14 if (!$_SESSION["uid"]) {
15 header("Location: login.php?rt=tt-rss.php");
19 $force_logout = $_POST["ForceLogout"];
20 http_authenticate_user($link, $force_logout == "yes");
24 $_SESSION["name"] = "admin";
30 <title
>Tiny Tiny RSS
: Preferences
</title
>
31 <link rel
="stylesheet" href
="tt-rss.css" type
="text/css">
33 <?
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?
>
35 <link rel
="stylesheet" href
="tt-rss_compact.css" type
="text/css">
39 <link title
="Compact Stylesheet" rel
="alternate stylesheet"
40 type
="text/css" href
="tt-rss_compact.css"/>
45 <script type
="text/javascript" src
="functions.js"></script
>
46 <script type
="text/javascript" src
="prefs.js"></script
>
48 <!--[if gte IE
5.5000]>
49 <script type
="text/javascript" src
="pngfix.js"></script
>
51 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
54 <body onload
="init()">
56 <table width
="100%" height
="100%" cellspacing
="0" cellpadding
="0" class="main">
57 <?
if (get_pref($link, 'DISPLAY_HEADER')) { ?
>
60 <table cellspacing
="0" cellpadding
="0" width
="100%"><tr
>
61 <td rowspan
="2" class="header" valign
="middle">
62 <img src
="images/ttrss_logo.png" alt
="logo">
64 <td align
="right" valign
="top">
65 <div id
="notify"><span id
="notify_body"></div
>
67 </tr
><tr
><td
class="welcomePrompt">
68 <?
if (!SINGLE_USER_MODE
) { ?
>
69 <?
if (USE_HTTP_AUTH
) { ?
>
70 <table align
="right"><tr
>
71 <td
class="httpWelcomePrompt">Hello
, <b
> <?
= $_SESSION["name"] ?
></b
></td
>
72 <td
><form action
="tt-rss.php" method
="POST">
73 <input type
="hidden" name
="ForceLogout" value
="yes">
74 <input type
="submit" class="button" value
="Logout">
78 Hello
, <b
><?
= $_SESSION["name"] ?
></b
>
79 (<a href
="logout.php">Logout
</a
>)
88 <td
class="prefsTabs" align
="left" valign
="bottom">
89 <input id
="genConfigTab" class="prefsTab" type
="submit" value
="Preferences"
90 onclick
="selectTab('genConfig')">
91 <input id
="feedConfigTab" class="prefsTab" type
="submit" value
="Feed Configuration"
92 onclick
="selectTab('feedConfig')">
93 <input id
="filterConfigTab" class="prefsTab" type
="submit" value
="Content Filtering"
94 onclick
="selectTab('filterConfig')">
95 <?
if (get_pref($link, 'ENABLE_LABELS')) { ?
>
96 <input id
="labelConfigTab" class="prefsTab" type
="submit" value
="Label Editor"
97 onclick
="selectTab('labelConfig')">
99 <?
if ($_SESSION["access_level"] >= 10) { ?
>
100 <input id
="userConfigTab" class="prefsTab" type
="submit" value
="User Manager"
101 onclick
="selectTab('userConfig')">
104 <td
class="prefsToolbar" valign
="middle" align
="right">
105 <input type
="submit" onclick
="gotoMain()" class="button" value
="Return to main">
109 <td id
="prefContent" class="prefContent" valign
="top" colspan
="2">
111 <p
>Loading
, please wait
...</p
>
115 <?
if (get_pref($link, 'DISPLAY_FOOTER')) { ?
>
117 <td
class="footer" colspan
="2">
118 <a href
="http://bah.spb.su/~fox/tt-rss/">Tiny
-Tiny RSS
</a
> v
<?
= VERSION ?
> ©
; 2005 Andrew Dolgov
119 <?
if (WEB_DEMO_MODE
) { ?
>
120 <br
>Running in demo mode
, some functionality is disabled
.
127 <?
db_close($link); ?
>