📄 map.asp
字号:
<!--#include file="../config.ini" -->
<%
Dim conn
set conn=server.CreateObject("adodb.connection")
conn.Open connstring
sub draw(user,depth)
dim str,i
str=""
for i=0 to cint(depth)
str=str&" "
next
if cint(depth)=0 then
str=str
else
str=str&"<img src='../images/reportto.gif'>"
end if
str=str&user&"<br>"
Response.Write "<font color=blue size=2><b>"&str&"</b></font>"
Dim rstuser
set rstuser=server.CreateObject("ADODB.Recordset")
rstuser.Open "select * from v_reportto where reporttoname='"&user&"'",conn,1,1
if not rstuser.EOF then
while not rstuser.EOF
draw rstuser.Fields("username"),cint(depth)+1
rstuser.MoveNext
wend
end if
rstuser.Close
end sub
%>
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>职位关系图</title>
</head>
<%
dim rstOrg
set rstOrg=conn.Execute("select * from company")
%>
<body vlink="#48576C" link="#48576C" alink="#000000" bgcolor="#FFFFFF" topmargin="10">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><strong><font class=title><%=rstOrg("company")%>职位关系</font></strong></td>
</tr>
<tr >
<td height="16" colspan="2" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
<%
'rstOrg.Close
Set rstuser1=server.CreateObject("ADODB.Recordset")
rstuser1.Open "select distinct reporttoname from v_reportto urt where not exists(select * from v_reportto urt2 where urt2.username=urt.reporttoname and urt2.username<>urt2.reporttoname)",conn,1,1
if not rstuser1.EOF then
while not rstuser1.EOF
draw rstuser1.Fields("reporttoname"),0
rstuser1.MoveNext
wend
end if
rstuser1.Close
conn.close
Set rstuser=nothing
'Set rstOrg=nothing
Set rstuser1=nothing
Set conn=nothing
%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -