<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <%Session.CodePage=65001%> <% '================ CHECK USER START ============================ '本部分代码用于判断用户是否已经是老用户,随机生成用户名,自动注册。以本地COOKIE内的信息来判断用户是否为老用户。 '============================================================== '先检查本地是否已存在COOKIE if request.cookies("WinSeer_OnLineTest_Book")("User")<>"" then'有COOKIE KS_UserName = request.cookies("WinSeer_OnLineTest_Book")("User") else '没有COOKIE '随机生成用户名 Randomize PostRanNum = Int(90000*rnd)+10000 KS_UserName = Year(now) & Month(now) & Day(now) & Hour(now) & Minute(now) & Second(now) & Cstr(PostRanNum) end if ' 获取IP地址 function getip() if request.servervariables("Http_X_Forwarded_For") = "" then getip = request.servervariables("Remote_Addr") else getip = request.servervariables("Http_X_Forwarded_For") getip = replace(getip, "'", "") end function '保存注册用户信息 Set infoadd = Server.CreateObject("ADODB.RecordSet") Sql = "Select * From [KS] Where KS_UserName='"& KS_UserName &"'" infoadd.Open Sql,Conn,1,3 if not infoadd.bof or not infoadd.eof then '该用户名称已存 session("KS_Name") = KS_UserName session("KS_level") = infoadd("KS_level") session("KS_ID")=infoadd("id") else infoadd.addNew infoadd("KS_Password") = "123456" infoadd("KS_UserName") = KS_UserName infoadd("KS_level") = 0 infoadd("KS_regip") = getip infoadd("KS_regTime") = now() infoadd.Update session("KS_Name") = KS_UserName session("KS_level") = 0 session("KS_ID")=infoadd("id") response.cookies("WinSeer_OnLineTest_Book")("User")=KS_UserName Response.cookies("WinSeer_OnLineTest_Book").Expires=Date+999 'cookie过期时间设置/天 end if infoadd.Close Set infoadd=Nothing 'response.Write(KS_UserName) 'response.End() '================ CHECK USER END ============================== %>
<% '系统介绍开关 Set mm = conn.execute("select * from jieshao where id=1") if mm("jieshao_open")=1 then %>
系统简介:<%=mm("neirong")%>
<% end if Set mm=nothing %>

AutoCAD

    <% set rs=server.createobject("adodb.recordset") sql="select * from [kemu] where shitiku='AutoCAD类' and zt='unlock' order by OrderNum asc" rs.open sql,conn,1,1 if not rs.eof then do while not rs.eof id=rs("id") WQ_name=rs("name") '统计参考人数,平均成绩,通过率 WQ_ExamPeoPleNum=0 WQ_AverageScore=0 WQ_PassScale=0 set rs2=server.createobject("adodb.recordset") sql2="select avg(KS_Mark) as TKS_Mark,count(*) as TPeopleNum,count(select count(*) from [KSMarkHistoryData] where KS_PassSign=1 and KS_kemu='"& WQ_name &"' ) as TpassScale from [KSMarkHistoryData] where KS_kemu='"& WQ_name &"' " rs2.open sql2,conn,1,1 if not rs2.eof then WQ_ExamPeoPleNum=rs2("TPeopleNum") WQ_AverageScore=formatnumber(rs2("TKS_Mark"),1) WQ_PassScale=formatnumber(rs2("TpassScale")/rs2("TPeopleNum")*100,1) end if rs2.close set rs2=nothing %>
  • <%=WQ_name%>
    ?(考试人数:<%=WQ_ExamPeoPleNum%>,客观题平均成绩:<%=WQ_AverageScore%>,通过率:<%=WQ_PassScale%>%)
  • <% rs.movenext loop else response.write "
  • 暂时没有测试
  • " end if rs.close set rs=nothing %>

PhotoShop

    <% i=0 set rs=server.createobject("adodb.recordset") sql="select * from [kemu] where shitiku='PhotoShop类' and zt='unlock' order by OrderNum asc" rs.open sql,conn,1,1 if not rs.eof then do while not rs.eof id=rs("id") WQ_name=rs("name") '统计参考人数,平均成绩,通过率 WQ_ExamPeoPleNum=0 WQ_AverageScore=0 WQ_PassScale=0 set rs2=server.createobject("adodb.recordset") sql2="select avg(KS_Mark) as TKS_Mark,count(*) as TPeopleNum,count(select count(*) from [KSMarkHistoryData] where KS_PassSign=1 and KS_kemu='"& WQ_name &"' ) as TpassScale from [KSMarkHistoryData] where KS_kemu='"& WQ_name &"' " rs2.open sql2,conn,1,1 if not rs2.eof then WQ_ExamPeoPleNum=rs2("TPeopleNum") WQ_AverageScore=formatnumber(rs2("TKS_Mark"),1) WQ_PassScale=formatnumber(rs2("TpassScale")/rs2("TPeopleNum")*100,1) end if rs2.close set rs2=nothing %>
  • <%=WQ_name%>
    ?(考试人数:<%=WQ_ExamPeoPleNum%>,客观题平均成绩:<%=WQ_AverageScore%>,通过率:<%=WQ_PassScale%>%)
  • <% rs.movenext loop else response.write "
  • 暂时没有测试
  • " end if rs.close set rs=nothing %>
天天课堂-AutoCAD、PS在线自测 万博好还是博狗好_狗万官方地址_狗万客户端app