<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Function.asp"-->
<!--#include file="../inc/Config.asp"-->
<!--#include file="../inc/md5.asp"-->
<%
Call ChkLogin(session("WebAdminsUserName"))
Call ConnectionDataBase(2)
Action = Request("Action")
Select Case Action
	Case "AddUsers"
		Call AddUsers
End Select
'添加会员
Sub AddUsers()
	VIP = Checkstr(Request.Form("VIP"))
	StartDate = Checkstr(Request.Form("StartDate"))
	VipGroup = Checkstr(Request.Form("UsersCategory"))
	username = Checkstr(Request.Form("username"))
	pwd = Checkstr(Request.Form("pwd"))
	nickname  = Checkstr(Request.Form("nickname"))
	question  = Checkstr(Request.Form("question"))
	answer  = Checkstr(Request.Form("answer"))
	realname  = Checkstr(Request.Form("realname"))
	sex  = Checkstr(Request.Form("sex"))
	birthday  = Checkstr(Request.Form("birthday"))
	areaid  = Checkstr(Request.Form("area"))
	email  = Checkstr(Request.Form("email"))
	address  = Checkstr(Request.Form("address"))
	postcode  = Checkstr(Request.Form("postcode"))
	tel  = Checkstr(Request.Form("tel"))
	paixv =Checkstr(Request.Form("paixv"))
	mobile  = Checkstr(Request.Form("mobile"))
	fax  = Checkstr(Request.Form("fax"))
	qq  = Checkstr(Request.Form("qq"))
	msn = Checkstr(Request.Form("msn"))
	logo = Checkstr(Request.Form("logo"))
	Banner = Checkstr(Request.Form("Banner"))
	ID = Checkstr(Request.Form("ID"))
	BusinessCard  = Checkstr(Request.Form("BusinessCard"))
	houseid  = Checkstr(Request.Form("houseid"))
	Content  = Checkstr(Request.Form("Content"))
	Business  = Checkstr(Request.Form("Business"))
	Company  = Checkstr(Request.Form("Company"))
	Recommend  = Checkstr(Request.Form("Recommend"))
	Call ChkIsNumber(ID,"对不起,参数类型错误")
	Call ChkIsNumber(Business,"对不起,成交量必须为数字")
	IF areaid="" Then areaid=0
	IF Recommend="" Then Recommend=0
	Sql="Select * From T_Users Where ID=" & ID
	SetRs Rs,Sql,conn,1,3
		IF Rs.Eof Then Rs.Addnew
		IF pwd<>"" Then Rs("UserPwd")=MD5(pwd)
		Rs("VIP")=VIP
		Rs("StartDate")=StartDate
		Rs("VipGroup")=VipGroup
		Rs("UserName")=UserName
		Rs("nickname")=nickname
		Rs("question")=question
		Rs("answer")=answer
		Rs("realname")=realname
		Rs("sex")=sex
		Rs("birthday")=birthday
		Rs("cityid")=areaid
		Rs("email")=email
		Rs("address")=address
		Rs("postcode")=postcode
		Rs("tel")=tel
		Rs("mobile")=mobile
		Rs("fax")=fax
		Rs("qq")=qq
		Rs("msn") = msn
		Rs("logo") = logo
		Rs("Banner") = Banner
		Rs("Business") = Business
		Rs("BusinessCard")=BusinessCard
		Rs("houseids")=houseid
		Rs("Company")=Company	
		Rs("Content")=Content	
		Rs("paixv")=paixv 
		Rs("Recommend")=Recommend	
		Rs.Update
	DisRs Rs
	Call CloseDatabase
	Call Success("信息提交成功!",Request.ServerVariables("HTTP_REFERER"))
End Sub
%>
