1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-08 08:01:32 +00:00

optional login form/http basic auth support

This commit is contained in:
Andrew Dolgov
2005-11-18 07:21:24 +01:00
parent 1c7f75ed2c
commit c8437f35c6
5 changed files with 61 additions and 18 deletions

View File

@@ -3,9 +3,18 @@
require_once "version.php";
require_once "config.php";
require_once "functions.php";
$_SESSION["uid"] = PLACEHOLDER_UID; // FIXME: placeholder
$_SESSION["name"] = PLACEHOLDER_NAME;
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
$login = $_POST["login"];
$password = $_POST["password"];
if ($login && $password) {
if (authenticate_user($link, $login, $password)) {
header("Location: tt-rss.php");
}
}
?>
<html>
@@ -20,6 +29,8 @@
<body>
<form action="login.php" method="POST">
<table width='100%' height='100%' class="loginForm">
<tr><td align='center' valign='middle'>
@@ -34,9 +45,17 @@
<td><input name="login"></td></tr>
<tr><td align="right">Password:</td>
<td><input type="password" name="password"></td></tr>
<tr><td colspan="2" align="center">
<input type="submit" class="button" value="Login">
</td></tr>
</table></td></tr>
</table>
</form>
<? db_close($link); ?>
</body>
</html>