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

📄 joinall.asp

📁 中国114网搜索系统 版  本: 文件大小:580 KB 软件语言:简体中文 授权方式:免费版 相关链接:程序演示 开 发 商: 运行环境:ASP源码
💻 ASP
字号:
<%@ LANGUAGE = VBScript%>
<%
id=1
%>
<!-- #include file=../database.asp -->
<%
Set rs = Server.CreateObject("ADODB.Recordset")
Set temprs = Server.CreateObject("ADODB.Recordset")

function CheckPassword()
	sql="select * from ourusers where Ltrim(Rtrim(username))='supervisor'"
	rs.open sql,conn,1,1
	if not rs.eof then
  		if trim(rs("pass"))<>session("pass") then
    			response.write "<br>错误的密码!"
    			rs.close
    			set rs=nothing
			conn.close
			set conn=nothing
    			response.end
  		else
    			rs.close
  		end if
	else
  		response.write "错误:用户不存在!"
  		rs.close
  		set rs=nothing
		conn.close
		set conn=nothing
  		response.end
	end if
end function

checkPassword()
%>
<!-- Design and Edit By QianFengyun 2000-5-20 -->
<!-- #include file=../fenlei/makehtmfile.asp -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0041)http://www.china114net.com 中国114网 -->
<html>
<head>
<title><%=titlename%></title>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<link rel="stylesheet" type="text/css" href="../html/style.css">
</head>
<body bgcolor=ccbbaa>
<%

sql    = "select * from templink"
temprs.open sql,conn,1,1
if temprs.eof or temprs.bof then
	response.write "找不到记录!临时表中记录已经没有了."
	temprs.close
	set temprs=nothing
	conn.close
	set conn=nothing
	set temprs=nothing
	response.end
end if

tempflag=0
nn=temprs.recordcount
response.write "共有"&nn&"个网站要加入!<br>"
for temploop=1 to nn
	response.write "<hr size=1>"
	url=trim(temprs("url"))
	sitename=trim(temprs("sitename"))
	username=trim(temprs("username"))
	ndatetime=temprs("ndatetime")
	jiji=trim(temprs("jiji"))
	fenleiid=temprs("fenleiid")
	'response.write "fenleiid:"&fenleiid
	
	sql    = "select * from fenlei where id="&fenleiid
	rs.open sql,conn,1,1

	if rs.eof or rs.bof then
  		response.write "要加入的这个网站的分类不存了,可能是这个分类已经删除!<br>"
  		rs.close
  		tempflag=1
	else
		fenleiid=rs("id")
		fatherid=rs("father")
	end if

	expediency=rs("expediency")

	tempStr="总分类 "

	for i=1 to expediency
		tempStr=tempStr & " &gt; <a href=../join/chooseassort.asp?id="&id&"&fid="&rs(10+i)&">"&trim(rs(i))&"</a>"
	next

	rs.close

	do while right(url,1)="/" or right(url,1)="\"
		url=left(url,len(url)-1)
	loop

	sql    = "select * from linking where url='"&replace(url,"'","''")&"'"
	rs.open sql,conn,1,1
	if not rs.eof then
		response.write "<br>网站"&server.htmlencode(sitename)&"已经存在,不用再添加了!!此网站已经加在<a href=../navigate.asp?fid="&rs("fenleiid")&">此分类</a>里了.<br>"
		rs.close
		tempflag=1
	else
		rs.close
	end if

	if tempflag=0 then
		if ndatetime="" or isNull(ndatetime) then ndatetime=Cstr(date)

		conn.Execute " INSERT INTO linking " _
        		& "(username,sitename,url,jiji,fenleiid,fen,ndatetime) VALUES " _
        		& "('"&replace(username,"'","''")&"','"&replace(sitename,"'","''")&"','"&replace(url,"'","''")&"','"&replace(jiji,"'","''")&"',"&fenleiid&",0,'"&ndatetime&"');"
        	response.write "记录"&server.htmlencode(sitename)&"成功加入!<a href=../navigate.asp?fid="&fenleiid&">所在分类</a><br>"

		conn.Execute "UPDATE fenlei " _

	        & "SET num = num+1 " _

        	& "WHERE id ="&fenleiid
        else
        	tempflag=0
        end if
        
        temprs.movenext
next

temprs.close

response.write "<br>全部加入成功!!<br>"
if request("flag")=1 then
	response.write "现在开始删除临时表中的所有!<br>"
	conn.Execute "delete * from templink"
	response.write "<p>删除成功!!!<br>"
end if

set rs=nothing
set temprs=nothing
conn.close
set conn=nothing
%>
<script>this.scroll(0, 65000);</script>
</body>
</html>

⌨️ 快捷键说明

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