网络考场(7)(转)taddquestion.asp

网络

<%@ Language=VBScript %>
<%
if Request.ServerVariables("http_method")="POST" then
    if Request.Form("submit")="加入" then
    '处理加入试题请求
        set mrs=server.CreateObject("adodb.recordset")
        mrs.ActiveConnection="dsn=testsys"
        mrs.Source="select * from question"
        mrs.Open ,,1,3
        '往数据库的表question中加入试题内容
        mrs.AddNew
        mrs("teachid")=session("teachid")
        mrs("sub")=Request.Form("selsub")
        mrs("question")=Request.Form("question")
        mrs("A")=Request.Form("opta")
        mrs("B")=Request.Form("optb")
        mrs("C")=Request.Form("optc")
        mrs("D")=Request.Form("optd")
        mrs("answer")=Request.Form("answer")
        mrs.Update
        mrs.Close
        set mrs=nothing
    end if
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<FORM action="taddquestion.asp" method=post id=form1 name=form1>
<P><STRONG><FONT color=crimson face=幼圆
size=4>往试题库里加入试题</FONT></STRONG></P>

<P>课程---
<%Response.Write Request.Form("selsub")%></P>

<P>
<TABLE border=0 cellPadding=1 cellSpacing=1 width=90%>
    
    <TR>
        <TD>题目</TD></TR>
    <TR>
        <TD><TEXTAREA id=TEXTAREA1 name=question style="HEIGHT: 114px; WIDTH: 60%"></TEXTAREA></TD></TR>
    <TR>
        <TD>选择答案
    <TR>
        <TD>A.
<INPUT id=text1 name=opta style="HEIGHT: 21px; WIDTH: 40%">
    <TR>
        <TD>

<P>B.
<INPUT id=text2 name=optb style="HEIGHT: 21px; WIDTH: 40%"></P>
    <TR>
        <TD>C.
<INPUT id=text3 name=optc style="HEIGHT: 21px; WIDTH: 40%">
    <TR>
        <TD>

<P>D.
<INPUT id=text4 name=optd style="HEIGHT: 21px; WIDTH: 40%"></P>
    <TR>
        <TD>

<P>正确答案
<INPUT id=radio1 name=answer type=radio value=A>A
<INPUT id=radio2 name=answer type=radio value=B>B
<INPUT id=radio3 name=answer type=radio value=C>C
<INPUT id=radio4 name=answer type=radio value=D>D
</P>
</TD></TR></TABLE><INPUT id=submit1 name=submit type=submit value=加入>
<%
'用类型为hidden的input保存目前加入试题库的科目名称
Response.Write "<input type=hidden name=selsub value=" & Request.Form("selsub") & ">"
%>
</P>
</FORM>
</BODY>
</HTML>

时间: 2025-01-21 10:28:32

网络考场(7)(转)taddquestion.asp的相关文章

网络考场(16)(转)tselectsub.asp

select|网络 <%@ Language=VBScript %><%Response.Buffer=true%><HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"></HEAD><BODY bgColor=Azure><%if Request.QueryString("a

网络考场(6)(转)stselectsub.asp

select|网络 <%@ Language=VBScript %><%if Request.Form("selsub")<>"" then'如果选择了考科目,则进入考试界面    marray=split(Request.Form("selsub"),",")    '保存考试科目的教师编号    session("teachid")=trim(marray(0))    '

网络考场(2)(转)screatefrm1.asp

<%@ Language=VBScript %><html><head><title>网络考场</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><frameset rows="*" cols="120,509*" borde

网络考场(4)(转)smessage.asp

<%@ Language=VBScript %><%'计算考试已过时间gotime=hour(now())*60+minute(now())-hour(session("starttime"))*60-minute(session("starttime"))'计算考试剩余时间lefttime=session("testtime")-gotime%><HTML><HEAD><META http-

网络考场(1)(转)logon.asp

<%@ Language=VBScript %><%if Request.ServerVariables("http_method")="POST" then    if Request.Form("submit")="进入1" then        '学生进入网络考场的处理        set conn=server.CreateObject("adodb.connection") 

网络考场(13)(转)testtop.asp

网络 <%@ Language=VBScript %><HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"></HEAD><BODY><P align=center><STRONG><FONT color=crimson face=幼圆 size=4>网络考场:<

网络考场(10)(转)tcreatefrm2.asp

网络 <%@ Language=VBScript %><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><frameset rows="*" cols="120,

网络考场(8)(转)taddstudent.asp

网络 <%@ Language=VBScript %><HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"></HEAD><BODY><%if Request.ServerVariables("http_method")="POST" and Request.

网络考场(15)(转)tselcourse.asp

网络 <%@ Language=VBScript %><HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"></HEAD><BODY><P align=center><FONT color=crimson face=幼圆 size=4><STRONG>选择要查看的课程&