⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apply2.asp

📁 中国114网搜索系统 版  本: 文件大小:580 KB 软件语言:简体中文 授权方式:免费版 相关链接:程序演示 开 发 商: 运行环境:ASP源码
💻 ASP
字号:
<%'-------------------------------------------
'user表 用户表
'-------------------------------------------
'0 ID  自动编号
'1 user 用户名 20l
'2 pass 密码 20
'3 mail 信箱 60
'5 icq ICQ 长整形
'4 oicq OICQ 长整形
'6 address 地址 150
'7 sex 性别 2
'8 birthday 生日 日期
'9 applytime 申请加入时间(默认为date()&time())
'10 homepage 主页 60
'11 fashu 发表文章数目 长整形
'12 bshu 浏览文章数目 长整形
'13 unbshu 发表的文章被人浏览总次数 长整形
'-------------------------------------------
'guest表 留言内容
'ID 自动编号
'guestdata 留言内容,备注型
'user 发表此文章的用户 20
'shuyu 属于那一篇帖子的子帖,默认为0,表示是主帖 整形
'bq 表情 整形
'ndatetime  发表时间 默认为(date()&time())
'looktimes 此文章被浏览次数 长整形
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0041)http://grwy.online.ha.cn/explorer 探索者工作室 -->
<HTML><head>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<link rel="stylesheet" type="text/css" href="../html/style.css"></head>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"  background="1liv.jpg"  vlink=0000ff>
<!-- #include file=../change.asp -->
<!-- #include file=../inc/head.inc -->

<%
function strLength(str)
	dim WINNT_CHINESE
	WINNT_CHINESE=(len("例子")=2)
	if WINNT_CHINESE then
		dim l,t,c
		dim i
		l=len(str)
		t=l
		for i=1 to l
			c=asc(mid(str,i,1))
			if c<0 then c=c+65536
			if c>255 then
				t=t+1
			end if
		next
		strLength=t
	else 
		strLength=len(str)
	end if
end function

dateflag=1
error=""
user=request.form("user")
olduser=user

if user="" then
	error=error&"请输入用户名!<br>"
else
	user=replace(user,"'","''")
end if

if strLength(olduser)>10 then
	error=error&"用户名太长!<br>"
end if

password1=request.form("password1")

if password1="" then
	error=error&"请输入你的密码!<br>"
end if

if strLength(password1)>10 then
	error=error&"密码太长!<br>"
end if

password2=request.form("password2")

if password2="" then
	error=error&"请输入你的验证密码!<br>"
end if

if len(password1)>10 then
	error=error&"验证密码太长!<br>"
end if

if password1<>password2 then
	error=error&"你的两次密码输入不相同!<br>"
end if

mail=request.form("mail")
if strLength(mail)>50 then
	error=error&"你的邮箱长度不能超过50个字符<br>"
end if

homepage=request.form("homepage")
if strLength(homepage)>60 then
	error=error&"你的主页长度不能超过60个字符<br>"
end if

icq=request.form("icq")

if icq<>"" then
	if IsNumeric(icq)=0 then
		error=er0ror&"你的icq号码必须是数字!<br>"
	else 
		if icq>1999999999 then
			error=error&"你的icq号码错误!<br>"
		end if
	end if
end if

oicq=request.form("oicq")

if oicq<>"" then
	if IsNumeric(oicq)=0 then
		error=error&"你的oicq号码必须是数字!<br>"
	else
		if oicq>9999999999 then
			error=error&"你的oicq号码错误!<br>"
		end if
	end if
end if

address=request.form("address")
if strLength(address)>150 then
	error=error&"你的地址长度不能超过150个字符<br>"
end if

sex=request.form("sex")

if oicq<>"" then
	if IsNumeric(oicq)=0 then
		error=error&"OICQ号码错误!<br>"
	else
		if sex<>1 and sex<>2 then
			error=error&"你的性别错误!<br>"
		end if
	end if
end if

byear=request.form("byear")
if byear<>"" and byear<>"19" then
	if IsNumeric(byear)=0 then
		error=error&"你的出生年错误!<br>"
	else
		byear=cint(byear)
		if (byear>year(date) or byear<1900) then
			error=error&"你的出生年错误!1<br>"
		end if
	end if
else
	dateflag=0
end if

bmonth=request.form("bmonth")
if bmonth<>"" then
	if IsNumeric(bmonth)=0 then
		error=error&"你的出生月份错误!<br>"
	else
		if bmonth>12 or bmonth<0 then
			bmonth=cint(bmonth)
			error=error&"你的出生月份错误!<br>"
		end if
	end if
else
	dateflag=0
end if

bday=request.form("bday")
if bday<>"" then
	if IsNumeric(bday)=0 then
		error=error&"你的出生日期错误!<br>"
	else
		if bday>31 or bday<0 then
			bday=cint(bday)
			error=error&"你的出生日期错误!<br>"
		end if
	end if
else
	dateflag=0
end if

select case sex
	case 1: sex="男"
	case 2: sex="女"
	case else:sex="密"
end select

homepage=request.form("homepage")
if error<>"" then
	response.write "<table border=0 align=center><tr><td><p><br>"&error&"<a href=apply.asp>返回</a></td></tr></table>"
	%>
	 <hr width=700 align=center size=1 color=<%=tablebgcolorbian%>>
 	<!-- #include file=../inc/end.inc -->
 	<%
	response.end
end if
birthday=""
if dateflag=1 then birthday=dateserial(byear,bmonth,bday)

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select TOP 1 * from ourusers where username='"&user&"'"
%>
<!-- #include file=../database.asp -->
<%
rs.open sql,conn,1,3
if not rs.bof and not rs.eof then
response.write "<table border=0 align=center><tr><td><p><br>用户名"&server.htmlencode(user)&"已被人申请,请用其它用户名!<a href=apply.asp>返回</a></td></tr></table>"
rs.close
set rs=nothing
%>
<hr width=700 align=center size=1 color=<%=tablebgcolorbian%>>
<!-- #include file=../inc/end.inc -->
<%
conn.close
set conn=nothing
response.end
end if
rs.addnew
rs("username")=olduser
rs("pass")=password1
if icq<>"" then rs("icq")=icq
if oicq<>"" then rs("oicq")=oicq
if mail<>"" then rs("mail")=mail
rs("sex")=sex
if birthday<>"" then rs("birthday")=birthday
if homepage<>"" then rs("homepage")=homepage
rs("applytime")=date&" "&time
rs("fen")=0
rs("address")=address
rs.Update
%>
<table border=0 align=center><tr><td>

<p><br><br>登记成功,你的资料如下:<br>
用户名:<%=server.htmlencode(rs("username"))%><br>
密码:<%=rs("pass")%><br>
ICQ号码:<%=rs("icq")%><br>
OICQ号码:<%=rs("oicq")%><br>
E-mail:<%if rs("mail")<>"" then%><a href="mailto:<%=server.htmlencode(rs("mail"))%>"><%=server.htmlencode(rs("mail"))%></a><%end if%><br>
性别:<%=rs("sex")%><br>
生日:<%=rs("birthday")%><br>
登记时间:<%=rs("applytime")%><br>
主页地址:<%if rs("homepage")<>"" then%><a href=<%=server.htmlencode(rs("homepage"))%> target=_blank><%=server.htmlencode(rs("homepage"))%></a><% end if%><br>
你的地址:<% if rs("address")<>"" then%><%=server.htmlencode(rs("address"))%><%end if%><br>
<a href=../join/chooseassort.asp>开始网站登记</a></td></tr></table>
<%rs.close
set rs=nothing
conn.close
set conn=nothing
%>
 <hr width=700 align=center size=1 color=<%=tablebgcolorbian%>>
 <!-- #include file=../inc/end.inc -->
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -