📄 savefl.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="format.asp"-->
<!--#include file="error.asp"-->
<link rel="stylesheet" href="site_css.css" type="text/css">
<%
dim founderr,errmsg,isimage
isimage=true
founderr=false
errmsg=""
opensites
sql="select * from friendlink"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
if trim(request.form("fl_name"))="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>站点名称未填写!"
else
if strLength(trim(request.form("fl_name")))>50 then
founderr=true
errmsg=errmsg+"<br>"+"<li>站点名称太长,不可以超过50个字符!"
else
rs("fl_name")=trim(request.form("fl_name"))
end if
end if
if trim(request.form("fl_url"))="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>站点地址未填写!"
else
if strLength(trim(request.form("fl_url")))>150 then
founderr=true
errmsg=errmsg+"<br>"+"<li>站点地址太长,不可以超过150个字符!"
else
rs("fl_url")=trim(request.form("fl_url"))
end if
end if
if cint(request.Form("flcat_id"))<1 then
founderr=true
errmsg=errmsg+"<br>"+"<li>请选择分类!"
else
sql="select isimage from flcat where flcat_id="&cint(request.Form("flcat_id"))
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
if rs2("isimage")=1 then
isimage=false
end if
rs2.close
set rs2=nothing
rs("flcat_id")=cint(request.Form("flcat_id"))
end if
if trim(request.form("fl_logo"))<>"" then
if strLength(trim(request.form("fl_logo")))>100 then
founderr=true
errmsg=errmsg+"<br>"+"<li>站点logo地址太长,不可以超过150个字符!"
else
rs("fl_logo")=trim(request.form("fl_logo"))
end if
else
if isimage then
founderr=true
errmsg=errmsg+"<br>"+"<li>该分类不是文本链接分类,请输入logo地址!"
end if
end if
rs("passed")=1
if founderr then
call diserror()
response.end
end if
rs.update
rs.close
set rs=nothing
response.write "<br><br><br><br><center><span class=unnamed1>已经成功提交,请等待批准。请在你的站点尽快加上我们的连接!</span><br><a href='#;' onclick='window.close()'>关闭窗口</a></center>"
closedatabase
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -