📄 jtj.asp
字号:
<%cjbrs=0
set rs=server.createobject("adodb.recordset")
rs.open "select * from ban where nj='"&nj&"' "&sd,conn,1,3
do while not rs.eof
if rs("rs")<>"" then
cjbrs=cjbrs+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&"' "&st,conn,1,3
jywzf=0
jsxzf=0
do while not zcj.eof
if zcj("语文")<>"" then
jywzf=jywzf+zcj("语文")
end if
if zcj("数学")<>"" then
jsxzf=jsxzf+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 "&st,conn,1,3
jywjgrs=0
do while not jgrs.eof
jywjgrs=jywjgrs+1
jgrs.movenext
loop
jgrs.close
set jgrs=nothing
set jgrs=server.createobject("adodb.recordset")
jgrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学>=60 "&st,conn,1,3
jsxjgrs=0
do while not jgrs.eof
jsxjgrs=jsxjgrs+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&" "&st,conn,1,3
jywysrs=0
do while not ysrs.eof
jywysrs=jywysrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学>="&ys&" "&st,conn,1,3
jsxysrs=0
do while not ysrs.eof
jsxysrs=jsxysrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 语文<60 "&st,conn,1,3
jywbjgrs=0
do while not ysrs.eof
jywbjgrs=jywbjgrs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学<60 "&st,conn,1,3
jsxbjgrs=0
do while not ysrs.eof
jsxbjgrs=jsxbjgrs+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 "&st,conn,1,3
jyw60rs=0
do while not ysrs.eof
jyw60rs=jyw60rs+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 "&st,conn,1,3
jsx60rs=0
do while not ysrs.eof
jsx60rs=jsx60rs+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 "&st,conn,1,3
jyw80rs=0
do while not ysrs.eof
jyw80rs=jyw80rs+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 "&st,conn,1,3
jsx80rs=0
do while not ysrs.eof
jsx80rs=jsx80rs+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 "&st,conn,1,3
jyw85rs=0
do while not ysrs.eof
jyw85rs=jyw85rs+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 "&st,conn,1,3
jsx85rs=0
do while not ysrs.eof
jsx85rs=jsx85rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 语文>=90 "&st,conn,1,3
jyw90rs=0
do while not ysrs.eof
jyw90rs=jyw90rs+1
ysrs.movenext
loop
ysrs.close
set ysrs=nothing
set ysrs=server.createobject("adodb.recordset")
ysrs.open "select * from "&fl&" where 年级='"&nj&"' and 数学>=90 "&st,conn,1,3
jsx90rs=0
do while not ysrs.eof
jsx90rs=jsx90rs+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&"%' "&sd,conn,1,3
jqk=0
jqkmd=""
do while not rs.eof
jqk=jqk+1
jqkmd=jqkmd&"["&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
jywzf=jywzf-qkf("语文")
end if
if qkf("数学")>0 then
jsxzf=jsxzf-qkf("数学")
end if
if qkf("语文")<60 then
jywbjgrs=jywbjgrs-1
elseif qkf("语文")>=60 and qkf("语文")<80 then
jyw60rs=jyw60rs-1
jywjgrs=jywjgrs-1
elseif qkf("语文")>=80 and qkf("语文")<85 then
jyw80rs=jyw80rs-1
jywjgrs=jywjgrs-1
elseif qkf("语文")>=85 and qkf("语文")<90 then
jyw85rs=jyw85rs-1
jywjgrs=jywjgrs-1
elseif qkf("语文")>=90 then
jyw90rs=jyw90rs-1
jywjgrs=jywjgrs-1
end if
if qkf("数学")<60 then
jsxbjgrs=jsxbjgrs-1
elseif qkf("数学")>=60 and qkf("数学")<80 then
jsx60rs=jsx60rs-1
jsxjgrs=jsxjgrs-1
elseif qkf("数学")>=80 and qkf("数学")<85 then
jsx80rs=jsx80rs-1
jsxjgrs=jsxjgrs-1
elseif qkf("数学")>=85 and qkf("数学")<90 then
jsx85rs=jsx85rs-1
jsxjgrs=jsxjgrs-1
elseif qkf("数学")>=90 then
jsx90rs=jsx90rs-1
jsxjgrs=jsxjgrs-1
end if
if qkf("语文")>=ys then
jywysrs=jywysrs-1
end if
if qkf("数学")>=ys then
jsxysrs=jsxysrs-1
end if
end if
qkf.close
set qkf=nothing
rs.movenext
loop
rs.close
set rs=nothing
jbrs=int(cjbrs)-jqk
if jywysrs>0 then
jywysl=jywysrs/jbrs*100
else
jywysl=0
end if
if jsxysrs>0 then
jsxysl=jsxysrs/jbrs*100
else
jsxysl=0
end if
if jywjgrs>0 then
jywjgl=jywjgrs/jbrs*100
else
jywjgl=0
end if
if jsxjgrs>0 then
jsxjgl=jsxjgrs/jbrs*100
else
jsxjgl=0
end if
if jywzf>0 then
jywpjf=jywzf/jbrs
else
jywpjf=0
end if
if jsxzf>0 then
jsxpjf=jsxzf/jbrs
else
jsxpjf=0
end if
if jywjgl<>100 and len(jywjgl)=4 then
if len(left(jywjgl,instr(jywjgl,".")-1))<2 then
if right(jywjgl,1)>=5 then
jywjgl=left(jywjgl,3)+0.1
end if
end if
elseif jywjgl<>100 and len(jywjgl)>4 then
jywjgl=left(jywjgl,instr(jywjgl,".")+2)
if right(jywjgl,1)>=5 then
jywjgl=left(jywjgl,len(jywjgl)-1)+0.1
else
jywjgl=left(jywjgl,len(jywjgl)-1)
end if
end if
if jsxjgl<>100 and len(jsxjgl)=4 then
if len(left(jsxjgl,instr(jsxjgl,".")-1))<2 then
if right(jsxjgl,1)>=5 then
jsxjgl=left(jsxjgl,3)+0.1
end if
end if
elseif jsxjgl<>100 and len(jsxjgl)>4 then
jsxjgl=left(jsxjgl,instr(jsxjgl,".")+2)
if right(jsxjgl,1)>=5 then
jsxjgl=left(jsxjgl,len(jsxjgl)-1)+0.1
else
jsxjgl=left(jsxjgl,len(jsxjgl)-1)
end if
end if
if jywysl<>100 and len(jywysl)=4 then
if len(left(jywysl,instr(jywysl,".")-1))<2 then
if right(jywysl,1)>=5 then
jywysl=left(jywysl,3)+0.1
end if
end if
elseif jywysl<>100 and len(jywysl)>4 then
jywysl=left(jywysl,instr(jywysl,".")+2)
if right(jywysl,1)>=5 then
jywysl=left(jywysl,len(jywysl)-1)+0.1
else
jywysl=left(jywysl,len(jywysl)-1)
end if
end if
if jsxysl<>100 and len(jsxysl)=4 then
if len(left(jsxysl,instr(jsxysl,".")-1))<2 then
if right(jsxysl,1)>=5 then
jsxysl=left(jsxysl,3)+0.1
end if
end if
elseif jsxysl<>100 and len(jsxysl)>4 then
jsxysl=left(jsxysl,instr(jsxysl,".")+2)
if right(jsxysl,1)>=5 then
jsxysl=left(jsxysl,len(jsxysl)-1)+0.1
else
jsxysl=left(jsxysl,len(jsxysl)-1)
end if
end if
if jywpjf<>100 and len(jywpjf)=4 then
if len(left(jywpjf,instr(jywpjf,".")-1))<2 then
if right(jywpjf,1)>=5 then
jywpjf=left(jywpjf,3)+0.1
end if
end if
elseif jywpjf<>100 and len(jywpjf)>4 then
jywpjf=left(jywpjf,instr(jywpjf,".")+2)
if right(jywpjf,1)>=5 then
jywpjf=left(jywpjf,len(jywpjf)-1)+0.1
else
jywpjf=left(jywpjf,len(jywpjf)-1)
end if
end if
if jsxpjf<>100 and len(jsxpjf)=4 then
if len(left(jsxpjf,instr(jsxpjf,".")-1))<2 then
if right(jsxpjf,1)>=5 then
jsxpjf=left(jsxpjf,3)+0.1
end if
end if
elseif jsxpjf<>100 and len(jsxpjf)>4 then
jsxpjf=left(jsxpjf,instr(jsxpjf,".")+2)
if right(jsxpjf,1)>=5 then
jsxpjf=left(jsxpjf,len(jsxpjf)-1)+0.1
else
jsxpjf=left(jsxpjf,len(jsxpjf)-1)
end if
end if
%>