<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Const dbdns="../"%>
<!--#include file="../AppCode/Conn.asp"-->
<!--#include file="../AppCode/fun/function.asp"-->
<!--#include file="../AppCode/fun/md5.asp"-->
<!--#include file="../AppCode/Class/Ok3w_User.asp"-->

<%
Dim ErrStr

Select Case Request.Form("action")
		
	Case "Reg"
		If Session("ValidCode") = "" Or Session("ValidCode")<>Ucase(Request.Form("ValidCode")) Then
			ErrStr = "验证码输入错误，请重新输入。"
		Else
			Set User = New Ok3w_User
			Call User.UserReg()
			Set User = Nothing
			Response.Redirect("./")
		End If
		
	Case "Login"
		If Session("ValidCode") = "" Or Session("ValidCode")<>Ucase(Request.Form("ValidCode")) Then
			ErrStr = "验证码输入错误，请重新输入。"
		Else
			User_Name = Replace(Trim(Request.Form("User_Name")),"'","")
			User_Password = Replace(Trim(Request.Form("User_Password")),"'","")
			Set User = New Ok3w_User
			If User.Login(User_Name,MD5(User_Password)) = -1 Then
				Response.Redirect("./")
			Else
				ErrStr = "用户名或是密码错误，请重新输入。"
			End If
		End If		
End Select

Set Rs = Nothing
Call CloseConn()

Call MessageBox(ErrStr,"")
%>