Network examination Room (11) (Turn) teditquestion.asp

Source: Internet
Author: User
Network <%@ language=vbscript%>
<%
If Request.ServerVariables ("http_method") = "POST" Then
' Submit the question to the way of operation
Set Mrs=server. CreateObject ("Adodb.recordset")
Mrs. activeconnection= "Dsn=testsys"
Mrs. Source= "SELECT * from question where teachid= '" & Session ("Teachid") & "' and Sub= '" & Request.Form ("Selsub") & "'"
' Open a recordset that is the same name as the current teacher number and selection course
Mrs. Open, 1,3
If Request.Form ("submit") = "Delete" Then
' Perform the delete operation
Page=request.form ("page")
' Point to the record you want to delete
Mrs. Pagesize=1
Mrs. Absolutepage=page
' Delete and update
Mrs. Delete
Mrs. Update
If Request.Form ("page") >1 Then
Page=request.form ("page")-1
Else
Page=1
End If
End If
If Request.Form ("submit") = "Modify" Then
' Perform a modification operation
Page=request.form ("page")
' Point to the record you want to modify
Mrs. Pagesize=1
Mrs. Absolutepage=page
' Modify the current record based on the content submitted
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
Page=request.form ("page")
ElseIf Request.Form ("submit") = "previous One" then
' Perform a request to view the previous record
Page=request.form ("page")-1
ElseIf Request.Form ("submit") = "the latter" then
' Perform a request to view the latter record
Page=request.form ("page") +1
ElseIf Request.Form ("submit") = "OK" then
' Set the number of pages to 1 when entering the page from the selected course page
Page=1
End If
If not Mrs. BOF and not Mrs. EOF Then
' If the selected database is not empty
Mrs. Pagesize=1
Mrs. Absolutepage=page
' The variable that holds the total number of questions
Quesnum=mrs. PageCount
' The variable that holds the serial number of the current topic
Currques=page
' The variable that holds the content of the topic
Question=mrs ("question")
' The variable that holds the question selection answer a-d content
Opta=mrs ("A")
&nb



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.