]>
git.wh0rd.org - tt-rss.git/blob - login.php
4 require_once "sanity_check.php";
5 require_once "version.php";
6 require_once "config.php";
7 require_once "functions.php";
9 if (SINGLE_USER_MODE
) {
10 header("Location: tt-rss.php");
14 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
16 $login = $_POST["login"];
17 $password = $_POST["password"];
19 if ($login && $password) {
20 if (authenticate_user($link, $login, $password)) {
21 initialize_user_prefs($link, $_SESSION["uid"]);
23 if ($_SESSION["login_redirect"]) {
24 $redirect_to = $_SESSION["login_redirect"];
26 $redirect_to = "tt-rss.php";
28 header("Location: $redirect_to");
33 $_SESSION["login_redirect"] = $_GET["rt"];
39 <title
>Tiny Tiny RSS
: Login
</title
>
40 <link rel
="stylesheet" type
="text/css" href
="tt-rss.css">
41 <!--[if gte IE
5.5000]>
42 <script type
="text/javascript" src
="pngfix.js"></script
>
44 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
49 <table width
='100%' height
='100%' class="loginForm">
51 <tr
><td align
='center' valign
='middle'>
53 <form action
="login.php" method
="POST">
55 <table
class="innerLoginForm">
57 <tr
><td valign
="middle" align
="center" colspan
="2">
58 <img src
="images/ttrss_logo.png" alt
="logo">
61 <tr
><td align
="right">Login
:</td
>
62 <td
><input name
="login"></td
></tr
>
63 <tr
><td align
="right">Password
:</td
>
64 <td
><input type
="password" name
="password"></td
></tr
>
66 <tr
><td colspan
="2" align
="center">
67 <input type
="submit" class="button" value
="Login">
77 <?
db_close($link); ?
>