使用DW用ASP ACCESS编写目录树
时间:2007-12-23 来源:不详 作者:迈克DB
sRec.open sSql,sConn,3,1
if not sRec.eof then
sNum=1
response.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'>" & chr(13))
while not sRec.eof
sTmp=sConn.execute("select count(listId) as countSub from listTable where parentId=" & sRec("listId"))
if sTmp("countSub")>0 then
response.write("<tr>" & chr(13))
if sNum=sRec.recordcount then
response.write("<td width='18' valign='top'><img src='http://www.cndw.com/tech/dw/images/angel.gif'></td>" & chr(13))
else
response.write("<td width='18' background='images/eline.gif' valign='top'><img src='http://www.cndw.com/tech/dw/images/t.gif' ></td>" & chr(13))
end if
response.write("<td>" & chr(13) & "<table width='100%' border='0' cellspacing='0' cellpadding='0'>" & chr(13))
response.write("<tr>" & chr(13) & "<td width='118' class='menuPro' id='listName" & sRec("listId") & "'><img id='img" & sRec("listId") & "' style='cursor:hand' src='http://www.cndw.com/tech/dw/images/close.gif' align='absMiddle' onclick='jscript:showMenu(subMenu" & sRec("listId") & ",1)' alt='" & sRec("listInfo") & "'>" & server.HTMLEncode(sRec("listName")) & "</td>" & chr(13) & "<td width='40' class='menuFont'><div align='center' style='cursor:hand' onclick=""jscript:showForm('add'," & sRec("listId") & ")"">添加</div></td><td width='40' class='menuFont'><div align='center' style='cursor:hand' onclick=""jscript:showForm('edit'," & sRec("listId") & ")"">编辑</div></td>" & chr(13)) 织梦内容管理系统
response.write("<td width='40' class='menuFont'><div align='center' style='cursor:hand' onclick=""jscript:window.location='disp.?disp=del&parentId=" & sRec("listId") & "'"">删除 </div></td>" & chr(13) & "<td> </td>" & chr(13) & "</tr>" & chr(13) & "</table>" & chr(13) & "</td>" & chr(13) & "</tr>" & chr(13))
response.write("<tr id='subMenu" & sRec("listId") &"' style='display:none'>")
if sNum=sRec.recordcount then
response.write("<td width='18' valign='top'")
response.write("<img src='http://www.cndw.com/tech/dw/images/angel.gif' >")
response.write("</td>" & chr(13))
else
response.write("<td width='18' valign='top' background='images/eline.gif'>")
response.write("</td>" & chr(13))

文章评论
共有位Admini5网友发表了评论 查看完整内容