📄 departdetail2.asp
字号:
<!--#include file="headfiles/Connection.inc"-->
<%
dim DepartID,level,DID
DepartID=request.Form("txtDepart")
if DepartID="" or DepartID="1" then
DID=""
level=1
DepartID=1
else
level=left(DepartID,1)
DID=cint(right(DepartID,len(DepartID)-1))
end if
'response.Write(level&"...."&DepartID&"...."&len(DepartID))
dim rsDepart1,rsDepart2,rsDepart3,rsDepartDetail
set rsDepart1=server.CreateObject("adodb.recordset")
strSql="select * from Depart1Table order by Depart_ID"
rsDepart1.open strSql,conn,3,1
set rsDepart2=server.CreateObject("adodb.recordset")
strSql="select * from Depart2Table order by Depart_Super"
rsDepart2.open strSql,conn,3,1
set rsDepart3=server.CreateObject("adodb.recordset")
strSql="select * from Depart3Table order by Depart_Super"
rsDepart3.open strSql,conn,3,1
if DID<>"" then
set rsDepartDetail=server.CreateObject("adodb.recordset")
strSql="select * from Depart"&level&"Table where Depart_ID="&DID
' RESPONSE.Write(STRSQL)
rsDepartDetail.open strSql,conn,3,1
end if
'response.Write(rsDepart1.recordcount&rsDepart2.recordcount&rsDepart3.recordcount)
'<a onmouseover="this.className='red'" onmouseout="this.className='detail'"></a>
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language=javascript src="headfiles/PicTree.js"></SCRIPT>
<title>无标题文档</title>
<link href="headfiles/text.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function DoClick1(id){
DoClick(id);
// var level;
// level=id.substring(0,1);
// if(level=3){
// frmDepart.btnNew.disabled=true;
// }else{
// frmDepart.btnNew.disabled=false;
// }
frmDepart.txtDepart.value=id;
frmDepart.submit();
}
function NewDepart(){
newTr.style.display='block';
frmDepart.txtDSuper.value=frmDepart.txtDName.value;
frmDepart.txtDSuperID.value=frmDepart.txtDID.value;
frmDepart.txtDName.value="";
frmDepart.txtDID.value="(自动添加)"
}
</script>
</head>
<body background="images\bg.gif" class="detail2" style="CURSOR:AUTO">
<table width="150" height="10" border="0" cellpadding="0" cellspacing="0" class="title3">
<tr>
<td width="42" height="24"><a class=Parent id=1 style="CURSOR: hand" onClick="ExpandCollapse(1)"><img id=image1 height=22
src="./images/Ftv2mNode.gif" width=16 border=0 isopen="0"></a><img
class=classlogo id=folder1 height=22 src="./images/ftv2folderclosed.gif" width=24 border=0 clid="1"></td>
<td width="158"><a class=bold id=1 style="CURSOR: hand" onClick="DoClick1('1')" target=""><span
id=folder1d onMouseOver="this.className='red1'" onMouseOut="this.className=''">本公司</span></a>
</td>
</tr>
<tr>
<td colspan="2" id="child1"> <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0" class="title3">
<%
dim intCount,end1,end2,end3,intCount3
end1=0
end2=0
end3=0
intCount=1
do while not rsDepart1.eof
if rsDepart1.recordcount=intCount then
end1=1
end if
end2=0
end3=0
%>
<tr>
<td width="60" height="20"><img height=22 src="./images/blank.gif" width=16 border=0>
<%if rsDepart1("Depart_Sub")<>0 then %>
<a class=Parent
id=1<%=rsDepart1("Depart_ID")%> style="CURSOR: hand" onClick=ExpandCollapse(1<%=rsDepart1("Depart_ID")%>)><img id=image1<%=rsDepart1("Depart_ID")%> height=22
src="./images/Ftv2mNode.gif" width=16 border=0 isopen="0"></a>
<% else if end1=1 then
%>
<img src="images/ftv2Lastnode.gif" width=16 border=0>
<% else %>
<img src="images/ftv2node.gif" width=16 border=0>
<%end if
end if %>
<img class=classlogo id=folder1<%=rsDepart1("Depart_ID")%> height=22
src="./images/ftv2folderclosed.gif" width=24 border=0 clid="1<%=rsDepart1("Depart_ID")%>"></td>
<td width="110"><a class=bold id=1<%=rsDepart1("Depart_ID")%> style="CURSOR: hand" onClick="DoClick1('1<%=rsDepart1("Depart_ID")%>')" target="">
<span id=folder1<%=rsDepart1("Depart_ID")%>d onMouseOver="this.className='red1'" onMouseOut="this.className=''"><%=rsDepart1("Depart_Name")%></span></a></td>
</tr>
<%
if rsDepart1("Depart_Sub")<>0 then
%>
<tr>
<td colspan="2" id="child1<%=rsDepart1("Depart_ID")%>"><table width="100%" height="20" border="0" cellpadding="0" cellspacing="0" class="title2">
<%
rsDepart2.movefirst
do while not rsDepart2.eof
end3=0
if rsDepart2("Depart_Super")=rsDepart1("Depart_ID") then
rsDepart2.movenext
if rsDepart2.eof then
end2=1
else if rsDepart2("Depart_Super")<>rsDepart1("Depart_ID") then
end2=1
end if
end if
rsDepart2.moveprevious
%>
<TR>
<TD width="95" id=self2<%=rsDepart2("Depart_ID")%> height="20"><IMG height=22 src="./images/blank.gif"
width=16 border=0>
<% if end1=1 then %>
<IMG height=22 src="./images/blank.gif"
width=16 border=0>
<% else %>
<IMG height=22 src="./images/ftv2vertline.gif"
width=16 border=0>
<% end if
if rsDepart2("Depart_Sub")<>0 then %>
<a class=Parent id=2<%=rsDepart2("Depart_ID")%> style="CURSOR: hand"
onClick=ExpandCollapse(2<%=rsDepart2("Depart_ID")%>)><img id=image2<%=rsDepart2("Depart_ID")%> height=22
src="./images/Ftv2mNode.gif" width=16 border=0 isopen="0"></a>
<% else if end2=1 then%>
<img src="images/ftv2Lastnode.gif" width=16 border=0>
<% else %>
<img src="images/ftv2node.gif" width=16 border=0>
<%end if
end if %>
<IMG class=classlogo id=folder2<%=rsDepart2("Depart_ID")%> height=22
src="./images/ftv2folderclosed.gif" width=24 border=0
clid="2<%=rsDepart2("Depart_ID")%>"></TD>
<TD width="75" noWrap style="CURSOR: hand"><A class=bold id=2<%=rsDepart2("Depart_ID")%>
style="CURSOR:hand" onclick="DoClick1('2<%=rsDepart2("Depart_ID")%>')"><SPAN
id=folder2<%=rsDepart2("Depart_ID")%>d onMouseOver="this.className='red1'" onMouseOut="this.className=''"><%=rsDepart2("Depart_Name")%></SPAN></A></TD>
</TR>
<%
if rsDepart2("Depart_Sub")<>0 then
%>
<tr>
<td colspan="2" id="child2<%=rsDepart2("Depart_ID")%>"> <TABLE width="100%" height="20" cellSpacing=0 cellPadding=0 border=0 class="title1">
<%
rsDepart3.movefirst
dim total
total=0
do while not rsDepart3.eof
if rsDepart3("Depart_Super")=rsDepart2("Depart_ID") then
total=total+1
end if
rsDepart3.movenext
loop
intCount3=1
rsDepart3.movefirst
do while not rsDepart3.eof
if rsDepart3("Depart_Super")=rsDepart2("Depart_ID") then
%>
<tr>
<td width="90" height="22"><IMG height=22 src="./images/blank.gif"
width=16 border=0><IMG height=22 src="./images/ftv2vertline.gif"
width=16 border=0>
<% if end2=1 then%>
<IMG height=22 src="./images/blank.gif"
width=16 border=0>
<% else %>
<IMG height=22 src="./images/ftv2vertline.gif"
width=16 border=0>
<% end if
if total=intCount3 then%>
<img src="images/ftv2Lastnode.gif" width=16 border=0>
<% else %>
<img src="images/ftv2node.gif" width=16 border=0>
<% end if %>
<img
class=classlogo id=folder3<%=rsDepart3("Depart_ID")%> height=22
src="./images/ftv2folderclosed.gif" width=24 border=0 clid="3<%=rsDepart3("Depart_ID")%>"></td>
<td width="80"><A class=bold id=3<%=rsDepart3("Depart_ID")%> style="CURSOR:hand"
onclick="DoClick1('3<%=rsDepart3("Depart_ID")%>')"><SPAN
id=folder3<%=rsDepart3("Depart_ID")%>d onMouseOver="this.className='red1'" onMouseOut="this.className=''"><%=rsDepart3("Depart_Name")%></SPAN></A></td>
</tr>
<%
intCount3=intCount3+1
end if
rsDepart3.movenext
loop
%>
</table></td>
</tr>
<%
end if
end if
rsDepart2.movenext
loop
%>
</TABLE></td>
</tr>
<%
end if
rsDepart1.movenext
intCount=intCount+1
loop
%>
</table></td>
</tr>
</table>
</body>
<script language="JavaScript">
DoClick('<%=DepartID%>');
frmDepart.txtDName.disabled=true;
frmDepart.txtDManager.disabled=true;
frmDepart.taDIntro.disabled=true;
newTr.style.display='none';
</script>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -