⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pg_tjzyok.asp

📁 在线教育
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/conn.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
  If condition = "" Then
    MM_IIf = ifFalse
  Else
    MM_IIf = ifTrue
  End If
End Function
%>
<%
If (CStr(Request("MM_update")) = "form") Then
  If (Not MM_abortEdit) Then
    ' execute the update
    Dim MM_editCmd

    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_conn_STRING
    MM_editCmd.CommandText = "UPDATE tijiao SET zy_cs = ?, zy_km = ?, zy_teacher = ?, zy_title = ?, zy_studentid = ?, zy_grade = ?, zy_comment = ?, ifexample = ?, ifread = ? WHERE id = ?" 
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("zy_cs")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, Request.Form("zy_km")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 50, Request.Form("zy_teacher")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 203, 1, 536870910, Request.Form("zy_title")) ' adLongVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 50, Request.Form("zy_studentid")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 50, Request.Form("zy_grade")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 202, 1, 50, Request.Form("zy_comment")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 5, 1, -1, MM_IIF(Request.Form("ifexample"), Request.Form("ifexample"), null)) ' adDouble
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 5, 1, -1, MM_IIF(Request.Form("ifread"), Request.Form("ifread"), null)) ' adDouble
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 5, 1, -1, MM_IIF(Request.Form("MM_recordId"), Request.Form("MM_recordId"), null)) ' adDouble
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "pg_tjzyok1.asp"
    If (Request.QueryString <> "") Then
      If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
        MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
      Else
        MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
      End If
    End If
    Response.Redirect(MM_editRedirectUrl)
  End If
End If
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("id") <> "") Then 
  Recordset1__MMColParam = Request.QueryString("id")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_conn_STRING
Recordset1_cmd.CommandText = "SELECT * FROM tijiao WHERE id = ?" 
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 5, 1, -1, Recordset1__MMColParam) ' adDouble

Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../Admin_Style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #D6DFF7;
}
.t3 {	color: #000000;
	background-color: #eaf1fb;
	border: 1px solid #3d5a83;
	font-size: 12px;
}
-->
</style></head>

<body text="#000000">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="topbg"> 
    <td height="22" colspan="2" align="center"><strong>作 业 系 统 管 理</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td width="129" height="30"><strong>管理导航:</strong></td>
    <td width="775" height="30"><a href="pg_tjzy.asp">批改作业</a>| <a href="ypg_tjzy.asp">已批改作业的查看</a></td>
  </tr>
</table>

<form name="form" method="POST" action="<%=MM_editAction%>">
  <table width="100%" border="0" cellspacing="1" cellpadding="2" class="border">
    <tr class="title">
      <td height="25" colspan="2"><div align="center"><strong>批 改 学 员 作 业</strong></div></td>
    </tr>
    <tr class="tdbg">
      <td width="248" height="20" class="tdbg"><div align="right">作业次数:</div></td>
      <td width="656" class="tdbg"> 第
        <input name="zy_cs" type="text" class="t3" value="<%=(Recordset1.Fields.Item("zy_cs").Value)%>" size="5" readonly>
次</td>
    </tr><tr>
          <td width="248" height="20" align="right">作业所属科目:</td>
      <td height="20" width="656"><input name="zy_km" type="text" class="t3" value="<%=(Recordset1.Fields.Item("zy_km").Value)%>" size="30" readonly>          </td>
        </tr>
<tr>
          <td height="20" width="248"><div align="right">任课教师:</div></td>
      <td height="20" width="656"><input name="zy_teacher" type="text" class="t3" value="<%=(Recordset1.Fields.Item("zy_teacher").Value)%>" size="30" readonly>          </td>
    </tr>
<tr>
      <td height="20" width="248">
        <div align="right">作业题目:
        </div>
</td>
      <td height="20" width="656"><textarea name="zy_title" class="t3" cols="50" rows="10" readonly><%=(Recordset1.Fields.Item("zy_title").Value)%></textarea>          </td>
    </tr>
            <tr>
          <td width="248" height="20" align="right"><div align="right">作业内容:</div></td>
          <td height="20" width="656"><%=(Recordset1.Fields.Item("content").Value)%></td>
    </tr>
        <tr>
          <td width="248" height="20" align="right">      
            <div align="right">作业提交人帐号:</div></td>
          <td height="20" width="656"><input name="zy_studentid" type="text" class="t3" value="<%=(Recordset1.Fields.Item("zy_studentid").Value)%>" size="30" readonly>          </td>
    </tr>
 <td width="248" height="20" align="right">      
      <div align="right">该作业等级:</div></td>
          <td height="20" width="656"><input <%If Recordset1.Fields.Item("zy_grade").Value ="优秀" Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="zy_grade" value="优秀">
            优秀
            <input <%If Recordset1.Fields.Item("zy_grade").Value="良好" Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="zy_grade" value="良好">
            良好
            <input <%If Recordset1.Fields.Item("zy_grade").Value= "及格" Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="zy_grade" value="及格" >
            及格
            <input <%If Recordset1.Fields.Item("zy_grade").Value ="不及格" Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="zy_grade" value="不及格">
      不及格</td>
        </tr>
<tr>
      <td width="248" height="20" align="right"><div align="right">作业评语:</div></td>
      <td height="20" width="656"><textarea name="zy_comment" class="t3" cols="60" rows="8" value="暂无评语"><%=(Recordset1.Fields.Item("zy_comment").Value)%></textarea>          </td>
    </tr>
<tr>
          <td width="248" height="20" align="right">      
      <div align="right">是否推荐为范例:</div></td>
          <td height="20" width="656"><input <%If Recordset1.Fields.Item("ifexample").Value =True Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="ifexample" value="1">
            <input <%If Recordset1.Fields.Item("ifexample").Value =false Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="ifexample" value="0" >
      否</td>
    </tr>
    <tr class="tdbg">
      <td height="38" colspan="2" class="tdbg"><table width="400" border="0" cellspacing="0" cellpadding="0" height="20" align="center">
        <tr>
          <td height="20">           
            <input type="submit" name="pigai" value="保存" class="t3">
            
            <input type="reset" name="clear" value="清除" class="t3">
            <input name="ifread" type="hidden" id="ifread" value="1">
            &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1)">返回</a> </td>
        </tr>
      </table></td>
    </tr>
  </table>

  <input type="hidden" name="MM_update" value="form">
  <input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("id").Value %>">
</form>
<br>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -