Write data to Notepad, a way to determine how a password is modified

Source: Internet
Author: User
Tags chr
Data <% @language = "Vbscript"%>
<% response.expires=0%>
<% if session ("fz_login") = "8" then%>
<%
If Request.ServerVariables ("http_method") = "POST" and checkme<> "true" then
Username=request.form ("username")
Password=request.form ("password")
Set Fs=server. CreateObject ("Scripting.FileSystemObject")
Set f = fs. OpenTextFile (server. MapPath ("userpw.asp"), 2, True)
F.writeline "<%"
F.writeline "P_username=" & Chr (+) & username & Chr (34)
F.writeline "p_password=" & Chr (+) & password & Chr (34)
F.writeline chr (Panax) & ">"
F.close
Set f=nothing
Set fs=nothing
Session ("Logusername") =username
Session ("Logpassword") =password
Edit_ok
End If
%>
<%sub EDIT_OK ()%>
<script language= "JavaScript" >
Alert ("Your username and password have been successfully modified!");
Document.location.href= "welcome.htm";
</script>
<%end sub%>

<script language= "JavaScript" >
function Checkform () {
if (document.form1.username.value== "") {
Alert ("Please enter a new user name and cannot be empty!");
Document.form1.username.focus ();
return false;
}

if (document.form1.password.value== "") {
Alert ("Please enter a new password!");
Document.form1.password.focus ();
return false;
}

if (document.form1.username.value.length<6 | | document.form1.password.value.length<6) {
Alert ("For network security, please enter a username and password greater than 6 characters!");
Document.form1.username.value= "";
Document.form1.password.value= "";
Document.form1.password1.value= "";
return false;
}

if (Document.form1.password1.value!=document.form1.password.value) {
Alert ("The password you entered is inconsistent!");
Document.form1.password1.focus ();
Document.form1.password1.value= "";
return false;
}

if (confirm) ("Do you really want to change the password?") ") ==false) {
Document.location.href= "welcome.htm";
return false;}
Else
return true;

}
</script>
<meta name= "Robots" content= "None" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<link rel= "stylesheet" href= "Images/font.css" type= "Text/css" >

<body bgcolor= "#9CC7EF" leftmargin=0 marginwidth= "0" topmargin=0>
<table width=530 border= "0" cellspacing= "0" cellpadding= "0" align= "center" >
&LT;TR align= "center" bgcolor= "<%=main_color%>" >
<td>
<table width= "100%" border= "1" cellspacing= "1" cellpadding= "4" class= "P9" bordercolorlight= "#1059A5" bordercolordark= "#9CC7EF" >
<form name= "Form1" method= "Post" action= "edit_pws.asp" onsubmit= "Javascript:return Checkform" (); " >
<tr>
&LT;TD height= ">"
<div align= "center" ><span style= "font-size:14.9px" ><b><font color= "<%=maintitle_color%" > "> Repair
Change Administrator account </font></b></span></div>
</td>
</tr>
<tr bgcolor= "<%=textzero_color%>" >
&LT;TD height= align= "center" > New username: <input type= "text" name= "username" size=30 class= "P9" >
</td>
</tr>
<tr bgcolor= "<%=textzero_color%>" >
&LT;TD align= "center" height= > New password: <input type= "password" name= "password" size=30 class= "P9" >
</td>
</tr>
<tr bgcolor= "<%=textzero_color%>" >
&LT;TD align= "center" height= "> Authentication password:



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.