📄 admin_handle.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="../inc/func.asp"-->
<!--#include file="../inc/md5.asp"-->
<%
'**************** 后台管理系统首页 *************
'** File: admin/index.asp V1.0 2005.05.08
'** Author: wwxbei
'***********************************************
if session("isAdminLoged")<>"logined" then
Response.Write FSOFileRead("../html/admin_login.txt")
Response.End
End if
if Request.Form("action")="add" then
Select Case Request.Form("tixing")
Case "1"
addChoice()
Case "2"
addChoice()
Case "3"
addJudge()
Case "4"
addFillin()
Case "5"
addCalcul()
Case "6"
addCalcul()
End Select
Response.Redirect "admin_tiku.asp?action=list&tixing="&Request.Form("tixing")
End if
if Request.Form("action")="edit" then
Select Case Request.Form("tixing")
Case "1"
editChoice()
Case "2"
editChoice()
Case "3"
editJudge()
Case "4"
editFillin()
Case "5"
editCalcul()
Case "6"
editCalcul()
End Select
Response.Redirect "admin_tiku.asp?action=list&tixing="&Request.Form("tixing")
End if
if Request.QueryString("action")="del" then
Select Case Request.QueryString("tixing")
Case "1"
delChoice()
Case "2"
delChoice()
Case "3"
delJudge()
Case "4"
delFillin()
Case "5"
delCalcul()
Case "6"
delCalcul()
End Select
end if
Sub delChoice()
DBConnBegin()
Conn.Execute("delete from choice where id="&Request.QueryString("id"))
DBConnEnd()
Response.Redirect "admin_tiku.asp?action=list&tixing="&Request.QueryString("tixing")
End Sub
Sub delJudge()
DBConnBegin()
Conn.Execute("delete from judgment where id="&Request.QueryString("id"))
DBConnEnd()
Response.Redirect "admin_tiku.asp?action=list&tixing="&Request.QueryString("tixing")
End Sub
Sub delFillin()
DBConnBegin()
Conn.Execute("delete from fillin where id="&Request.QueryString("id"))
DBConnEnd()
Response.Redirect "admin_tiku.asp?action=list&tixing="&Request.QueryString("tixing")
End Sub
Sub delCalcul()
DBConnBegin()
Conn.Execute("delete from calculation where id="&Request.QueryString("id"))
DBConnEnd()
Response.Redirect "admin_tiku.asp?action=list&tixing="&Request.QueryString("tixing")
End Sub
Sub addChoice()
DBConnBegin()
Rs.open "select * from choice where id is null",conn,3,3
Rs.addnew
Rs("question") = Request.Form("question")
Rs("A") = Request.Form("A")
Rs("B") = Request.Form("B")
Rs("C") = Request.Form("C")
Rs("D") = Request.Form("D")
Rs("difficulty") = Request.Form("difficulty")
Rs("chapter") = Request.Form("chapter")
Rs("answer") = Request.Form("answer")
Rs("type") = CInt(Request.Form("tixing"))
Rs("score") = Request.Form("score")
Rs.update
DBConnEnd()
End Sub
Sub addJudge()
DBConnBegin()
Rs.open "select * from judgment where id is null",conn,3,3
Rs.addnew
Rs("question") = Request.Form("question")
Rs("answer") = CBool(CInt(Request.Form("answer")))
Rs("difficulty") = Request.Form("difficulty")
Rs("chapter") = Request.Form("chapter")
Rs("score") = Request.Form("score")
Rs.update
DBConnEnd()
End Sub
Sub addFillin()
DBConnBegin()
Rs.open "select * from fillin where id is null",conn,3,3
Rs.addnew
Rs("question") = Request.Form("question")
Rs("answer") = Request.Form("answer")
Rs("difficulty") = Request.Form("difficulty")
Rs("chapter") = Request.Form("chapter")
Rs("score") = Request.Form("score")
Rs.update
DBConnEnd()
End Sub
Sub addCalcul()
DBConnBegin()
Rs.open "select * from calculation where id is null",conn,3,3
Rs.addnew
Rs("question") = Request.Form("question")
Rs("answer") = Request.Form("answer")
Rs("type") = CInt(Request.Form("tixing"))
Rs("difficulty") = Request.Form("difficulty")
Rs("chapter") = Request.Form("chapter")
Rs("score") = Request.Form("score")
Rs.update
DBConnEnd()
End Sub
Sub editChoice()
DBConnBegin()
Rs.open "select * from choice where id="&Request.form("id"),conn,3,3
Rs("question") = Request.Form("question")
Rs("A") = Request.Form("A")
Rs("B") = Request.Form("B")
Rs("C") = Request.Form("C")
Rs("D") = Request.Form("D")
Rs("answer") = Request.Form("answer")
Rs("difficulty") = Request.Form("difficulty")
Rs("chapter") = Request.Form("chapter")
Rs("score") = Request.Form("score")
Rs("type") = CInt(Request.Form("tixing"))
Rs.update
DBConnEnd()
End Sub
Sub editJudge()
DBConnBegin()
Rs.open "select * from judgment where id="&Request.form("id"),conn,3,3
Rs("question") = Request.Form("question")
Rs("answer") = CBool(CInt(Request.Form("answer")))
Rs("difficulty") = Request.Form("difficulty")
Rs("chapter") = Request.Form("chapter")
Rs("score") = Request.Form("score")
Rs.update
DBConnEnd()
End Sub
Sub editFillin()
DBConnBegin()
Rs.open "select * from fillin where id="&Request.form("id"),conn,3,3
Rs("question") = Request.Form("question")
Rs("answer") = Request.Form("answer")
Rs("type") = CInt(Request.Form("tixing"))
Rs("difficulty") = Request.Form("difficulty")
Rs("chapter") = Request.Form("chapter")
Rs("score") = Request.Form("score")
Rs.update
DBConnEnd()
End Sub
Sub editCalcul()
DBConnBegin()
Rs.open "select * from calculation where id="&Request.form("id"),conn,3,3
Rs("question") = Request.Form("question")
Rs("answer") = Request.Form("answer")
Rs("type") = CInt(Request.Form("tixing"))
Rs("difficulty") = Request.Form("difficulty")
Rs("chapter") = Request.Form("chapter")
Rs("score") = Request.Form("score")
Rs.update
DBConnEnd()
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -