-
Notifications
You must be signed in to change notification settings - Fork 2
/
login_action.php
executable file
·42 lines (35 loc) · 1.08 KB
/
login_action.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
<?php
include ('lib/twitese.php');
$title = "登陆";
include ('inc/header.php');
include ('acl.php');
?>
<div id="login_area">
<div id="error">
<?php
if ( isset($_POST['username']) && isset($_POST['password']) && (isAllow($_POST['username']))) {
//附加密码
if ( TWITESE_PASSWORD != '' && $_POST['twitese_password'] != TWITESE_PASSWORD) {
echo "<p>附加密码错误。<a href='login.php'>返回重新登录</a></p>";
} else {
$remember = isset($_POST['remember']) ? true : false;
$result = verify($_POST['username'], $_POST['password'], $remember);
if ($result === 'password') {
echo "<p>登陆失败,用户名密码错误,请返回重试</p>";
} else if ($result === 'noconnect') {
echo "<p>登陆失败,服务器连接不上twitter,请检查API</p>";
} else if (!$result) {
echo "<p>登陆失败,未知错误</p>";
} else {
header('location: index.php');
}
}
} else {
sendDenyMessage(isset($_POST['username']) ? $_POST['username'] : "未知用户");
}
?>
</div>
</div>
<?php
include ('inc/footer.php');
?>