]> git.wh0rd.org - tt-rss.git/blame - login.php
possible fix for possible tag bug
[tt-rss.git] / login.php
CommitLineData
46a1969d
AD
1<?
2 session_start();
3
4 require_once "version.php";
5 require_once "config.php";
c8437f35 6 require_once "functions.php";
46a1969d 7
c8437f35
AD
8 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
9
10 $login = $_POST["login"];
11 $password = $_POST["password"];
12
13 if ($login && $password) {
14 if (authenticate_user($link, $login, $password)) {
e6cb77a0 15 initialize_user_prefs($link, $_SESSION["uid"]);
c8437f35
AD
16 header("Location: tt-rss.php");
17 }
18 }
46a1969d
AD
19
20?>
21<html>
22<head>
23 <title>Tiny Tiny RSS : Login</title>
24 <link rel="stylesheet" type="text/css" href="tt-rss.css">
25 <!--[if gte IE 5.5000]>
26 <script type="text/javascript" src="pngfix.js"></script>
27 <![endif]-->
28 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
29</head>
30
31<body>
32
c8437f35
AD
33<form action="login.php" method="POST">
34
46a1969d
AD
35<table width='100%' height='100%' class="loginForm">
36
37 <tr><td align='center' valign='middle'>
38
39 <table class="innerLoginForm">
40
41 <tr><td valign="middle" align="center" colspan="2">
42 <img src="images/ttrss_logo.png" alt="logo">
43 </td></tr>
44
45 <tr><td align="right">Login:</td>
46 <td><input name="login"></td></tr>
47 <tr><td align="right">Password:</td>
48 <td><input type="password" name="password"></td></tr>
c8437f35
AD
49
50 <tr><td colspan="2" align="center">
51 <input type="submit" class="button" value="Login">
52 </td></tr>
46a1969d
AD
53
54 </table></td></tr>
55</table>
56
c8437f35
AD
57</form>
58
59<? db_close($link); ?>
60
46a1969d
AD
61</body>
62</html>