ASP LULU REG program

Newbie Spellweaver
Joined
Nov 6, 2004
Messages
16
Reaction score
0
<%Response.Expires=-1
sub errors(kk)
response.write "<script language='javascript'>" & chr(13)
response.write "alert('"&kk&"');" & Chr(13)
response.write "history.go(-1);"&Chr(13)
response.write "</script>" & Chr(13)
response.end
end sub

if Request.form("Submit")<>"" then
u=replace(Request.form("username"),"'","")
u1=u
p=replace(Request.form("passwd"),"'","")
if u="" or p="" then errors("username or password must in!")
sql="select strClientID from USERINFOBASE where strClientID='"&u&"'"
set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={SQL Server**;server=(local);uid=AccountDB;pwd=111111;database=AccountDB;"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,3,1
if rs.recordcount>0 then
rs.close
conn.close
set rs=nothing
set conn=nothing
errors("please change a user name")
end if
rs.close
set rs=nothing
sql="insert into USERINFOBASE (strClientID,strPasswd,strName,strSocNo,strPostalCode,strAddrbase,strPhoneNo,timeLog) values ('"&u&"','"&p&"','"&u1&"','770707-1******','555-555','"&u1&"','02-555-5555','2008-1-1')"
conn.execute sql
conn.close
set conn=nothing

response.write "now you can join ip 202.97.175.46 port 15100" & Chr(13)
response.end
end if%>
<html>
<head>
<title>luluReg</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="index.asp">
<div align="center">LULUREG <br>
<br>
</div>
<table width="220" border="0" cellspacing="3" cellpadding="0" align="center">
<tr>
<td width="100" align="right">USERNAME</td>
<td>
<input type="text" name="username" size="16" maxlength="16">
</td>
</tr>
<tr>
<td align="right">PASSWORD</td>
<td>
<input type="password" name="passwd" maxlength="16" size="16">
</td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" name="Submit" value="REG">
</td>
</tr>
</table>
</form>
<p> </p>
<form name="form2" method="post" action="changp.asp">
<p align="center">CHANGE PASS</p>
<table width="220" border="0" cellspacing="3" cellpadding="0" align="center">
<tr>
<td width="100" align="right">USERNAME</td>
<td>
<input type="text" name="username" size="16" maxlength="16">
</td>
</tr>
<tr>
<td align="right">OLD PASS</td>
<td>
<input type="password" name="oldp" maxlength="16" size="16">
</td>
</tr>
<tr>
<td align="right">NEW PASS</td>
<td>
<input type="password" name="newp" maxlength="16" size="16">
</td>
</tr>
<tr>
<td align="right">TWAIN PASS</td>
<td>
<input type="password" name="newp2" maxlength="16" size="16">
</td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" name="Submit2" value="RECTIFY">
</td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>

-------------------------------
save *.asp
 
Back