📄 njtj.asp
字号:
<%cnbrs=0
set rs=server.createobject("adodb.recordset")
rs.open "select * from ban where nj='"&nj&"'",conn,1,3
do while not rs.eof
if rs("rs")<>"" then
cnbrs=cnbrs+rs("rs")
end if
rs.movenext
loop
rs.close
set rs=nothing
set zcj=server.createobject("adodb.recordset")
zcj.open "select * from "&fl&" where 年级='"&nj&"'",conn,1,3
nywzf=0
nsxzf=0
do while not zcj.eof
if zcj("语文")<>"" then
nywzf=nywzf+zcj("语文")
end if
if zcj("数学")<>"" then
nsxzf=nsxzf+zcj("数学")
end if
zcj.movenext
loop
zcj.close
set zcj=nothing
set jgrs=server.createobject("adodb.recordset")
jgrs.open "select * from "&fl&" where 年级='"&nj&"' and 语文>=60",conn,1,3
nywjgrs=0
do while not jgrs.eof
nywjgrs=nywjgrs+1
jgrs.movenext
loop
jgrs.close
set jgrs=nothing
set jgrs=server.createobject("adodb.recordset")
jgrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学>=60",conn,1,3
nsxjgrs=0
do while not jgrs.eof
nsxjgrs=nsxjgrs+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 年级='"&nj&"' and 语文>="&ys,conn,1,3
nywysrs=0
do while not ysrs.eof
nywysrs=nywysrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学>="&ys,conn,1,3
nsxysrs=0
do while not ysrs.eof
nsxysrs=nsxysrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 语文<60",conn,1,3
nywbjgrs=0
do while not ysrs.eof
nywbjgrs=nywbjgrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学<60",conn,1,3
nsxbjgrs=0
do while not ysrs.eof
nsxbjgrs=nsxbjgrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 语文>=60 and 语文<80",conn,1,3
nyw60rs=0
do while not ysrs.eof
nyw60rs=nyw60rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学>=60 and 数学<80",conn,1,3
nsx60rs=0
do while not ysrs.eof
nsx60rs=nsx60rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 语文>=80 and 语文<85",conn,1,3
nyw80rs=0
do while not ysrs.eof
nyw80rs=nyw80rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学>=80 and 数学<85",conn,1,3
nsx80rs=0
do while not ysrs.eof
nsx80rs=nsx80rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 语文>=85 and 语文<90",conn,1,3
nyw85rs=0
do while not ysrs.eof
nyw85rs=nyw85rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学>=85 and 数学<90",conn,1,3
nsx85rs=0
do while not ysrs.eof
nsx85rs=nsx85rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 语文>=90",conn,1,3
nyw90rs=0
do while not ysrs.eof
nyw90rs=nyw90rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学>=90",conn,1,3
nsx90rs=0
do while not ysrs.eof
nsx90rs=nsx90rs+1
ysrs.movenext
loop
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 nj='"&nj&"' and lx like '%"&qklx&"%'",conn,1,3
nqk=0
nqkmd=""
do while not rs.eof
nqk=nqk+1
nqkmd=nqkmd&"["&rs("name")&"]"
set qkf=server.createobject("adodb.recordset")
qkf.open "select * from "&fl&" where 年级='"&nj&"' and 学校='"&rs("xxmc")&"' and 班级='"&"0"&rs("bb")&"' and 姓名='"&rs("name")&"'",conn,1,3
if not qkf.eof then
if qkf("语文")>0 then
nywzf=nywzf-qkf("语文")
end if
if qkf("数学")>0 then
nsxzf=nsxzf-qkf("数学")
end if
if qkf("语文")<60 then
nywbjgrs=nywbjgrs-1
elseif qkf("语文")>=60 and qkf("语文")<80 then
nyw60rs=nyw60rs-1
nywjgrs=nywjgrs-1
elseif qkf("语文")>=80 and qkf("语文")<85 then
nyw80rs=nyw80rs-1
nywjgrs=nywjgrs-1
elseif qkf("语文")>=85 and qkf("语文")<90 then
nyw85rs=nyw85rs-1
nywjgrs=nywjgrs-1
elseif qkf("语文")>=90 then
nyw90rs=nyw90rs-1
nywjgrs=nywjgrs-1
end if
if qkf("数学")<60 then
nsxbjgrs=nsxbjgrs-1
elseif qkf("数学")>=60 and qkf("数学")<80 then
nsx60rs=nsx60rs-1
nsxjgrs=nsxjgrs-1
elseif qkf("数学")>=80 and qkf("数学")<85 then
nsx80rs=nsx80rs-1
nsxjgrs=nsxjgrs-1
elseif qkf("数学")>=85 and qkf("数学")<90 then
nsx85rs=nsx85rs-1
nsxjgrs=nsxjgrs-1
elseif qkf("数学")>=90 then
nsx90rs=nsx90rs-1
nsxjgrs=nsxjgrs-1
end if
if qkf("语文")>=ys then
nywysrs=nywysrs-1
end if
if qkf("数学")>=ys then
nsxysrs=nsxysrs-1
end if
end if
qkf.close
set qkf=nothing
rs.movenext
loop
rs.close
set rs=nothing
nbrs=int(cnbrs)-nqk
if nywysrs>0 then
nywysl=nywysrs/nbrs*100
else
n1ywysl=0
end if
if nsxysrs>0 then
nsxysl=nsxysrs/nbrs*100
else
nsxysl=0
end if
if nywjgrs>0 then
nywjgl=nywjgrs/nbrs*100
else
nywjgl=0
end if
if nsxjgrs>0 then
nsxjgl=nsxjgrs/nbrs*100
else
nsxjgl=0
end if
if nywzf>0 then
nywpjf=nywzf/nbrs
else
nywpjf=0
end if
if nsxzf>0 then
nsxpjf=nsxzf/nbrs
else
nsxpjf=0
end if
if nywjgl<>100 and len(nywjgl)=4 then
if len(left(nywjgl,instr(nywjgl,".")-1))<2 then
if right(nywjgl,1)>=5 then
nywjgl=left(nywjgl,3)+0.1
end if
end if
elseif nywjgl<>100 and len(nywjgl)>4 then
nywjgl=left(nywjgl,instr(nywjgl,".")+2)
if right(nywjgl,1)>=5 then
nywjgl=left(nywjgl,len(nywjgl)-1)+0.1
else
nywjgl=left(nywjgl,len(nywjgl)-1)
end if
end if
if nsxjgl<>100 and len(nsxjgl)=4 then
if len(left(nsxjgl,instr(nsxjgl,".")-1))<2 then
if right(nsxjgl,1)>=5 then
nsxjgl=left(nsxjgl,3)+0.1
end if
end if
elseif nsxjgl<>100 and len(nsxjgl)>4 then
nsxjgl=left(nsxjgl,instr(nsxjgl,".")+2)
if right(nsxjgl,1)>=5 then
nsxjgl=left(nsxjgl,len(nsxjgl)-1)+0.1
else
nsxjgl=left(nsxjgl,len(nsxjgl)-1)
end if
end if
if nywysl<>100 and len(nywysl)=4 then
if len(left(nywysl,instr(nywysl,".")-1))<2 then
if right(nywysl,1)>=5 then
nywysl=left(nywysl,3)+0.1
end if
end if
elseif nywysl<>100 and len(nywysl)>4 then
nywysl=left(nywysl,instr(nywysl,".")+2)
if right(nywysl,1)>=5 then
nywysl=left(nywysl,len(nywysl)-1)+0.1
else
nywysl=left(nywysl,len(nywysl)-1)
end if
end if
if nsxysl<>100 and len(nsxysl)=4 then
if len(left(nsxysl,instr(nsxysl,".")-1))<2 then
if right(nsxysl,1)>=5 then
nsxysl=left(nsxysl,3)+0.1
end if
end if
elseif nsxysl<>100 and len(nsxysl)>4 then
nsxysl=left(nsxysl,instr(nsxysl,".")+2)
if right(nsxysl,1)>=5 then
nsxysl=left(nsxysl,len(nsxysl)-1)+0.1
else
nsxysl=left(nsxysl,len(nsxysl)-1)
end if
end if
if nywpjf<>100 and len(nywpjf)=4 then
if len(left(nywpjf,instr(nywpjf,".")-1))<2 then
if right(nywpjf,1)>=5 then
nywpjf=left(nywpjf,3)+0.1
end if
end if
elseif nywpjf<>100 and len(nywpjf)>4 then
nywpjf=left(nywpjf,instr(nywpjf,".")+2)
if right(nywpjf,1)>=5 then
nywpjf=left(nywpjf,len(nywpjf)-1)+0.1
else
nywpjf=left(nywpjf,len(nywpjf)-1)
end if
end if
if nsxpjf<>100 and len(nsxpjf)=4 then
if len(left(nsxpjf,instr(nsxpjf,".")-1))<2 then
if right(nsxpjf,1)>=5 then
nsxpjf=left(nsxpjf,3)+0.1
end if
end if
elseif nsxpjf<>100 and len(nsxpjf)>4 then
nsxpjf=left(nsxpjf,instr(nsxpjf,".")+2)
if right(nsxpjf,1)>=5 then
nsxpjf=left(nsxpjf,len(nsxpjf)-1)+0.1
else
nsxpjf=left(nsxpjf,len(nsxpjf)-1)
end if
end if
%>