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

📄 author_modprofilepost.asp

📁 本源代码为终点小说连载系统 v1.15 Build 0430 SQL清风修改版,欢迎大家下载,学习与交流
💻 ASP
字号:
<%
author_ID=session("author_ID")
author_name=session("author_name")
If author_name="" or author_ID="" or IsNull(WordID) Then
	Response.Write ("<script>alert(' 操作错误 \n\n 可能您还没有登陆或者登陆超时 ');location.href='authorlog_login.asp';</script>")
	Response.End
End If
set rs=server.createobject("adodb.recordset")
sql="select * from [author] where author_ID="&author_ID&""
rs.open sql,conn,1,1
if rs.eof and rs.bof then
	Response.Write ("<script>alert('   操作错误!\n\n 用户不存在。');history.back();</script>")
	Response.end
End If
If rs("author_addpost")=0 Then
	Response.Write ("<script>alert(' 操作错误 \n\n 您的驻站申请尚未被管理员通过 \n\n 请先联系本站站长或管理员通过您的申请 ');location.href='authorlog_login.asp';</script>")
	Response.End
End If
If rs("author_lock")=1 Then
	Response.Write ("<script>alert(' 操作错误 \n\n 您的驻站权限被锁定不能发表新作 \n\n 请先联系本站站长或管理员帮您解锁 ');location.href='authorlog_login.asp';</script>")
	Response.End
End If
dim author_sex,author_Email,author_face,author_resume,author_ICQ,author_QQ
author_Email=trim(Request.Form("author_Email"))
author_face=trim(Request.Form("author_face"))
author_resume=trim(Request.Form("author_resume"))
author_ICQ=trim(Request.Form("author_ICQ"))
author_QQ=trim(Request.Form("author_QQ"))
author_sex=Request("author_sex")

if author_sex="" then
	founderr=1
	errmsg=errmsg & "<br><li>性别不能为空!</li>"
end if

if author_resume="" then
	founderr=1
	errmsg=errmsg & "<br><li>个人简介不能为空!</li>"
end if
if strLength(author_resume)>800 then
	founderr=1
	errmsg=errmsg & "<br><li>个人简介不能大于800</li>"
end if

if author_face="" then
	founderr=1
	errmsg=errmsg & "<br><li>头像不能为空!</li>"
end if

if author_Email="" then
	founderr=1
	errmsg=errmsg & "<br><li>Email不能为空!</li>"
else
	if IsValidEmail(author_Email)=0 then
		errmsg=errmsg & "<br><li>您输入的Email有错误!</li>"
   		founderr=1
	end if
end if
if author_QQ<>"" then
	if not isnumeric(author_QQ) or len(cstr(author_QQ))>12 then
		errmsg=errmsg & "<br><li>QQ号码只能是4-12位数字,您可以选择不输入。</li>"
		founderr=1
	end if
end if

if founderr=0 then
	dim sqlReg,rsReg
	sqlReg="select * from [author] where author_id="&author_ID&""
	set rsReg=server.createobject("adodb.recordset")
	rsReg.open sqlReg,conn,1,3
	if rsReg.bof and rsReg.eof then
		founderr=1
		errmsg=errmsg & "<br><li>用户不存在!</li>"
	else
		rsReg("author_Email")=author_Email
		rsReg("author_sex")=author_sex
		rsReg("author_face")=author_face
		rsReg("author_ICQ")=author_ICQ
		rsReg("author_QQ")=author_QQ
		rsReg("author_resume")=author_resume
		rsReg("author_logDate")=Now()
		rsReg("author_ADDDate")=Now()
		rsReg.update
	end if
	rsReg.close
	set rsReg=nothing
end if	
%><%
if founderr=0 then
	call RegSuccess()
else
	call WriteErrmsg()
end if
%>
<%
sub WriteErrMsg()
    response.write "<table align='center' width='380' border='0' cellpadding='0' cellspacing='0' class='border'>"
    response.write "<tr class='title'><td align='center' height='30' class='font'>由于以下的原因作家资料修改失败!</td></tr>"
    response.write "<tr class='tdbg'><td align='left' height='150' class='font'><br>" & errmsg & "<p align='center'>【<a href='javascript:onclick=history.go(-1)'>返 回</a>】<br></p></td></tr>"
	response.write "</table>" 
end sub

sub RegSuccess()
    response.write "<table align='center' width='380' border='0' cellpadding='0' cellspacing='0' class='border'>"
    response.write "<tr class='title'><td align='center' height='30' class='font'>作家资料修改成功!</td></tr>"
	response.write "<tr class='title'><td align='center' height='30' class='font'>【<a href='authorlog_login.asp'> 登 陆 </a>】<br></td></tr>"
	response.write "</table>" 
end sub
%>

⌨️ 快捷键说明

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