📄 ext_score_update.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="const.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="img/Style.css" rel="stylesheet" type="text/css" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
-->
</style>
</head>
<body>
<%
dim term_spe_mark,term_spe_reason
term_spe_mark=pc_term&"_spe_mark"
term_spe_reason=pc_term&"_spe_reason"
action=Request("action")
if action="update" then
on error resume next
user_no=safeChar(trim(Request.Form("user_no")))
mark=safeChar(trim(Request.Form("mark")))
reason=replace(safeChar(trim(Request.Form("reason"))),"#","")
on error resume next
set c = Server.CreateObject("ADODB.Command")
c.ActiveConnection = dbconn
c.CommandText = "update pc_user set "&term_spe_mark&"='"&mark&"',"&term_spe_reason&"='"&reason&"' where user_no='"&user_no&"'"
c.CommandType = 1
c.CommandTimeout = 0
c.Prepared = true
c.Execute()
if err.number="0" then
Response.Write("<script language='javascript'>alert('学号为:"&user_no&"的资料修改成功');location=('ext_score.asp');</script>")
else
Response.Write("<li>输入的数据有问题</li>")
end if
%>
<%else
user_no=Request("user_no")
Dim rs1
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.ActiveConnection = dbconn
rs1.Source = "SELECT user_no,user_name,"&term_spe_mark&","&term_spe_reason&" FROM pc_user where user_no='"&user_no&"'"
rs1.CursorType = 0
rs1.CursorLocation = 2
rs1.LockType = 1
rs1.Open()
if rs1.eof then response.Write("系统错误") end if
%>
<p> </p>
<p> </p>
<p> </p>
<form name="form" action="" method="post" onsubmit="return chk()">
<table width="94%" border="0" align="center" cellpadding="1" cellspacing="0" class="atable1">
<tr>
<td colspan="8" bgcolor="#333"><span class="STYLE1"> 特加分修改</span></td>
</tr>
<tr>
<td height="30" colspan="8" class="tdmenu"> </td>
</tr>
<tr>
<td width="12%" class="tdmenu"><div align="center">学号:</div></td>
<td width="12%" class="tdmenu">
<div align="center"><%=rs1(0)%></div></td>
<td width="11%" class="tdmenu">
姓名:</td>
<td width="4%" class="tdmenu"><div align="center"><%=rs1(1)%></div></td>
<td width="18%" class="tdmenu"><div align="center">得分:</div></td>
<td colspan="3" class="tdmenu">
<div align="left">
<input name="mark" type="text" class="atable1" id="mark" value="<%=rs1(2)%>" size="4" maxlength="4" />
可以为负数,负数代表扣分</div>
<div align="left"></div></td>
</tr>
<tr>
<td height="50" colspan="7" class="tdmenu"> 理由:
<input name="reason" type="text" class="atable1" id="reason" value="<%=rs1(3)%>" size="80" maxlength="150" /></td>
<td width="21%" height="30" class="tdmenu"><input name="提交" type="submit" class="tdmenu" id="提交" value="提交" />
<input name="重填" type="reset" class="tdmenu" id="重填" value="重填" />
<input type="hidden" name="action" value="update" />
<input name="user_no" type="hidden" id="user_no" value="<%=rs1(0)%>" />
</td>
</tr>
</table>
</form>
<%
rs1.close
set rs1=nothing
end if%>
</body>
</html>
<%dbconn.close%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -