<!--#include file="../inc.asp"-->
<!--#include file="../ydzq1.asp"-->

<%Call head()
Call saycarda("答题结果")

dim id
dim n
dim mykey
dim useranswer
dim right1
dim tjhm
useranswer=""
id=request("id")
n=request("n")
mykey=request("mykey")

for j=0 to 5
  if(j=Cint(mykey)) then
  useranswer=useranswer&"1"
  else
  useranswer=useranswer&"0"
  end if
  
  if(mid(id,j+1,1)="1")then  	
  right1=j+1
  end if
next 
if(Session("ok")="true") then
if id=useranswer then
Server.ScriptTimeout=999
iduse=Session("useid")


   set objgbrs=Server.CreateObject("ADODB.Recordset")
 sql="update users set myjb=myjb+1,mytl=mytl-2,mych=mych+1,myml=myml+1 where id='" & myid & "'"
    conn.Execute(sql)


    objgbrs.open sql,connzl
    set objgbrs=nothing
  Session("ok")="false"
  conn.execute("update users set myjb=myjb+1,mytl=mytl-2,mych=mych+1,myml=myml+1 where id="&myid)
  response.write "恭喜您，答对了！<br/>"&getcent&"增加1.才华增加1.体力-2.魅力增加1<br/><a href='index.asp?n="&n&"&amp;sid=" & sid & "&amp;saytk=" & saytk & "'>继续</a>"
else	
response.write "抱歉，答错了！正确的答案是选第"&right1&"个!<br/><br/><a href='index.asp?sid=" & sid & "&amp;saytk=" & saytk & "'>继续</a>"
end if   

else
	
	response.write "你小子想作弊啊~~~~没门！先过俺<a href='index.asp?n="&n&"&amp;sid=" & sid & "&amp;saytk=" & saytk & "'>班主任</a>这一关先！"
	
end if             
%> 
<br/><br/><a href='/bbs/index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>'>社区</a>-<a href='/index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>'>首页</a>
<%Call headsay()%>              