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

📄 map.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 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&"&nbsp;&nbsp;&nbsp;"
    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">&nbsp;</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 + -