-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
76 lines (72 loc) · 2.1 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
include('templates/header.html');
include("verify_login.php");
$result="";
if(isset($_POST['submit']))
{
$result = verify_login();
}
?>
<title>登录 - BuGooStore</title>
</head>
<body>
<div id="login_contain">
<div id="login_leftPart">
</div>
<div id="login_rightPart">
<form action="" method="post">
<table>
<tbody>
<tr>
<td class="fr w3em"><label for="username">Email:</label></td>
<td class="w10em"><input type="text" name="username" id="username" /></td>
</tr>
<tr>
<td class="fr w3em"><label for="password">密码:</label></td>
<td class="w10em"><input type="password" name="password" id="password" /></td>
</tr>
<tr>
<td class="fr w3em"><label for="validationcode"> 验证码:</label></td>
<td><input class="fl w4em h20px" type="text" name="validationcode" id="validationcode" maxlength="4" /><img class="fl" src="imgcode.php" alt="验证码" style="cursor:pointer;" onclick="newcode(this,this.src);"/></td>
</tr>
<tr>
<td></td>
<td><input class="" type="submit" value="登录" name="submit"/><a class="fl" href="register.php">注册</a></td>
</tr>
</tbody>
</table>
<p id="error_info" style="color:red;"><?php echo $result; ?></p>
</form>
</div>
</div>
<script type="text/javascript">
function newcode(obj,url)
{
obj.src = url + "?nowtime=" + new Date().getTime();
}
/* var res = <? echo $result ?>;
if(res)
{
document.getElementById("error_info").innerHTML = ;
switch(<? echo $result ?>)
{
case "1":
document.getElementById("error_info").innerHTML = "验证码错误!";
break;
case "2":
document.getElementById("error_info").innerHTML = "用户名不存在!";
break;
case "3":
document.getElementById("error_info").innerHTML = "密码错误!";
break;
default:
document.location.href="http://125.221.225.209/bgstore/";
break;
}
}*/
</script>
<?php
include('templates/footer.html');
?>