4,008
社区成员
发帖
与我相关
我的任务
分享
<!--#include file="../home/ekplogincheck.inc"-->
<!--#include file="../home/dbconnect.inc"-->
<!--#include file="../function/Genericfunction.inc"-->
<%
'---------------------全局變量區-------------------
vUId = Session("userid")
vGroupid = Session("groupid")
masterid = request.Cookies("DLC_ID")
strTime = getIntTime() '---刪除的節點的數據還保存在數據庫中﹐加上這個限制條件就不會查詢出來了
'--------------------------------------------------
'----------------------管理員權限判斷---------------------
if vGroupid = "" then
vGroupid = GetGroupIdByUser(vUId)
session("groupid") = vGroupid
end if
sSuppUser = false
ShowObj = PrjDesc
if instr(","& vGroupid &",",",1,") > 0 then
sSuppUser = true
end if
'---------------------------------------------------
%>
<html>
<head>
<title>Group Tree</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=big5"/>
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<link href="./css/dtree.css" rel="StyleSheet" type="text/css" />
<script type="text/javascript" src="./JS/dtree.js"></script>
<script type="text/javascript" src="./JS/common.js"></script>
<style type="text/css">
<!-- '寫css時﹐先定位﹐再設置背景﹐邊框樣式﹐再設置文本﹐字體樣式' -->
.menuCss
{
padding-top: 4px;
margin-top: 1px;
height: 18pt;
background-color: #D6D3CE;
border: #FFFFFF 1px outset;
vertical-align: middle;
text-align: middle;
}
.fontCss
{
padding: 5px 70px 4px 70px;
height: 10px;
border: ridge 2px #ffffff;
font-size: 10px;
FILTER: Shadow(Color=#808080, Direction=225);
}
</style>
<script language="javascript">
var vEditId = '';
var vEditType = '';
function moveMenu(obj)
{
posX = document.body.scrollLeft + event.clientX + 9;
posY = document.body.scrollTop + event.clientY;
obj.style.left=posX;
obj.style.top=posY;
}
</script>
</head>
<body onclick="hideMenu(this)">
<B class="fontCss">THE TREE</B>
<form name='select'><input type='hidden' name='selectVal' id='selectVal' value=''></form>
<%
set oRs=server.createobject("adodb.recordset")
'-------------------------------This SQL list file tree------------------------------------------
if not sSuppUser then
'--------和樹狀結構瀏覽權限有關的
SQL = "SELECT master_id FROM data_auth " & _
" WHERE master_type = 1 AND view_type = 4 "&_
" AND ((auth_id = "& vUId &" AND auth_type = 2) or (auth_id IN ("& vGroupid &") AND auth_type =1)) " & _
" GROUP BY master_id"
'--------
sqlStr = "SELECT p.ID, p.parent_id, p.description "&_
"FROM project p, ("& SQL &") da "&_
"WHERE p.ID = da.master_id "&_
"AND p.effectfrom<='"& strTime &"' AND p.effectuntil>='"& strTime &"' "&_
"START WITH p.ID IN (124624) "&_
"CONNECT BY PRIOR p.ID = p.parent_id"
else
sqlStr = "SELECT p.ID, p.parent_id, p.description "&_
"FROM project p "&_
"WHERE p.effectfrom<='"& strTime &"' AND p.effectuntil>='"& strTime &"' "&_
"START WITH p.ID IN (124624) "&_
"CONNECT BY PRIOR p.ID = p.parent_id"
end if
oRs.cursorlocation=3
oRs.open sqlStr,conn,3,1
iMax = 0
if not oRs.eof then
iMax = oRs.recordCount
redim arrData(iMax,3)
end if
iRow = 0
ipIds = 0
while not oRs.eof
iRow = iRow + 1
arrData(iRow,1) = oRs.fields(0).value 'project id
arrData(iRow,2) = oRs.fields(1).value 'project parent_id
arrData(iRow,3) = oRs.fields(2).value 'project description
if iRow = 1 then
vTemp = arrData(iRow,1)
ipIds = vTemp
else
vTemp = ","& arrData(iRow,1)
ipIds = ipIds & vTemp
end if
oRs.movenext
wend
oRs.close
'------------------------------------------------------------------------------------------
'-----------------------------判斷user是否有對該節點下的文件清單維護權限---------------------------------
AuthSql = "SELECT master_id FROM data_auth "&_
" WHERE master_type = 1 AND master_id in ("& ipIds &") AND view_type = 5 AND auth_id = "& vUId &" AND auth_type = 2"&_
" UNION "&_
" SELECT master_id FROM data_auth "&_
" WHERE master_type = 1 AND master_id in ("& ipIds &") AND view_type = 5 AND auth_id IN ("& vGroupid &") AND auth_type = 1 "
oRs.open AuthSql,conn,3,1
strAuthId = ""
while not oRs.eof
vTemp = ","& oRs.fields(0).value 'project ID
strAuthId = strAuthId & vTemp
oRs.movenext
wend
vTemp = ","
strAuthId = strAuthId & vTemp
oRs.close
set oRs = nothing
conn.close
set conn = nothing
'----------------------------------------------------
%>
<form name="folderForm" action="" method="post">
<!-- 文件樹部分 -->
<div style="margin-left:10px;">
<script language="javascript" type="">
var dTree,dt;
dt = new dTree('dt');
dt.add(5,-1,"<%=Dict("Document Classification Tree")%>");
<%
for i=1 to iMax
iPid = arrData(i,1) 'project id
iPaId = arrData(i,2) 'project parent_id
idesc = arrData(i,3) 'project description
'---------對該節點操作的權限---------
mantainFlag =False
if sSuppUser then
mantainFlag =True
else
if strAuthId <>"" then
if instr(strAuthId, ","& iPid &",")>0 then mantainFlag =True
end if
end if
'-----------------------
strDescription=replace(replace(idesc,"""","""),"\","\\")
strURL = "eppData.asp?id=" & iPid
%>
dt.add(<%=iPid%>,<%=iPaId%>,"<%=strDescription%>","<%=strURL%>","<%=iPid%>","Data","<%=mantainFlag%>");
<%
next
%>
document.write(dt);
dt.openAll();
</script>
</div>
<!-- 點小圖標后出現的層 -->
<input type="hidden" name="hidProjId" />
<div id='func1' style='width:80;display:none;position:absolute;cursor:hand;'>
<div align='center' class='menuCss' onclick='menuFunc(1)'><%=dAdd%></div>
<div align='center' class='menuCss' onclick='menuFunc(2)'><%=dModify%></div>
<div align='center' class='menuCss' onclick='menuFunc(3)'><%=Dict("KM_Delete")%></div>
<div align='center' class='menuCss' onclick='menuFunc(4)' id='divCopy1'><%=Dict("EKP_COPY")%></div>
<div align='center' class='menuCss' onclick='menuFunc(5)' id='divCut1'><%=Dict("KM_Cut")%></div>
<div align='center' class='menuCss' onclick='menuFunc(6)' id='divPaste1' disabled ><%=dPaste%></div>
<div align='center' class='menuCss' onclick='menuFunc(7)' id='divCancelPaste1' disabled ><%=dUndoCut%></div>
</div>
</form>
</body>
</html>
var Recordset1__MM = "%"; 要改成
dim recordset1_MM
recordset1_MM = "%"
不要"﹔"