-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchange.php
More file actions
147 lines (147 loc) · 8.51 KB
/
Copy pathchange.php
File metadata and controls
147 lines (147 loc) · 8.51 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?php
include("conn.php");
if ($_GET["act"]=="change")
{
$id = $_POST["id"];
$pass = $_POST["pass"];
$oldpass = $_POST["oldpass"];
$mlhy = $_POST["mlhy"];
$query = "select AccountID,AccountPassword from tbl_user where AccountID='$id' AND AccountPassword='$oldpass' AND mlhy='$mlhy'" ;
$result = mysql_query($query);
if (mysql_num_rows($result)>0){
$userid = mysql_result($result, 0, 0);
$user_pass = mysql_result($result, 0, 1);
}
else
Error("用户名、密码或安全码错误!");
if ($id == $userid and $oldpass == $user_pass) {
$query = "UPDATE `tbl_user` SET `AccountPassword` = '$pass' WHERE `AccountID` = '$id' LIMIT 1";
$result = mysql_query($query);
if ($result) {
Error("修改成功,您的新密码为:\\r$pass\\r请记住你的密码并妥善保管");
}
}
else
{
Error("用户名或密码错误");
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE><?=$title?>-修改密码</TITLE>
<NOSCRIPT><IFRAME SRC="*.html"></IFRAME></NOSCRIPT>
<body oncontextmenu="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false">
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css.css" type="text/css">
<script language="JavaScript">
function isValid(){
if(document.reg.id.value.length <4 || document.reg.id.value.length >16)
{
alert("温馨提示:游戏帐号长度应在4-16位[限英文和数字]!");
document.reg.id.focus();
return false;
}
if(document.reg.oldpass.value.length <4 || document.reg.oldpass.value.length >16)
{
alert("温馨提示:旧密码长度应在4-16位[限英文和数字]!");
document.reg.oldpass.focus();
return false;
}
if(document.reg.mlhy.value.length <4 || document.reg.mlhy.value.length >16)
{
alert("温馨提示:安全码长度应在4-16位[限英文和数字]!");
document.reg.mlhy.focus();
return false;
}
if (reg.oldpass.value == reg.pass.value)
{
alert("温馨提示:旧密码不能与新密码一样!");
document.reg.pass.value = ""
document.reg.pass2.value = ""
document.reg.pass.focus();
return false;
}
if(document.reg.pass.value.length <4 || document.reg.pass.value.length >16)
{
alert("温馨提示:游戏密码长度应在4-16位[限英文和数字]!");
document.reg.pass.focus();
return false;
}
if (reg.pass.value != reg.pass2.value)
{
alert("温馨提示:两次输入的密码不一致,请重新输入!");
document.reg.pass2.value = ""
document.reg.pass2.focus();
return false;
}
}
</script>
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
</HEAD>
<BODY bottomMargin=0 leftMargin=0 topMargin=0 rightMargin=0>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY><TR><TD align=middle bgColor=#e4dbd1>
<TABLE height=590 cellSpacing=0 cellPadding=0 width=980 border=0>
<TBODY><TR><TD>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY><TR><TD width=390><TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY><TR><TD height=130><TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY><TR><TD colSpan=3 height=20><IMG height=20 src="image/main_logo_top.jpg" width=390 border=0></TD></TR><TR>
<TD width=10 height=110><IMG height=110 src="image/main_logo_left.jpg" width=10 border=0></TD>
<TD width=300 height=110><img height=110 src="image/main_logo_main.jpg" width=300 border=0></TD>
<TD width=80 height=110><IMG height=110 src="image/main_logo_right.jpg" width=80 border=0></TD></TR></TBODY></TABLE></TD></TR>
<TR><TD background="image/main_left.jpg" height=460>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY><TR><TD vAlign=top align=right colSpan=3 height=400><a href="rank.php?id=lv">
<IMG height=70 src="image/rank.jpg" width=30 border=0></a></TD>
</TR><TR>
<TD width=90 height=60></TD><TD vAlign=top align=middle width=220 height=60> </TD>
<TD width=80 height=60></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD><TD width=590>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD height=100>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR>
<TD width=140><a href="name.php"><img height=100 src="image/icon_1.jpg" width=140 border=0></a></TD>
<TD width=140><a href="reg.php"><IMG height=100 src="image/icon_2.jpg" width=140 border=0></a></TD>
<TD width=140><a href="down.php"><IMG height=100 src="image/icon_3.jpg" width=140 border=0></a></TD>
<TD width=140><a href="<?=$bbsurl?>"><IMG height=100 src="image/icon_4.jpg" width=140 border=0></a></TD>
<TD width=30><IMG height=100 src="image/main_icon_right.jpg" width=30 border=0></TD></TR></TBODY></TABLE></TD></TR>
<TR><TD height=460><TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY><TR><TD align=middle width=560 background="image/main_content.jpg">
<DIV style="OVERFLOW-Y: auto; OVERFLOW-X: auto; WIDTH: 550px; HEIGHT: 450px">
<TABLE style="BACKGROUND-ATTACHMENT: scroll" height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY><TR><TD vAlign=top><TABLE cellSpacing=0 cellPadding=0 width=530 border=0>
<TBODY><TR><TD vAlign=top width=150><TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY><TR><TD><IMG height=15 src="image/menu_bar_top.gif" width=150 border=0></TD></TR><TR>
<TD align=middle background="image/menu_bar_bg.gif">
<TABLE cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD><a href="reg.php"><IMG height=45 src="image/reg.jpg" width=140 border=0></a></TD>
</TR>
<TR><TD><p><IMG height=45 src="image/reg_repasswd.jpg" width=140 border=0><br>
<a href="lost.php"><img src="image/reg_getpw.jpg" width="140" height="45" border="0"></a><a href="id.php"></a></p>
</TD></TR><TR><TD><a href="index.php"><img height=45 src="image/index.jpg" width=140 border=0></a></TD>
</TR></TBODY></TABLE></TD></TR><TR><TD><img height=180 src="image/menu_bar_bottom.gif" width=150 border=0></TD>
</TR></TBODY><form action='change.php?act=change' method='post' name="reg" id="reg" onSubmit="return isValid()">
</TABLE></TD><TD vAlign=top align=middle>
<TABLE cellSpacing=0 cellPadding=0 width=380 border=0>
<TBODY><TR><TD><IMG height=45 src="image/repasswd.gif" width=380 border=0></TD>
</TR><TR><TD style="PADDING-TOP: 10px" align=middle background="image/bg_01.gif">
<TABLE cellSpacing=0 cellPadding=0 width=320 align=center border=0><TR><TD style="COLOR: red" align=middle colSpan=2></TD></TR><TR><TD align=right>游戏帐号:</TD><TD><font face="Arial, Helvetica, sans-serif">
<INPUT name=id class=formborder id="id" style="WIDTH: 150px; HEIGHT: 20px" tabIndex=1 maxlength="16" onKeyDown="if(event.keyCode==13)event.keyCode=9" onKeyUp="value=value.replace(/[\W]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
</font></TD></TR><TR><TD align=right>旧密码:</TD>
<TD><input name=oldpass type=password class=formborder id="oldpass" style="WIDTH: 150px; HEIGHT: 20px" tabindex=2 maxlength="16" onKeyDown="if(event.keyCode==13)event.keyCode=9" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"></TD>
</TR>
<TR>
<TD align=right>安全码:</TD>
<TD><font face="Arial, Helvetica, sans-serif">
<INPUT name=mlhy class=formborder id="mlhy" style="WIDTH: 150px; HEIGHT: 20px" tabIndex=3 maxlength="16" onKeyDown="if(event.keyCode==13)event.keyCode=9" onKeyUp="value=value.replace(/[\W]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
</font></TD>
</TR>
<TR>
<TD align=right>新密码:</TD>
<TD><input name=pass type=password class=formborder id="pass" style="WIDTH: 150px; HEIGHT: 20px" tabindex=4 maxlength="16" onKeyDown="if(event.keyCode==13)event.keyCode=9" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"></TD>
</TR><TR><TD align=right>确认密码:</TD>
<TD><input name=pass2 type=password class=formborder id="pass2" style="WIDTH: 150px; HEIGHT: 20px" tabindex=5 maxlength="16" onKeyDown="if(event.keyCode==13)event.keyCode=9" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"></TD></TR><TR><TD class=name_F align=middle colSpan=2 height=14> </TD>
</TR><TR><TD align=middle colSpan=2><font face="Arial, Helvetica, sans-serif"><input type="submit" name="imageField" tabIndex=5 value="修改">
</font></TD></TR></TABLE></TD></TR>
<TR><TD><IMG height=25 src="image/bottom_01.gif" width=380 border=0></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
<TD width=30><IMG height=460 src="image/main_right.jpg" width=30 border=0></TD></TR></TBODY></TABLE></TD></TR>
<TR><TD height=30><IMG height=30 src="image/main_footer.jpg" width=590 border=0></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</BODY></HTML>