📄 save_try_add.asp
字号:
<!--
****************************************************************
*
* 『CnSohoW作品』 OnlineExam V1.1
*
* 版权所有: 『cnsohow』
*
* 程序制作: CnSohoW『firekinger』
*
* 主页地址: http://www.cnsohow.com/
* E-MAIL: firekinger@163.com
*
****************************************************************
* Copyright (C) 2002 cnsohow.com All Rights Reserved
****************************************************************
*
* 【 版权声明 】
*
* 本系统只作为一种技术交流,不能用于商业,希望能给予合作。
*
****************************************************************
*
* 如果你在使用这个程序的过程中有什么错误、意见、建议,请及时
* 告诉我,谢谢!
*
****************************************************************
*
* 安装说明:
*
* 默认的后台数据管理员用户名和密码都是:admin
* 默认的验证密码都是:firekinger
*
****************************************************************几几点说明:
题库中的数据只作测试,不为真实,若要实施还需删除各题表,重新建表。具体过程如下:
a) 先点击题库信息浏览,删除无用题表,注意:正修改的数据题表不能删除!
b) 添加题库建表,注意:数据表名是一次性的,建了就不能修改表名
c) 在试题后台设置中,选择要修改的考试题目,点击修改否
d) 再点击添加试题数据,添加相关考试试题,注意:在判断题中,对的写“A”,错的写“B”
e) 最后浏览选择试题,检查修改您所添加的试题。
****************************************************************
* Copyright (C) 2002 cnsohow.com All Rights Reserved
****************************************************************
-->
<!--#include file="../include/conn2.asp"-->
<%
tryId=Cint(trim(request("Id")))
tryselectT=request("selectT")
tryselectN=request("selectN")
trycent=trim(request("cent"))
trycent=Cint(trycent)
trysubject=trim(request("subject"))
tryselectQ=UCase(trim(request("selectQ")))
if tryselectT<>"1" then
tryselectQL=Len(tryselectQ)
for i=1 to tryselectQL
tryselectQOne=Mid(tryselectQ,i,1)
'验证重复字符
for j=2 to tryselectQL
TempNum=inStr(i,tryselectQ,tryselectQOne)
if TempNum<>0 then
session("sa_help")="记录添加失败,"&tryselectQ&"是非法答案(内有重复),请重试!"
response.Redirect("try_add.asp")
end if
next
'验证字符是否在ABCD内
if tryselectQOne>"D" or tryselectQOne<"A" then
session("sa_help")="记录添加失败,"&tryselectQ&"是非法答案(不是ABCD),请重试!"
response.Redirect("try_add.asp")
end if
next
tryselA=request("selA")
tryselB=request("selB")
tryselC=request("selC")
tryselD=request("selD")
insertSql="insert into "&Session("DbnameT")&" values("&tryId&",'"&tryselectT&"','"&tryselectN&"',"&trycent&",'"&trysubject&"','"&tryselA&"','"&tryselB&"','"&tryselC&"','"&tryselD&"','"&tryselectQ&"')"
else
if tryselectQ<>"A" and tryselectQ<>"B" then
session("sa_help")="记录添加失败,请在判断题答案中添加“A”或“B”!"
response.Redirect("try_add.asp")
end if
if tryselectQ="A" then
tryselectQ="1"
else
tryselectQ="0"
end if
insertSql="insert into "&Session("DbnameT")&" values("&tryId&",'"&tryselectT&"','"&tryselectN&"',"&trycent&",'"&trysubject&"','','','','','"&tryselectQ&"')"
end if
'response.write(insertSql)
'response.end()
set rsT=conn.execute(insertSql)
session("sa_help")="上条记录添加完毕!"
response.Redirect("try_add.asp")
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -