源码
<!--#include file="sub/sjlj.asp"-->
<!--#include file="sub/fun.asp"-->
<%
function changechr(str)
changechr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"<br>")," "," ")
changechr=replace(changechr,"'","‘")
changechr=replace(changechr,mid(" "" ",2,1),""")
end function
function GenID()
fname = now()
fname = replace(fname,"-","")
fname = replace(fname," ","")
fname = replace(fname,":","")
fname = replace(fname,"PM","")
fname = replace(fname,"AM","")
fname = replace(fname,"上午","")
fname = replace(fname,"下午","")
GenID = fname
end function
Name=changechr(trim(request("Name")))
If name="" Then
response.write "<script>alert('商店名不能为空!请返回!');history.back();</script>"
response.end
end if
Password = changechr(trim(request("Password")))
username = changechr(trim(request("username")))
if Password="" or username="" then
call msg("管理员密码和管理员账号不能为空!请返回!","-1")
end if
set rs = conn.execute("Select * From user Where manageid ='"&username&"'")
if not rs.eof then
call msg("此帐号已经有人使用!请返回!","-1")
end if
rs.close
set rs = nothing
ManageId = username
on error resume next
CityID =cint(request("CityID"))
DistrictID =cint(request("DistrictID"))
AreaID =cint(request("AreaID"))
Address = changechr(trim(request("Address")))
Telephone = changechr(trim(request("Telephone")))
qq = changechr(trim(request("qq")))
TimePeriod = changechr(trim(request("TimePeriod")))
JiaoTong = changechr(trim(request("JiaoTong")))
Website = changechr(trim(request("Website")))
Email = changechr(trim(request("Email")))
Recommendation = changechr(trim(request("Recommendation")))
Addtime = changechr(trim(request("Addtime")))
Intro = changechr(trim(request("Intro")))
DefaultPicUrl=changechr(trim(request("DefaultPicUrl")))
If name="" or name="admin" Then
call msg("商店名有错误!请返回!","-1")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from User"
rs.open sql,conn,1,3
rs.addnew
rs("ManageId") = ManageId
rs("Password") = Password
rs("Name") = Name
rs("CompanyLevelID")= 1 '免费
rs("CityID") = CityID
rs("DistrictID")= DistrictID
rs("AreaID") = AreaID
rs("Address") = Address
rs("Telephone") = Telephone
rs("qq") = qq
rs("TimePeriod")= TimePeriod
rs("JiaoTong") = JiaoTong
rs("Website") = Website
rs("Recommendation")= Recommendation
rs("Intro") = Intro
rs("pic") =DefaultPicUrl
rs.update
rs.close
call msg("注册成功,进入首页登陆网站!","index.asp")
set rs=nothing
conn.close
set conn=nothing
%>