knowledgesave.asp

来自「网络考试系统最终备份」· ASP 代码 · 共 41 行

ASP
41
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.inc"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<%
 v_subid=request("subid")
 v_know = request("subject_knowledge")
 v_uid = request.Cookies("userid")
 sql = "select * from knowledge_info where Sub_ID = "&v_subid&" and KnowName = '"&v_know&"'"
 set rs = server.CreateObject("adodb.recordset")
 rs.open sql,conn,3,2
 if rs.eof then
  datetime = date&" "&time
 rs.addnew
 rs("Sub_ID") = v_subid
 rs("KnowName") = v_know
 rs("set_User_ID") = v_uid
 rs("setTime") = now()
 rs.update
 rs.close
 set rs = nothing
 conn.close
 set conn = nothing
 Response.Write("<script>alert(""知识点添加成功!"");location.href=""adminknowlege.asp"";</script>")
 else
  rs.close
 set rs = nothing
 conn.close
 set conn = nothing
  Response.Write("<script>alert(""知识点添加失败,知识点重复!"");location.href=""adminknowlege.asp"";</script>")
 end if
%>
</body>
</html>

⌨️ 快捷键说明

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