[编程论坛] ASP超级群:49158383 敲门暗号:ASP编程
龍艺博客 http://www.
<!--#include file="conn.asp"-->
<html>
<head>
<title>XXXXX</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="5; url=right.htm">
<SCRIPT language=JavaScript>
<!--
function RegFrom_onsubmit() {
if(document.Regfrom.idtext.value=="")
{
alert("请填写[会员帐号],然后再[提交申请].")
document.Regfrom.idtext.focus()
return false
}
else if(document.Regfrom.pwdtext.value=="")
{
alert("请填写[密码],然后再[提交申请].")
document.Regfrom.pwdtext.focus()
return false
}
else if(document.Regfrom.pwdtext2.value=="")
{
alert("请填写[密码确定],然后再[提交申请].")
document.Regfrom.pwdtext2.focus()
return false
}
else if(document.Regfrom.pwdtext.value!=document.Regfrom.pwdtext2.value)
{
alert("两次填写的密码不一致,请确定密码正确.")
document.Regfrom.pwdtext2.focus()
return false
}
else if(document.Regfrom.wttext.value=="")
{
alert("请填写[电子邮件],然后再[提交申请].")
document.Regfrom.wttext.focus()
return false
}
}
-->
</SCRIPT>
<style type="text/css">
<!--
body,td,th {
font-family: Tahoma;
font-size: 12px;
color: #333333;
}
.MainFront {
font-family: Tahoma;
font-size: 12px;
color: #000000;
}
.RedFront {
font-family: Tahoma;
font-size: 12px;
color: #FF0000;
}
.STYLE3 {font-size: 16px}
.STYLE4 {font-size: 14px}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="500" height="250" border="0" align="left" cellspacing="0">
<tr>
<td align="center"><p>
<table width="384" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
if request.Form("idtext")<>"" then
set myrec=server.CreateObject("ADODB.Recordset")
set rs=server.CreateObject("ADODB.Recordset")
myrec.open "Users",conn,3,3
sql="select * from users where name='"&request.Form("idtext")&"'"
rs.open sql,conn,1,1
if not rs.eof then
conn.close
set rs=nothing
set myrec=nothing
set conn=nothing
%>
<td width="113"><p><span class="STYLE4">很遗憾 你的帐号已被人注册</span></p>
<p><a href="rep.htm">请从新注册</a>
<%else%>
</p>
<td width="205"><p><span class="STYLE4">恭喜你 你的帐号注册成功.<br>请在上方登陆您的帐号</span></p>
<p>
<%
myrec.addnew
myrec("name")=request.Form("idtext")
myrec("word")=request.Form("pwdtext")
myrec("key1")=request.Form("wttext")
myrec.update
conn.close
set rs=nothing
set myrec=nothing
set conn=nothing
end if
else
response.Redirect("right.htm")
end if
%>
</p></td>
</tr>
<tr>
<td></td>
</tr>
</table>
<p>
</td>
</tr>
</table>
</body>
</html>
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/fttp.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("name"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="topy.asp"
MM_redirectLoginFailed="topf.html"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_fttp_STRING
MM_rsUser.Source = "SELECT name, word"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM users WHERE name='" & Replace(MM_valUsername,"'","''") &"' AND word='" & Replace(Request.Form("psd"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And false Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>国际商业信息交流网(暂定)</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="css/ys1682.css"
type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.3132" name=GENERATOR>
<style type="text/css">
<!--
.STYLE2 {font-size: 5px}
.MainFront {
font-family: Tahoma;
font-size: 10px;
color: #000000;
}
-->
</style>
</HEAD>
<BODY>
<form action="<%=MM_LoginAction%>" method="POST" name="login" id="login">
<img src="未标题-7副本.jpg" >
<DIV id=topnav>
<a>用户名</a>
<input name="name" type="text" class="MainFront" size="13" maxlength="20">
<a >密码</a>
<input name="psd" type="password" class="MainFront" size="13" maxlength="20">
<INPUT class=stbtm type=submit value=登录 name=submit>
<a href="rep.htm" target="mainFrame"/><img src="images/3721.gif" border="0" align="top" ></a>
</DIV>
</form>
</body>
</html>
<%@
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And false Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>国际商业信息交流网(暂定)</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="css/ys1682.css"
type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.3132" name=GENERATOR>
<style type="text/css">
<!--
.STYLE2 {font-size: 5px}
.MainFront {
font-family: Tahoma;
font-size: 10px;
color: #000000;
}
-->
</style>
</HEAD>
<BODY>
<form action="<%=MM_LoginAction%>" method="POST" name="login" id="login">
<img src="未标题-7副本.jpg" >
<DIV id=topnav>
<a>用户名</a>
<input name="name" type="text" class="MainFront" size="13" maxlength="20">
<a >密码</a>
<input name="psd" type="password" class="MainFront" size="13" maxlength="20">
<INPUT onclick="goUrl()" class=stbtm type=submit value=登录 name=submit >
<script>
function goUrl
{
window.parent.mainFrame.location.href="right.htm";
}
</script>
<a href="rep.htm" target="mainFrame"/><img src="images/3721.gif" border="0" align="top" ></a>
</DIV>
</form>
</body>
</html>