<!--#include file="byshop_conn.asp"-->
<%
ServerName1=Cstr(Request.ServerVariables("HTTP_REFERER"))
ServerName2=Cstr(Request.ServerVariables("SERVER_NAME"))
If Mid(ServerName1,8,len(ServerName2))<>ServerName2 Then
    Response.Write "路径有误，禁止从网站外部提交表单！"
     response.end

End if
%>
<%
if request("byshoplink")<>1 then
response.Write "<script language=javascript>alert('请勿非法操作！');history.go(-1);</script>"
else
if  request("site_name")="" then
response.Write "对不起，链接添加失败！"
response.End
end if 

//图片链接
if int(request("link_class"))=1 then
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from imageslinks",conn,1,3
rs.AddNew
rs("user")=trim(request("user"))'联系人
rs("tel")=trim(request("tel"))'联系电话
rs("email")=trim(request("email"))'联系邮箱
rs("linkname")=trim(request("site_name"))'链接名称
rs("linkimages")=trim(request("logo"))'链接图片
rs("linkurl")=trim(request("url"))'链接地址
rs.Update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('链接添加成功，我们会在24小时内审核您的信息！');location.href='index.asp';</script>"
response.End
end if 


//文字链接
if int(request("link_class"))=0 then
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from links",conn,1,3
rs.AddNew
rs("user")=trim(request("user"))'联系人
rs("tel")=trim(request("tel"))'联系电话
rs("email")=trim(request("email"))'联系邮箱
rs("linkname")=trim(request("site_name"))'链接名称
rs("linkurl")=trim(request("url"))'链接地址
rs.Update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('链接添加成功，我们会在24小时内审核您的信息！');location.href='index.asp';</script>"
response.End
end if 
end if
%>

  