📄 tj.asp
字号:
<%if bs<>"zcj" then
xxmc=request("xxmc")
nj=request("nj")
bb=request("bb")
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from ban where xxmc='"&xxmc&"' and nj='"&nj&"' and bb='"&bb&"'",conn,1,3
if not rs.eof then
cbrs=rs("rs")
else
cbrs=0
end if
rs.close
set rs=nothing
set zcj=server.createobject("adodb.recordset")
zcj.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"'",conn,1,3
ywzf=0
sxzf=0
do while not zcj.eof
if zcj("语文")<>"" then
ywzf=ywzf+zcj("语文")
end if
if zcj("数学")<>"" then
sxzf=sxzf+zcj("数学")
end if
zcj.movenext
loop
zcj.close
set zcj=nothing
set jgrs=server.createobject("adodb.recordset")
jgrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 语文>=60",conn,1,3
ywjgrs=0
do while not jgrs.eof
ywjgrs=ywjgrs+1
jgrs.movenext
loop
jgrs.close
set jgrs=nothing
set jgrs=server.createobject("adodb.recordset")
jgrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 数学>=60",conn,1,3
sxjgrs=0
do while not jgrs.eof
sxjgrs=sxjgrs+1
jgrs.movenext
loop
jgrs.close
set jgrs=nothing
%>
<%if int(nj)>=rqz+5 then
ys=90
elseif int(nj)>=rqz+3 and int(nj)<=rqz+4 then
ys=85
elseif int(nj)<=rqz+2 then
ys=80
end if%>
<%set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 语文>="&ys,conn,1,3
ywysrs=0
do while not ysrs.eof
ywysrs=ywysrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 数学>="&ys,conn,1,3
sxysrs=0
do while not ysrs.eof
sxysrs=sxysrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 语文<60",conn,1,3
ywbjgrs=0
do while not ysrs.eof
ywbjgrs=ywbjgrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 数学<60",conn,1,3
sxbjgrs=0
do while not ysrs.eof
sxbjgrs=sxbjgrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 语文>=60 and 语文<80",conn,1,3
yw60rs=0
do while not ysrs.eof
yw60rs=yw60rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 数学>=60 and 数学<80",conn,1,3
sx60rs=0
do while not ysrs.eof
sx60rs=sx60rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 语文>=80 and 语文<85",conn,1,3
yw80rs=0
do while not ysrs.eof
yw80rs=yw80rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 数学>=80 and 数学<85",conn,1,3
sx80rs=0
do while not ysrs.eof
sx80rs=sx80rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 语文>=85 and 语文<90",conn,1,3
yw85rs=0
do while not ysrs.eof
yw85rs=yw85rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 数学>=85 and 数学<90",conn,1,3
sx85rs=0
do while not ysrs.eof
sx85rs=sx85rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 语文>=90",conn,1,3
yw90rs=0
do while not ysrs.eof
yw90rs=yw90rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 数学>=90",conn,1,3
sx90rs=0
do while not ysrs.eof
sx90rs=sx90rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from jsxxxx where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 科目='语文'",conn,1,3
if not ysrs.eof then
ywjs=ysrs("姓名")
end if
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from jsxxxx where 学校='"&xxmc&"' and 年级='"&nj&"' and 班级='0"&bb&"' and 科目='数学'",conn,1,3
if not ysrs.eof then
sxjs=ysrs("姓名")
end if
ysrs.close
set ysrs=nothing
if fl="xxcjxxda" then
qklx="{qm}"
elseif fl="xsdxcj" then
qklx="{dx}"
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from qk where xxmc='"&xxmc&"' and nj='"&nj&"' and bb='"&bb&"' and lx like '%"&qklx&"%'",conn,1,3
qk=0
qkmd=""
do while not rs.eof
qk=qk+1
qkmd=qkmd&"["&rs("name")&"]"
set qkf=server.createobject("adodb.recordset")
qkf.open "select * from "&fl&" where 学校='"&xxmc&"' and 姓名='"&rs("name")&"' and 年级='"&nj&"' and 班级='0"&bb&"'",conn,1,3
if not qkf.eof then
if qkf("语文")>0 then
ywzf=ywzf-qkf("语文")
end if
if qkf("数学")>0 then
sxzf=sxzf-qkf("数学")
end if
if qkf("语文")<60 then
ywbjgrs=ywbjgrs-1
elseif qkf("语文")>=60 and qkf("语文")<80 then
yw60rs=yw60rs-1
ywjgrs=ywjgrs-1
elseif qkf("语文")>=80 and qkf("语文")<85 then
yw80rs=yw80rs-1
ywjgrs=ywjgrs-1
elseif qkf("语文")>=85 and qkf("语文")<90 then
yw85rs=yw85rs-1
ywjgrs=ywjgrs-1
elseif qkf("语文")>=90 then
yw90rs=yw90rs-1
ywjgrs=ywjgrs-1
end if
if qkf("数学")<60 then
sxbjgrs=sxbjgrs-1
elseif qkf("数学")>=60 and qkf("数学")<80 then
sx60rs=sx60rs-1
sxjgrs=sxjgrs-1
elseif qkf("数学")>=80 and qkf("数学")<85 then
sx80rs=sx80rs-1
sxjgrs=sxjgrs-1
elseif qkf("数学")>=85 and qkf("数学")<90 then
sx85rs=sx85rs-1
sxjgrs=sxjgrs-1
elseif qkf("数学")>=90 then
sx90rs=sx90rs-1
sxjgrs=sxjgrs-1
end if
if qkf("语文")>=ys then
ywysrs=ywysrs-1
end if
if qkf("数学")>=ys then
sxysrs=sxysrs-1
end if
end if
qkf.close
set qkf=nothing
rs.movenext
loop
rs.close
set rs=nothing
brs=cbrs-qk%>
<%
if ywysrs>0 then
ywysl=ywysrs/brs*100
else
ywysl=0
end if
if sxysrs>0 then
sxysl=sxysrs/brs*100
else
sxysl=0
end if
if ywjgrs>0 then
ywjgl=ywjgrs/brs*100
else
ywjgl=0
end if
if sxjgrs>0 then
sxjgl=sxjgrs/brs*100
else
sxjgl=0
end if
if ywzf>0 then
ywpjf=ywzf/brs
else
ywpjf=0
end if
if sxzf>0 then
sxpjf=sxzf/brs
else
sxpjf=0
end if
if ywjgl<>100 and len(ywjgl)=4 then
if len(left(ywjgl,instr(ywjgl,".")-1))<2 then
if right(ywjgl,1)>=5 then
ywjgl=left(ywjgl,3)+0.1
end if
end if
elseif ywjgl<>100 and len(ywjgl)>4 then
ywjgl=left(ywjgl,instr(ywjgl,".")+2)
if right(ywjgl,1)>=5 then
ywjgl=left(ywjgl,len(ywjgl)-1)+0.1
else
ywjgl=left(ywjgl,len(ywjgl)-1)
end if
end if
if sxjgl<>100 and len(sxjgl)=4 then
if len(left(sxjgl,instr(sxjgl,".")-1))<2 then
if right(sxjgl,1)>=5 then
sxjgl=left(sxjgl,3)+0.1
end if
end if
elseif sxjgl<>100 and len(sxjgl)>4 then
sxjgl=left(sxjgl,instr(sxjgl,".")+2)
if right(sxjgl,1)>=5 then
sxjgl=left(sxjgl,len(sxjgl)-1)+0.1
else
sxjgl=left(sxjgl,len(sxjgl)-1)
end if
end if
if ywysl<>100 and len(ywysl)=4 then
if len(left(ywysl,instr(ywysl,".")-1))<2 then
if right(ywysl,1)>=5 then
ywysl=left(ywysl,3)+0.1
end if
end if
elseif ywysl<>100 and len(ywysl)>4 then
ywysl=left(ywysl,instr(ywysl,".")+2)
if right(ywysl,1)>=5 then
ywysl=left(ywysl,len(ywysl)-1)+0.1
else
ywysl=left(ywysl,len(ywysl)-1)
end if
end if
if sxysl<>100 and len(sxysl)=4 then
if len(left(sxysl,instr(sxysl,".")-1))<2 then
if right(sxysl,1)>=5 then
sxysl=left(sxysl,3)+0.1
end if
end if
elseif sxysl<>100 and len(sxysl)>4 then
sxysl=left(sxysl,instr(sxysl,".")+2)
if right(sxysl,1)>=5 then
sxysl=left(sxysl,len(sxysl)-1)+0.1
else
sxysl=left(sxysl,len(sxysl)-1)
end if
end if
if ywpjf<>100 and len(ywpjf)=4 then
if len(left(ywpjf,instr(ywpjf,".")-1))<2 then
if right(ywpjf,1)>=5 then
ywpjf=left(ywpjf,3)+0.1
end if
end if
elseif ywpjf<>100 and len(ywpjf)>4 then
ywpjf=left(ywpjf,instr(ywpjf,".")+2)
if right(ywpjf,1)>=5 then
ywpjf=left(ywpjf,len(ywpjf)-1)+0.1
else
ywpjf=left(ywpjf,len(ywpjf)-1)
end if
end if
if sxpjf<>100 and len(sxpjf)=4 then
if len(left(sxpjf,instr(sxpjf,".")-1))<2 then
if right(sxpjf,1)>=5 then
sxpjf=left(sxpjf,3)+0.1
end if
end if
elseif sxpjf<>100 and len(sxpjf)>4 then
sxpjf=left(sxpjf,instr(sxpjf,".")+2)
if right(sxpjf,1)>=5 then
sxpjf=left(sxpjf,len(sxpjf)-1)+0.1
else
sxpjf=left(sxpjf,len(sxpjf)-1)
end if
end if
%>