?? displaycxjg.asp
字號(hào):
<!--#include file="top.asp"-->
<!--#include file="Function.asp"-->
<!--#include file="Odbc_connection.asp"-->
<!--#include file="incfirst.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="wangye9pt.css" rel="stylesheet" type="text/css">
<title><%=wtitle%></title><style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style></head>
<body>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><!--#include file="left.asp"--></td>
<td valign="top" background="images/rightbg.jpg"><table width="500" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#336699" class="w9pt">
<tr align="center" bgcolor="#FFFFFF">
<td height="50" colspan="3" >
<%
depart=request("depart")
teach=request("teach")
term=request("term")
course=request("course")
if depart="請(qǐng)選擇教師院系" or teach=Null or teach="請(qǐng)選擇教師" then
response.write"<script>alert('請(qǐng)選擇教師院系與教師名稱!');location='pingjiaone.asp'</script>"
response.End()
end if
response.Write wtitle
%></td>
</tr>
<tr align="left" bgcolor="#FFFFFF">
<td height="25" colspan="3" > <%="教師院系:"&depart %></td>
</tr>
<tr align="left" bgcolor="#FFFFFF">
<td height="25" colspan="3" ><%="教師姓名:"&teach %></td>
</tr>
<tr align="left" bgcolor="#FFFFFF">
<td height="25" colspan="3" ><%="開課學(xué)期:"&term%></td>
</tr>
<tr align="left" bgcolor="#FFFFFF">
<td height="25" colspan="3" ><%="課程名稱:"&course %></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td height="25" colspan="3" align="left" >目前參加此課程投票人數(shù):
<%
'-----------------------------------------------------------------------------------------------------------------
strsql="select count(*) as total from TEACHERSCORE where usertype=1 and TEACHERID='"&teach&"' and depart='"&depart&"' and course='"&course&"' and term='"&term&"'"
set rs=db.execute(strsql)
scorel=rs("total")
strsql="select * from TEACHERSCORE where usertype=1 and TEACHERID='"&teach&"' and depart='"&depart&"' and course='"&course&"' and term='"&term&"'"
set rs=db.execute(strsql)
scoreshowl=0
displayl=""
if scorel<>0 then
for i=1 to scorel
displayl=displayl&rs("userid")&"*"
scoredislz=split(rs("score"),"*")
lendl=ubound(scoredislz)
for j=0 to lendl
scoreshowl=cint(scoredislz(j))+scoreshowl
next
rs.movenext
next
scoreshowl=scoreshowl/scorel
len2=len(displayl)
len2=len2-1
displayl=left(displayl,len2)
end if
scoreshowl=scoreshowl/leader*100*leaderp/100
'----------------------------------------------------------------
'-------------------------計(jì)算領(lǐng)導(dǎo)平均分
strsql="select count(*) as total from TEACHERSCORE where usertype=2 and TEACHERID='"&teach&"' and depart='"&depart&"' and course='"&course&"' and term='"&term&"'"
set rs=db.execute(strsql)
set rs=db.execute(strsql)
scoret=rs("total")
scoreshowt=0
displayt=""
if scoret<>0 then
strsql="select * from TEACHERSCORE where usertype=2 and TEACHERID='"&teach&"' and depart='"&depart&"' and course='"&course&"' and term='"&term&"'"
set rs=db.execute(strsql)
for i=1 to scoret
displayt=displayt&rs("userid")&"*"
scoredistz=split(rs("score"),"*")
lendl=ubound(scoredistz)
for j=0 to lendl
scoreshowt=scoredistz(j)+cint(scoreshowt)
next
rs.movenext
next
scoreshowt=scoreshowt/scoret
len2=len(displayt)
len2=len2-1
displayt=left(displayt,len2)
end if
scoreshowt=scoreshowt/colleague*100*colleaguep/100
'-------------------------------------------------------------------------------------------------------
'--------------------------------------------------------計(jì)算dudao平均分
strsql="select count(*) as total from TEACHERSCORE where usertype=3 and TEACHERID='"&teach&"' and depart='"&depart&"' and course='"&course&"' and term='"&term&"'"
set rs=db.execute(strsql)
set rs=db.execute(strsql)
scores=rs("total")
scoreshows=0
displays=""
if scores<>0 then
strsql="select * from TEACHERSCORE where usertype=3 and TEACHERID='"&teach&"' and depart='"&depart&"' and course='"&course&"' and term='"&term&"'"
set rs=db.execute(strsql)
for i=1 to scores
displays=displays&rs("userid")&"*"
scoredissz=split(rs("score"),"*")
lendl=ubound(scoredissz)
for j=0 to lendl
scoreshows=cint(scoredissz(j))+cint(scoreshows)
next
rs.movenext
next
scoreshows=scoreshows/scores
len2=len(displays)
len2=len2-1
displays=left(displays,len2)
end if
scoreshows=scoreshows/student*100*student/100
'--------------------------------------------------------------------------
'---------------------------------------------------------------------------
strsql="select count(*) as total from TEACHERSCORE where usertype=4 and TEACHERID='"&teach&"' and depart='"&depart&"' and course='"&course&"' and term='"&term&"'"
set rs=db.execute(strsql)
set rs=db.execute(strsql)
scorest=rs("total")
scoreshowst=0
displayst=""
if scorest<>0 then
strsql="select * from TEACHERSCORE where usertype=4 and TEACHERID='"&teach&"' and depart='"&depart&"' and course='"&course&"' and term='"&term&"'"
set rs=db.execute(strsql)
for i=1 to scorest
displayst=displayst&rs("userid")&"*"
scoredisszt=split(rs("score"),"*")
lendl=ubound(scoredisszt)
for j=0 to lendl
scoreshowst=cint(scoredisszt(j))+cint(scoreshowst)
next
rs.movenext
next
scoreshowst=scoreshowst/scorest
len2=len(displayst)
len2=len2-1
displayst=left(displayst,len2)
end if
scoreshowst=scoreshowst/tscore*100*teacherp/100
'-----------------------------------------------------------------------------------
''--------------------------------------------------------------計(jì)算教師分?jǐn)?shù)
scoresum=scorel+scoret+scores+scorest
tablewid=200
if scoresum=0 then
response.Write scoresum
scoresum=1
else
response.Write scoresum
tablel=scorel/scoresum*tablewid
tablet=scoret/scoresum*tablewid
tables=scores/scoresum*tablewid
tablest=scorest/scoresum*tablewid
end if
'---------------------------------------------------------
'顯示已經(jīng)投票的總?cè)藬?shù)
mm=scoreshowt+scoreshowl+scoreshows
'顯示總份成功了曲澤豐
'----------------------------------------------------------------
%>
人 </td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td width="40%" height="25" align="left" ><% response.write "領(lǐng)導(dǎo):"&scorel&"人 占"&left(cstr(scorel/scoresum*100),4)&"%"%> </td>
<td width="60%" colspan="-1" align="left" ><table width=<%=tablel%> height="10" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="images/display1.gif"></td>
</tr>
</table></td>
</tr>
<% if scorel>0 then%>
<tr align="center" bgcolor="#FFFFFF">
<td height="25" colspan="2" align="left" >
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#336699" class="w9pt">
<%
displaylz=split(displayl,"*")
len3=ubound(displaylz)
for k=0 to len3
strsql="select * from userinfo where userName='"&displaylz(k)&"'"
set rs=db.execute(strsql)
%>
<tr align="center" bgcolor="#FFFFFF">
<td width="20%" height="20" bgcolor="#FFFFFF"><%=rs("userName")%></td>
<td width="20%" height="25" bgcolor="#FFFFFF"><%=rs("depart")%></td>
<td width="20%"><%=rs("class1")%></td>
<td width="20%"><%=rs("num")%></td>
<td width="20%">
<%
strsql="select * from TEACHERSCORE where usertype=1 and TEACHERID='"&teach&"' and depart='"&depart&"' and course='"&course&"' and term='"&term&"' and userID='"&displaylz(k)&"'"
set rs1=db.execute(strsql)
qul=split(rs1("score"),"*")
qulen1=Ubound(qul)
quscorel=0
for m=0 to qulen1
quscorel=cint(qul(m))+quscorel
next
quscorel=quscorel/leader*leaderp
response.Write "此用戶打分:"&quscorel&"分"
%></td>
</tr>
<%
next
%>
</table></td>
</tr>
<%end if %>
<tr align="center" bgcolor="#FFFFFF">
<td height="25" align="left" valign="middle" >
<% response.write "督導(dǎo):"&scoret&"人 占"&left(cstr(scoret/scoresum*100),4)&"%"%></td>
<td height="18" colspan="-1" align="left" valign="middle" ><table width=<%=tablet%> height="10" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="images/display2.gif"></td>
</tr>
</table></td>
</tr>
<% if scoret>0 then%>
<tr align="center" bgcolor="#FFFFFF">
<td height="25" colspan="2" align="left" >
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#336699" class="w9pt">
<%
displaytz=split(displayt,"*")
len3=ubound(displaytz)
for k=0 to len3
strsql="select * from userinfo where userName='"&displaytz(k)&"'"
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -