📄 pingjia.asp
字号:
<%userok%>
<!--#include file="top.asp"-->
<!--#include file="Function.asp"-->
<!--#include file="Odbc_connection.asp"-->
<!--#include file="incsub.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">
</head>
<body>
<table width="786" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="188" rowspan="2" valign="top" background="images/lefttiao.jpg"><!--#include file="left.asp"--></td>
<td height="20" colspan="2"><img src="images/righttop.jpg" width="598" height="20"></td>
</tr>
<tr>
<td width="589" height="600" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> </tr>
</table>
<form action="pingjiaok.asp" method="post" name="addform" id="addform">
<table width="95%" border="0" cellpadding="0" cellspacing="1" bgcolor="#336699" class="w9pt">
<tr align="center" bgcolor="#FFFFFF">
<td colspan="8" class="W12pt">数学与计算机学院教师评价考查表</td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td colspan="8" class="W12pt">欢迎
<%
usertype=session("usertype")
if usertype=1 then
response.Write "领导"
elseif usertype=2 then
response.Write "同行"
else
response.Write "学生"
end if
%>
参加投票</td>
</tr>
<tr align="left" bgcolor="#FFFFFF">
<td height="20" colspan="5" >
<%
depart=request.Form("addone_id")
teach=request.Form("addtwo_id")
if depart="请选择教师院系" or teach=Null or teach="请选择教师" then
response.write"<script>alert('请选择教师院系与教师名称!');location='pingjiaone.asp'</script>"
response.End()
end if
depart=cint(depart)
teach=cint(teach)
strsql="select * from department where id="&depart
set rs=db.execute(strsql)
depart=rs("department")
strsql="select * from teacher where id="&teach
set rs=db.execute(strsql)
teach=rs("teachername")
response.write "教师院别:<font color='#FF33cc'>"&depart&"</font> 教师姓名:<font color='#FF33cc'>"&teach&"</font>"
%>
<input name="depart" type="hidden" id="depart" value="<%=depart%>">
<input name="teach" type="hidden" id="teach" value="<%=teach%>"></td>
</tr>
<tr align="left" bgcolor="#FFFFFF">
<td colspan="5" >
<%
connstr="DBQ="+server.mappath("database/HRBU.mdb")+";DRIVER={Microsoft Access Driver (*.mdb)}"
Set conn= Server.CreateObject("ADODB.Connection")
conn.open connstr
sql = "select * FROM TEACHERCOURSE where teachername='"&teach&"' and department='"&depart&"'order by ID desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1%>
<script language = "JavaScript">
var onecount1;
onecount1=0;
subcat1 = new Array();
<%count = 0
do while not rs.eof%>
subcat1[<%=count%>] = new Array("<%= trim(rs("COURSE"))%>","<%= trim(rs("TERMID"))%>","<%= trim(rs("ID"))%>");
<%count = count + 1
rs.movenext
loop
rs.close
set rs=nothing%>
onecount1=<%=count%>;
function changelocation1(addone)
{
document.addform.addtwo_id.length = 0;
var addone_id=addone_id;
var i;
document.addform.addtwo_id.options[0] = new Option('请选择教师课程','');
for (i=0;i < onecount1; i++)
{
if (subcat1[i][1] == addone)
{
document.addform.addtwo_id.options[document.addform.addtwo_id.length] = new Option(subcat1[i][0], subcat1[i][2]);
}
}
}
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr> <td width="85%" height="40" bgcolor="#FFFFFF"><select name="addone_id" onChange="changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value)">
<option value="" selected>请选择教师开课学期</option>
<%
sql="select * from TERM order by ID desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("id")%>"><%=rs("TERM")%></option>
<%rs.movenext
wend
rs.Close()
%>
</select>
<select name="addtwo_id">
<option selected value="">请选择教师课程</option>
</select>
</td>
</tr>
</table>
<script language="javascript">
changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value);
</script> </td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td colspan="5" >
</td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td colspan="5" ><%
if usertype=1 then
call display3()
elseif usertype=2 then
call display2()
else
call display1()
end if
%></td>
</tr>
<tr align="center" valign="bottom" bgcolor="#FFFFFF">
<td height="50" colspan="5" align="left" >目前参加投票:
<%
strsql="select count(*) as total from TEACHERSCORE where usertype=1"
set rs=db.execute(strsql)
scorel=rs("total")
strsql="select count(*) as total from TEACHERSCORE where usertype=2"
set rs=db.execute(strsql)
scoret=rs("total")
strsql="select count(*) as total from TEACHERSCORE where usertype=3"
set rs=db.execute(strsql)
scores=rs("total")
scoresum=scorel+scoret+scores
response.Write scoresum
if scoresum=0 then
scoresum=1
end if
tablewid=200
tablel=scorel/scoresum*tablewid
tablet=scoret/scoresum*tablewid
tables=scores/scoresum*tablewid
'---------------------------------------------------------
'显示已经投票的总人数
%>人</td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td height="25" colspan="3" align="left" >
<% response.write "领导:"&scorel&"人 占"&left(cstr(scorel/scoresum*100),4)&"%"%> </td>
<td width="74%" align="left" ><table width=<%=tablel%> height="10" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="images/display1.gif"></td>
</tr>
</table></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td height="25" colspan="3" align="left" valign="middle" >
<% response.write "同行:"&scoret&"人 占"&left(cstr(scoret/scoresum*100),4)&"%"%></td>
<td height="25" 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>
<tr align="center" bgcolor="#FFFFFF">
<td height="25" colspan="3" align="left" valign="middle" ><% response.write "学生:"&scores&"人 占"&left(cstr(scores/scoresum*100),4)&"%"%></td>
<td height="25" align="left" valign="middle" ><table width=<%=tables%> height="10" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="images/display3.gif"></td>
</tr>
</table></td>
</tr>
<TR bgcolor="#FFFFFF">
<TD colspan="5" align="center"><input type="submit" name="Submit" value="提交">
<input name="SHU" type="hidden" id="SHU" value="<%=usertype%>"></TD>
</TR>
</table>
</form></td>
<td width="9" background="images/rightright.jpg"></td>
</tr>
</table>
</body>
</html>
<!--#include file="foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -