<!--#include file="../../p_inc/Include_func.asp"-->
<!--#include file="../inc/public.asp"-->
<!--#include file="../inc/openconn.asp"-->
<% 
act=true
username=Replace_Text(request.Form("username"))
password=Replace_Text(request.Form("password"))
'username=Replace_Text(request.Form("username"))
lev=Replace_Text(request.Form("lev"))
dns=Replace_Text(request.Form("dns"))
Content=Replace_Text(request.Form("Content"))
'str_tel=Replace_Text(request.Form("str_tel"))
'str_mail=trim(request.Form("str_mail"))
'remark=Replace_Text(request.Form("remark"))
'remark=replace(remark,chr(32),"&nbsp;")
'remark=replace(remark,chr(13)+chr(10),"<br>")
'str_level=clng(request.Form("str_level"))


IF  username="" Then
	response.Write("<script language=javascript>alert('此注册帐号不能为空！');window.history.back();</script>")
	response.End() 	
End IF

set rscheck=server.CreateObject("adodb.recordset")
sqlcheck="select * from [user]"
rscheck.open sqlcheck,conn,1,3,&H0001
if not rscheck.eof then
	rscheck.close
	set rscheck=nothing
	response.Write("<script language=javascript>alert('您已经添加了授权ID,请直接修改或删除再操作!！');window.history.back();</script>")
	response.End() 
else
	password=md5(password,16)
	rscheck.addnew
	rscheck("username")=username
	rscheck("password")=password
	rscheck("username")=username
	rscheck("lev")=lev
	rscheck("dns")=dns
	rscheck("Content")=Content
	'rscheck("str_mail")=str_mail
	'rscheck("remark")=remark
	'rscheck("str_level")=2
  rscheck("time")=FormatDate(now(),55)
	'rscheck("flag")=0
	rscheck.update
	rscheck.close
	set rscheck=nothing
	response.Redirect "list.asp"
	response.End()
end if

%>

