forked from RomanSixty/Feed-on-Feeds
-
Notifications
You must be signed in to change notification settings - Fork 3
/
login.php
executable file
·80 lines (70 loc) · 1.73 KB
/
login.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
/*
* This file is part of FEED ON FEEDS - http://feedonfeeds.com/
*
* login.php - username / password entry
*
*
* Copyright (C) 2004-2007 Stephen Minutillo
* [email protected] - http://minutillo.com/steve/
*
* Distributed under the GPL - see LICENSE
*
*/
ob_start();
$fof_no_login = true;
include_once "fof-main.php";
if (defined('FOF_AUTH_EXTERNAL_ONLY')) {
header('Location: .');
exit();
}
fof_set_content_type();
$failed = false;
if (isset($_POST["user_name"]) && isset($_POST["user_password"])) {
$user_password_hash = fof_db_user_password_hash($_POST['user_password'], $_POST['user_name']);
if (fof_authenticate($_POST['user_name'], $user_password_hash)) {
header("Location: .");
exit();
} else {
$failed = true;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Feed on Feeds - Log on</title>
<style>
body
{
font-family: georgia;
font-size: 16px;
}
div
{
background: #eee;
border: 1px solid black;
width: 20em;
margin: 5em auto;
padding: 1.5em;
}
</style>
</head>
<body>
<div>
<form action="login.php" method="POST" style="display: inline">
<center><a href="http://feedonfeeds.com/" style="font-size: 20px; font-family: georgia;">Feed on Feeds</a></center><br>
User name:<br><input type=string name=user_name style='font-size: 16px'><br><br>
Password:<br><input type=password name=user_password style='font-size: 16px'><br><br>
<input type=submit value="Log on!" style='font-size: 16px; float: right;'><br>
<?php
if ($failed) {
?>
<br><center><span style="color:red"><b>Incorrect user name or password</b></span></center>
<?php
}
?>
</form>
</div>
</body>
</html>