?? joinall.asp
字號(hào):
<%@ 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>錯(cuò)誤的密碼!"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
else
rs.close
end if
else
response.write "錯(cuò)誤:用戶不存在!"
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 中國(guó)114網(wǎng) -->
<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 "找不到記錄!臨時(shí)表中記錄已經(jīng)沒(méi)有了."
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&"個(gè)網(wǎng)站要加入!<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 "要加入的這個(gè)網(wǎng)站的分類不存了,可能是這個(gè)分類已經(jīng)刪除!<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 & " > <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>網(wǎng)站"&server.htmlencode(sitename)&"已經(jīng)存在,不用再添加了!!此網(wǎng)站已經(jīng)加在<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 "現(xiàn)在開(kāi)始刪除臨時(shí)表中的所有!<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>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -