]>
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 $url_path = get_script_urlpath();
10 $redirect_base = "http://" . $_SERVER["SERVER_NAME"] . $url_path;
12 if (SINGLE_USER_MODE
) {
13 header("Location: $redirect_base/tt-rss.php");
17 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
19 $login = $_POST["login"];
20 $password = $_POST["password"];
22 if ($login && $password) {
23 if (authenticate_user($link, $login, $password)) {
24 initialize_user_prefs($link, $_SESSION["uid"]);
26 if ($_SESSION["login_redirect"]) {
27 $redirect_to = $_SESSION["login_redirect"];
29 $redirect_to = "tt-rss.php";
31 header("Location: $redirect_base/$redirect_to");
36 $_SESSION["login_redirect"] = $_GET["rt"];
42 <title
>Tiny Tiny RSS
: Login
</title
>
43 <link rel
="stylesheet" type
="text/css" href
="tt-rss.css">
44 <!--[if gte IE
5.5000]>
45 <script type
="text/javascript" src
="pngfix.js"></script
>
47 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
52 <table width
='100%' height
='100%' class="loginForm">
54 <tr
><td align
='center' valign
='middle'>
56 <form action
="login.php" method
="POST">
58 <table
class="innerLoginForm">
60 <tr
><td valign
="middle" align
="center" colspan
="2">
61 <img src
="images/ttrss_logo.png" alt
="logo">
64 <tr
><td align
="right">Login
:</td
>
65 <td
><input name
="login"></td
></tr
>
66 <tr
><td align
="right">Password
:</td
>
67 <td
><input type
="password" name
="password"></td
></tr
>
69 <tr
><td colspan
="2" align
="center">
70 <input type
="submit" class="button" value
="Login">
80 <?
db_close($link); ?
>