
<!--#include file="conn.asp"-->

<%
'--------------------------------------------------------------------
'读入数据时,就是将Char(10)转换为&lt;br&gt;,可以加载下面两个函数
 function  ChkBadWords(fString)   
          if   not(isnull(BadWords)   or   isnull(fString))   then   
          bwords   =   split(BadWords,   "|")   
          for   i   =   0   to   ubound(bwords)   
                  fString   =   Replace(fString,   bwords(i),   string(len(bwords(i)),"*"))     
          next   
          ChkBadWords   =   fString   
          end   if   
  end   function  

function  HTMLEncode(fString)   
  if   not   isnull(fString)   then   
          fString   =   replace(fString,">","&gt;")   
          fString   =   replace(fString,"<","&lt;")   
    
          fString   =   Replace(fString, CHR(32),"&nbsp;")   
          fString   =   Replace(fString, CHR(9),"&nbsp;")   
          fString   =   Replace(fString, CHR(34),"&quot;")   
          fString   =   Replace(fString, CHR(39),"&#39;")   
          fString   =   Replace(fString, CHR(13),"")   
          fString   =   Replace(fString, CHR(10)&CHR(10), "<BR><BR>")   
          fString   =   Replace(fString, CHR(10),"<BR>")   
          fString=ChkBadWords(fString)   
          HTMLEncode   =   fString   
  end   if   
  end function  
'-------------------------------------------------------------------


tid=request("id")
tclass=request("txtclass")
tname=trim(request("txtname"))
Teacher=request("Teacher")
tSemester=request("Semester")

tlate=request("txtlate")
tabseences=request("txtabseences")
tsick=request("txtsick")

tmerit=replace(request("merit"),"'","")
tmerit=HTMLEncode(tmerit)

tpingjia=replace(request("pingjia"),"'","")
tpingjia=HTMLEncode(tpingjia)

'response.Write tmerit&"------------------"
'response.End()
 set rs=server.createobject("ADODB.Recordset") 
     sql="select * from student where id="&tid
     rs.open sql,conntmp,3,3
%>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="style/t.css" type="text/css">
<title>save</title>

<%
if tSemester="Semester1" then
	if Teacher="Supervisor" then 
	    rs("merit1")=tmerit
		rs("general1")=tpingjia
		rs("late")=tlate
		rs("Absences")=tabseences
		rs("sick")=tsick
	else
		rs(Teacher&"1")=tpingjia
		
	end if
elseif tSemester="Semester2" then
	if Teacher="Supervisor" then 
		rs("merit2")=tmerit
		rs("general2")=tpingjia
		rs("late")=tlate
		rs("Absences")=tabseences
		rs("sick")=tsick
	else
		rs(Teacher&"2")=tpingjia
		
	end if



end if


rs.update
rs.close
set rs=nothing


%>



<body>
<center>
<table width="60%" border="1" cellpadding="4" cellspacing="0" bordercolorlight="#848284" bordercolordark="#FFFFFF">
  <tr>
    <td width="100%" height="25"><p align="center"></td>
  </tr>
  <tr>
    <td align="center" class="altbg1">&nbsp;

<form action="reportsel.asp" method="post">
<input name="txtclass" type="hidden" value="<%=tclass%>">
<input name="Teacher" type="hidden" value="<%=teacher%>">
<input name="Semester" type="hidden" value="<%=tSemester%>">
<input value="Edit sucessful , please click here and back main page." type="submit">
</form>
	
	</td>
  </tr>
  <tr>
    <td width="100%" align="center" height="25">&nbsp;</td>
  </tr>
</table>
</center>
</body>
</html>












