<%
function Output(id,Rid)
Set Srs=Server.CreateObject("ADODB.Recordset")
Sql = "select * from TB_class where C_ID="&id&" order by pid desc,id"
Srs.open Sql,conn,1,1
j=Srs.recordcount
i=1
do while not Srs.eof
id=Srs("ID")
If Cint(Rid)=Cint(id) then
msg="selected"
else
msg=""
end if
if Srs("C_ID")=0 then
Response.Write("")
output id,Rid
i=i+1
Srs.movenext
loop
Set Srs=nothing
end function
%>