代码如下: <table border=0 height=150 align=center cellPadding=4 cellSpacing=1 width=80% style="border-right:1px solid buttonshadow;border-bottom:1px solid buttonshadow;border-top:1px solid white;border-left:1px solid white;"> <TR> <TD align=left>组名:</TD> <TD colspan=2 align=left><INPUT type="text" id=text1 name=gname size=36 value=<%=rs2("gname")%>></TD> </TR> <TR> <TD align=left valign=top>组员:</TD> <TD align=left height=140> <FIELDSET align=left style="PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; PADDING-TOP: 8px; WIDTH: 245px ;"> <DIV style="BACKGROUND-COLOR: white; BORDER-BOTTOM: inset; BORDER-LEFT: inset; BORDER-RIGHT: inset; BORDER-TOP: inset; WIDTH:250px; HEIGHT: 140px; OVERFLOW: auto"> <TABLE align=center border=1 bgcolor=menu cellPadding=0 cellSpacing=0 width=248 style="BACKGROUND-COLOR: white; BORDER-BOTTOM:0 inset; BORDER-LEFT: black 1point inset; BORDER-RIGHT: 0 inset; BORDER-TOP: black 1point inset; HEIGHT: 140px; OVERFLOW: auto"> <TR bgcolor=menu> <TD width=4 align=center>√</TD> <TD width=98%> 供应商名</TD> </TR> <% 'sql1="select * from supplier where enter_id="&session("enter_id")&" and creater='"&session("bianhao")&"' order by company" select case(trim(session("title"))) case "企业总经理","系统管理员" sql1="select * from supplier where enter_id="&session("enter_id")&" order by company" case else sql1="select * from supplier s,employee e where s.creater=e.bianhao and s.enter_id="&session("enter_id")&" and (e.bianhao='"&session("bianhao")&"' or e.manager='"&session("bianhao")&"') order by s.company" end select
'Response.Write sql1 set rs=server.CreateObject ("adodb.recordset") rs.Open sql1,conn,1,1 if rs.BOF and rs.EOF then Response.Write "<TR><TD colspan=2>请直接点击'新供应商'进行添加!</TD></TR>" else %> <%do while not rs.EOF 'Response.Write rs2("gmemo")&"="&rs("sup_id") 'Response.Write ubound(sid) if ubound(sid)>=0 then for i=0 to ubound(sid) if clng(sid(i))=rs("sup_id") then %> <TR> <TD bgcolor=menu width=30><INPUT type="checkbox" id=checkbox1 name=supid value=<%=rs("sup_id")%> checked></TD> <TD width=90%><%=rs("company")%></TD> </TR> <% exit for end if next if i=ubound(sid)+1 then %> <TR> <TD bgcolor=menu width=30><INPUT type="checkbox" id=checkbox1 name=supid value=<%=rs("sup_id")%>></TD> <TD width=90%><%=rs("company")%></TD> </TR> <% end if else %> <TR> <TD bgcolor=menu width=30><INPUT type="checkbox" id=checkbox1 name=supid value=<%=rs("sup_id")%>></TD> <TD width=90%><%=rs("company")%></TD> </TR> <% end if %><%rs.MoveNext loop if rs.RecordCount<6 then cc=6-rs.RecordCount-1 'Response.Write cc for i=0 to cc Response.Write "<TR><TD colspan=2> </td></TR>" next end if %> </TABLE> <% end if rs.Close set rs=nothing %> </div> </fieldset> </TD> </TR> <TR> <TD colspan=3 align=right><br> <input type=hidden name=action value=确定> <INPUT type="button" value="新供应商" id=button1 style="width:80px" onclick="window.showModalDialog('/supplier/postsup.asp','cartWindow','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=1,resizable=0,top=50,left=160,width=640,height=520');"> <INPUT type="button" value="确定" id=button1 style="width:80px" name=action onclick=tijiao()> <INPUT type=reset value="取消" id=button3 style="width:80px" name=reset> </TD> </TR> </TABLE>
<table border=0 height=150 align=center cellPadding=4 cellSpacing=1 width=80% style="border-right:1px solid buttonshadow;border-bottom:1px solid buttonshadow;border-top:1px solid white;border-left:1px solid white;">
<TR>
<TD align=left>组名:</TD>
<TD colspan=2 align=left><INPUT type="text" id=text1 name=gname size=36 value=<%=rs2("gname")%>></TD>
</TR>
<TR>
<TD align=left valign=top>组员:</TD>
<TD align=left height=140>
<FIELDSET align=left style="PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; PADDING-TOP: 8px; WIDTH: 245px ;">
<DIV style="BACKGROUND-COLOR: white; BORDER-BOTTOM: inset; BORDER-LEFT: inset; BORDER-RIGHT: inset; BORDER-TOP: inset; WIDTH:250px; HEIGHT: 140px; OVERFLOW: auto">
<TABLE align=center border=1 bgcolor=menu cellPadding=0 cellSpacing=0 width=248 style="BACKGROUND-COLOR: white; BORDER-BOTTOM:0 inset; BORDER-LEFT: black 1point inset; BORDER-RIGHT: 0 inset; BORDER-TOP: black 1point inset; HEIGHT: 140px; OVERFLOW: auto">
<TR bgcolor=menu>
<TD width=4 align=center>√</TD>
<TD width=98%> 供应商名</TD>
</TR>
<%
'sql1="select * from supplier where enter_id="&session("enter_id")&" and creater='"&session("bianhao")&"' order by company"
select case(trim(session("title")))
case "企业总经理","系统管理员"
sql1="select * from supplier where enter_id="&session("enter_id")&" order by company"
case else
sql1="select * from supplier s,employee e where s.creater=e.bianhao and s.enter_id="&session("enter_id")&" and (e.bianhao='"&session("bianhao")&"' or e.manager='"&session("bianhao")&"') order by s.company"
end select
'Response.Write sql1
set rs=server.CreateObject ("adodb.recordset")
rs.Open sql1,conn,1,1
if rs.BOF and rs.EOF then
Response.Write "<TR><TD colspan=2>请直接点击'新供应商'进行添加!</TD></TR>"
else
%>
<%do while not rs.EOF
'Response.Write rs2("gmemo")&"="&rs("sup_id")
'Response.Write ubound(sid)
if ubound(sid)>=0 then
for i=0 to ubound(sid)
if clng(sid(i))=rs("sup_id") then
%>
<TR>
<TD bgcolor=menu width=30><INPUT type="checkbox" id=checkbox1 name=supid value=<%=rs("sup_id")%> checked></TD>
<TD width=90%><%=rs("company")%></TD>
</TR>
<% exit for
end if
next if i=ubound(sid)+1 then
%>
<TR>
<TD bgcolor=menu width=30><INPUT type="checkbox" id=checkbox1 name=supid value=<%=rs("sup_id")%>></TD>
<TD width=90%><%=rs("company")%></TD>
</TR>
<%
end if
else
%>
<TR>
<TD bgcolor=menu width=30><INPUT type="checkbox" id=checkbox1 name=supid value=<%=rs("sup_id")%>></TD>
<TD width=90%><%=rs("company")%></TD>
</TR>
<%
end if
%><%rs.MoveNext
loop
if rs.RecordCount<6 then
cc=6-rs.RecordCount-1
'Response.Write cc
for i=0 to cc
Response.Write "<TR><TD colspan=2> </td></TR>"
next
end if
%>
</TABLE>
<%
end if
rs.Close
set rs=nothing
%>
</div>
</fieldset>
</TD>
</TR>
<TR>
<TD colspan=3 align=right><br>
<input type=hidden name=action value=确定>
<INPUT type="button" value="新供应商" id=button1 style="width:80px" onclick="window.showModalDialog('/supplier/postsup.asp','cartWindow','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=1,resizable=0,top=50,left=160,width=640,height=520');">
<INPUT type="button" value="确定" id=button1 style="width:80px" name=action onclick=tijiao()>
<INPUT type=reset value="取消" id=button3 style="width:80px" name=reset>
</TD>
</TR>
</TABLE>