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

📄 addurl.asp

📁 这是一个用SQL Server和ASP开发的搜索引擎网站
💻 ASP
字号:
<!--#include file="head.asp" -->
<!-- #INCLUDE FILE="adovbs.inc" -->
<%
Function ChkString(str)
		str = replace(str, "<", "&lt;", 1, -1, 1)
		str = replace(str, ">", "&gt;", 1, -1, 1)	 
	 ChkString = str
End Function
ConnString ="Provider=sqloledb;" & "Data Source=127.0.0.1;Initial Catalog=qiye_8;User Id=sa;Password=password;"  
cat = Request.Form("cat")
name = ChkString(Request.Form("name"))
URL = Request.Form("url")
key = ChkString(Request.Form("key"))
Description =  ChkString(Request.Form("des"))
Email =  Request.Form("mail")
today = now()
parent = Request.Form("parentid")
if name = "" then
Response.Write ("请输入网站名称")
else
	if URL = "http://" then
	Response.Write ("请输入网址")
	else
	if cat = "--Please select one--" then
		Response.Write ("请选择与您网站匹配的类别")
		else
		if key = "" then
		Response.Write ("请输入关键字")
		else
			if Description = "" then
			Response.Write ("请输入网站描述")
			else
			
		set my_conn= Server.CreateObject("ADODB.Connection")
		set rs = server.CreateObject("ADODB.RecordSet")
		my_Conn.Open ConnString
		set rscheck = my_conn.Execute ("Select URL from link2 where URL='" & URL & "'")
		if rscheck.eof then
been_here_before="No"
end if
RScheck.close
if been_here_before="No" then 
		sql ="select * from link2"
RS.open Sql,my_conn,1,3
RS.AddNew
RS("Name")=name
RS("url")=url
RS("keyword")=key
RS("category")=cat
RS("description")=description
RS("postdate")= now()
RS("email")= Email
RS("parentid")= parent
RS.update
		%>
<br><br><br>&nbsp;<font face="宋体" size="2">我们已接受您的登记,我们的审核需要2~3天,通过审核后,您的网站将被添加进我们的数据库。</font>
<p><a href="index.asp"><font face="宋体" size="2">返回主页 </font> </a>
	<% else		
		Response.Write "对不起,您的网站已经存在于我们的数据库。"
		end if
my_conn.Close 
set my_conn = nothing
set rs = nothing
end if
end if
end if
end if
end if
%>
<!--#include file="gg.asp" -->
<!--#include file="foot.asp" -->



⌨️ 快捷键说明

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