📄 dellink.asp
字号:
<%@ LANGUAGE = VBScript%>
<%
id=1
%>
<!-- #include file=../database.asp -->
<%
Set rs = 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=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>
<%
id=request("fid")
if isNumeric(id)=0 or id="" then
response.write "操作失败!"
conn.close
set conn=nothing
response.end
end if
if id<0 then
response.write "操作失败!!"
conn.close
set conn=nothing
response.end
end if
sql = "select * from linking where id="&id
rs.open sql,conn,1,3
if rs.eof or rs.bof then
response.write "找不到记录!也许此记录已经删除."
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
else
fenleiid=rs("fenleiid")
rs.delete
conn.Execute "UPDATE fenlei " _
& "SET num = num-1 " _
& "WHERE id ="&fenleiid
response.write "记录删除成功并已经更新了分类记录条数!"
response.write "<br>现在开始更新删除掉记录的html页面.......<br>"
if writeFenleiFiles(getfenleidirecttrue(fenleiid),fenleiid)=0 then
response.write "<br>建立分类HTM文件失败!"
else
response.write "<br>建立分类HTM文件成功!<br><font color=ff0000 size=5>结束</font>"
end if
response.write "<br>现在正在更新加入的分类的上一级分类的html代码页........."
rs.close
sql = "select * from fenlei where id="&fenleiid
rs.open sql,conn,1,1
if rs.eof then
response.write "<br>错误:没有上一级分类!<br>"
else
fatherid=rs("father")
if int(fatherid)=0 then
response.write "<br>正在建总分类......<br>"
strFenleiDirect=server.mapPath(dirstring&"navigate/")
response.write strFenleiDirect
if writeFenleiFiles(strFenleiDirect,0)=0 then
response.write "<br>建立分类HTM文件失败!"
else
response.write "<br>建立分类HTM文件成功!"
end if
else
if writeFenleiFiles(getfenleidirecttrue(fatherid),fatherid)=0 then
response.write "<br>建立分类HTM文件失败!"
else
response.write "<br>建立分类HTM文件成功!"
end if
end if
end if
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -