<% 'course="tcatycoon" 'step=1 'lev=0 'sec=20 mun_su = trim(request("mun_su")) if mun_su <> "" then mun_su = cint(mun_su) end if correct_su1 = 0 dim PartNum1, PartNum2, PartNum3, PartNum4, PartNum5, PartNum6, PartNum7, PartNum8, PartNum9 DIM muncnt, tmpsound, arr_exp, isAudio isAudio = false idir="http://gva.ybmsisa.com/"&course&"/step"&step&"/preview/" adir="http://gva.ybmsisa.com/"&course&"/step"&step&"/preview" '°ü·ÃµÈ ¹®Á¦ ÃßÃâ Set pre = Server.CreateObject("ADODB.Recordset") sql = "select bonus_content from lecture_handout where intro_idx in (select idx from lecture_intro where course = "&fncdbvalue(course)&" and lev = "&fncdbvalue(lev)&" and step = "&fncdbvalue(step)&" and sec = "&fncdbvalue(sec)&")" pre.Open Sql, cybercon, adOpenForwardOnly, adLockReadOnly If not (pre.BOF And pre.EOF) Then if instr(pre("bonus_content"), "//") then ScoreGood_sound = adir&"/"&split(pre("bonus_content"), "//")(1) ScoreBad_sound = adir&"/"&split(pre("bonus_content"), "//")(2) end if end if pre.close Sql = "Select idx, select_example, select_content from lecture_preview where intro_idx in (select idx from lecture_intro where course = "&fncdbvalue(course)&" and lev = "&fncdbvalue(lev)&" and step = "&fncdbvalue(step)&" and sec = "&fncdbvalue(sec)&") order by number" pre.Open Sql, cybercon, adOpenStatic IF NOT(PRE.EOF AND PRE.BOF) THEN For a = 1 To mun_su If pre("select_example") = 1 Then '°´°ü½Ä ¹®Á¦ °¡Á®¿À±â sql = "select num, answer from lecture_pre_ga where idx = "& fncdbvalue(pre("idx"))&" order by num" Elseif pre("select_example") = 2 Then 'ÁÖ°ü½Ä ¹®Á¦ °¡Á®¿À±â sql = "select num, answer from lecture_pre_ju where idx = "& fncdbvalue(pre("idx"))&" order by num" End If Set munmun = cybercon.execute(Sql) user_ans = Trim(Request("ans"&munmun("num"))) corr_ans = Trim(munmun("answer")) total_corr_ans = total_corr_ans&corr_ans&"/" total_user_ans = total_user_ans&user_ans&"/" arr_total_num = arr_total_num&munmun("num")&"/" If Trim(UCASE(user_ans)) = Trim(UCASE(corr_ans)) Then correct_su1 = correct_su1 + 1 End If munmun.close Set munmun = Nothing pre.movenext Next If mun_su <> 0 Then correct_su = Round((correct_su1/mun_su)*100,0) if correct_su>=70 then Score_sound = ScoreGood_sound else Score_sound = ScoreBad_sound end if End If '########## Á¡¼öÀúÀå ############ ssection = sec jumsu = correct_su1 total_score = mun_su END IF arr_corr_ans = split(total_corr_ans, "/") arr_user_ans = split(total_user_ans, "/") %> "221.142.252" Then %> bgproperties=fixed oncontextmenu='return false' ondragstart='return false' onselectstart='return false' <% End If %>bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
 
ÃÑ <%=mun_su%>¹®Á¦ Áß <%=correct_su1%>¹®Á¦¸¦ ¸ÂÃ߼̽À´Ï´Ù.
<% '°ü·ÃµÈ ¹®Á¦ ÃßÃâ If pre.BOF And pre.EOF Then response.write "¹®Á¦°¡ ÀԷµÇÁö ¾Ê¾Ò½À´Ï´Ù." Else CALL MakeAudio("SPlay", 0, 0, "true", Score_sound) pre.MOVEFIRST a = 0 Do Until pre.EOF Set mun = server.createobject("ADODB.Recordset") If pre("select_example") = 1 Then '°´°ü½Ä ¹®Á¦ °¡Á®¿À±â sql = "select * from lecture_pre_ga where idx = "& fncdbvalue(pre("idx")) &" order by part, num" mun.open sql, cybercon, 1 part = mun("part") a = a + 1 Select Case part case 1 PART1 case 2 PART2 case 3 PART3 case 4 PART4 case 5 PART5 case 6 PART6 case 7 PART7 End Select End If mun.close Set mun = Nothing pre.movenext Loop End IF pre.close Set pre = Nothing cybercon.close Set cybercon = Nothing %>
 
<% 'Á¤´ä¿©ºÎ Ç¥½Ã Å×À̺í(¹®Á¦¹øÈ£, Á¦ÃâÇÑ´ä, Á¤´ä, Á¤´ä¿©ºÎ) SUB OXTable(num, user_ans, corr_ans) %>
<%=num%> ¹ø ¹®Á¦
Á¦ÃâÇÑ ´ä : (<%=UCASE(user_ans)%>)
Á¤ ´ä : (<%=UCASE(corr_ans)%>)
Á¤´ä ¿©ºÎ : <%if strcomp(user_ans, corr_ans, 1)=0 then%>O<%else%>X<%end if%>
<% END SUB SUB ChronoAndSound(partnum, soundfile) %>
<% END SUB SUB MakeAudio(strID, width, height, AutoStart, FileName) %> <% END SUB SUB PartHeader(partnum) Select Case part case 1 : strPART = "I" : case 2 : strPART = "II" : case 3 : strPART = "III" : case 4 : strPART = "IV" case 5 : strPART = "V" : case 6 : strPART = "VI" : case 7 : strPART = "VII" End Select %>
Part <%=strPART%>
<% END SUB SUB PART1 explain = mun("explain") arr_exp = split(explain, "//") if ubound(arr_exp)>3 then exp_sound = arr_exp(4) else end if %><% Sql = "select con_header, sound, start_num, relation_num from lecture_pre_ji where idx in (select idx from lecture_intro where course = "&fncdbvalue(course)&" and lev = "&fncdbvalue(lev)&" and step = "&fncdbvalue(step)&" and sec = "&fncdbvalue(sec)&") and start_num = "& fncdbvalue(mun("num")) Set pre_ji = cybercon.execute(Sql) If Not(pre_ji.eof) Then sound = trim(pre_ji("sound")) End if pre_ji.close SET pre_ji = nothing if partnum1 <> 99 then if not isAudio then 'CALL MakeAudio("SPlay", 0, 0, "False", adir&"/"&sound) CALL ChronoAndSound(1, adir&"/"&sound) isAudio = true end if CALL PartHeader(1) muncnt = 0 partnum1 = 99 End If CALL OXTable(mun("num"), arr_user_ans(mun("num")-1), arr_corr_ans(mun("num")-1)) %>
<%=trim(mun("num"))%>.
" width="200" height="150">
(A) <%=trim(mun("exam1"))%>
(B) <%=trim(mun("exam2"))%>
(C) <%=trim(mun("exam3"))%>
(D) <%=trim(mun("exam4"))%>
');" style="cursor:hand"><%'CALL MakeAudio("Player"&trim(mun("num")), 75, 45, "False", adir&"/"&trim(mun("sound")))%>
<% CALL ExplainTable(mun("explain")) END SUB SUB PART2 explain = mun("explain") arr_exp = split(explain, "//") if ubound(arr_exp)>3 then exp_sound = arr_exp(4) else end if%> <% Sql = "select con_header, sound, start_num, relation_num from lecture_pre_ji where idx in (select idx from lecture_intro where course = "&fncdbvalue(course)&" and lev = "&fncdbvalue(lev)&" and step = "&fncdbvalue(step)&" and sec = "&fncdbvalue(sec)&") and start_num = "& fncdbvalue(mun("num")) Set pre_ji = cybercon.execute(Sql) If Not(pre_ji.eof) Then sound = trim(pre_ji("sound")) End if pre_ji.close SET pre_ji = nothing if partnum2 <> 99 then if not isAudio then 'CALL MakeAudio("SPlay", 0, 0, "False", adir&"/"&sound) CALL ChronoAndSound(2, adir&"/"&sound) isAudio = true end if CALL PartHeader(2) muncnt=0 partnum2 = 99 End If CALL OXTable(mun("num"), arr_user_ans(mun("num")-1), arr_corr_ans(mun("num")-1)) %>
<%=trim(mun("num"))%>. (A) <%=trim(mun("exam1"))%>
(B) <%=trim(mun("exam2"))%>
(C) <%=trim(mun("exam3"))%>
');" style="cursor:hand"><%'CALL MakeAudio("Player"&trim(mun("num")), 75, 45, "False", adir&"/"&trim(mun("sound")))%>
<% CALL ExplainTable(mun("explain")) END SUB 'Part3 SUB PART3 explain = mun("explain") arr_exp = split(explain, "//") if ubound(arr_exp)>3 then exp_sound = arr_exp(4) else end if Sql = "select con_header, sound, start_num, relation_num, explain, content from lecture_pre_ji where idx in (select idx from lecture_intro where course = "&fncdbvalue(course)&" and lev = "&fncdbvalue(lev)&" and step = "&fncdbvalue(step)&" and sec = "&fncdbvalue(sec)&") and start_num = "& fncdbvalue(mun("num")) Set pre_ji = cybercon.execute(Sql) If Not(pre_ji.eof) Then sound = trim(pre_ji("sound")) arr_exp3 = split(pre_ji("explain"),"//") content = TRIM(pre_ji("content")) End if pre_ji.close SET pre_ji = nothing if partnum3 <> 99 then if not isAudio then 'CALL MakeAudio("SPlay", 0, 0, "False", adir&"/"&sound) CALL ChronoAndSound(3, adir&"/"&sound) isAudio = true end if CALL PartHeader(3) CALL Passage("", content, arr_exp3(0), 3) muncnt=0 partnum3 = 99 End If CALL OXTable(mun("num"), arr_user_ans(mun("num")-1), arr_corr_ans(mun("num")-1)) %>
<%=mun("num")%>. <%=trim(mun("content"))%>
(A) <%=trim(mun("exam1"))%>
(B) <%=trim(mun("exam2"))%>
(C) <%=trim(mun("exam3"))%>
<% if trim(mun("exam4"))<>"" then%> (D) <%response.write trim(mun("exam4")) end if%>
<% CALL ExplainTable(mun("explain")) END SUB 'Part4 SUB PART4 explain = mun("explain") arr_exp = split(explain, "//") if ubound(arr_exp)>3 then exp_sound = arr_exp(4) else end if Sql = "select con_header, sound, start_num, relation_num, explain, content from lecture_pre_ji where idx in (select idx from lecture_intro where course = "&fncdbvalue(course)&" and lev = "&fncdbvalue(lev)&" and step = "&fncdbvalue(step)&" and sec = "&fncdbvalue(sec)&") and start_num = "& fncdbvalue(mun("num")) Set pre_ji = cybercon.execute(Sql) If Not(pre_ji.eof) Then sound = trim(pre_ji("sound")) content = trim(pre_ji("content")) arr_exp4 = split(pre_ji("explain"),"//") End if pre_ji.close SET pre_ji = nothing if partnum4 <> 99 then if not isAudio then 'CALL MakeAudio("SPlay", 0, 0, "False", adir&"/"&sound) CALL ChronoAndSound(4, adir&"/"&sound) isAudio = true end if CALL PartHeader(4) CALL Passage("", content, arr_exp4(0), 4) muncnt=0 partnum4 = 99 End If CALL OXTable(mun("num"), arr_user_ans(mun("num")-1), arr_corr_ans(mun("num")-1)) %>
<%=mun("num")%>. <%=trim(mun("content"))%>
(A) <%=trim(mun("exam1"))%>
(B) <%=trim(mun("exam2"))%>
(C) <%=trim(mun("exam3"))%>
(D) <%=trim(mun("exam4"))%>
<% CALL ExplainTable(mun("explain")) END SUB 'Part5 SUB PART5 If partnum5 <> 99 Then muncnt=0 CALL PartHeader(5) partnum5 = 99 End If CALL OXTable(mun("num"), arr_user_ans(mun("num")-1), arr_corr_ans(mun("num")-1)) %>
<%=mun("num")%>. <%=trim(mun("content"))%>
(A) <%=trim(mun("exam1"))%>
(B) <%=trim(mun("exam2"))%>
(C) <%=trim(mun("exam3"))%>
(D) <%=trim(mun("exam4"))%>
<% CALL ExplainTable(mun("explain")) END SUB SUB PART6 if partnum6 <> 99 then muncnt=0 CALL PartHeader(6) partnum6 = 99 End If Sql = "select con_header, start_num, relation_num from lecture_pre_ji where idx in (select idx from lecture_intro where course = "&fncdbvalue(course)&" and lev = "&fncdbvalue(lev)&" and step = "&fncdbvalue(step)&" and sec = "&fncdbvalue(sec)&") and start_num = "& fncdbvalue(mun("num")) Set pre_ji = cybercon.execute(Sql) If Not(pre_ji.eof) Then %>
<%=replace(pre_ji("con_header"),chr(10)&chr(13),"
")%>
<% End if pre_ji.close SET pre_ji = nothing arrtmp = split(trim(mun("explain")), "//") Qspace = arrtmp(3) CALL OXTable(mun("num"), arr_user_ans(mun("num")-1), arr_corr_ans(mun("num")-1)) %>
<%=trim(mun("content"))%>
<%=mun("num")%>. (A) <%=trim(mun("exam1"))%>
(B) <%=trim(mun("exam2"))%>
(C) <%=trim(mun("exam3"))%>
(D) <%=trim(mun("exam4"))%>
<% CALL ExplainTable(mun("explain")) END SUB SUB PART7 if partnum7 <> 99 then muncnt=0 CALL PartHeader(7) partnum7 = 99 End If %> <% Sql = "select con_header, content, image, start_num, relation_num, explain from lecture_pre_ji where idx in (select idx from lecture_intro where course = "&fncdbvalue(course)&" and lev = "&fncdbvalue(lev)&" and step = "&fncdbvalue(step)&" and sec = "&fncdbvalue(sec)&") and start_num = "& fncdbvalue(mun("num")) Set pre_ji = cybercon.execute(Sql) If Not(pre_ji.eof) Then%>
<%=replace(pre_ji("con_header"),chr(10)&chr(13),"
")%>
<% IMAGE = RIGHT(TRIM(PRE_JI("IMAGE")), 3) IF IMAGE = "GIF" OR IMAGE = "JPG" THEN IMAGE = trim(pre_ji("image")) ELSE IMAGE = "" END IF CALL Passage(IMAGE, TRIM(pre_ji("content")), split(pre_ji("explain"), "//")(0), 7) %> <% End If pre_ji.close SET pre_ji = nothing CALL OXTable(mun("num"), arr_user_ans(mun("num")-1), arr_corr_ans(mun("num")-1)) %>
<%=mun("num")%>. <%=trim(mun("content"))%>
(A) <%=trim(mun("exam1"))%>
(B) <%=trim(mun("exam2"))%>
(C) <%=trim(mun("exam3"))%>
(D) <%=trim(mun("exam4"))%>
<% CALL ExplainTable(mun("explain")) END SUB 'Áö½Ã¹® SUB Passage(IMAGE, content, EXPLAIN, partnum) %>
<% IF IMAGE <> "" THEN%> <% END IF IF TRIM(content) <> "" THEN%> <% END IF IF TRIM(EXPLAIN)<>"" THEN%> <% END IF%>
<%if partnum<=4 then%>
<%end if%><%=replace(content, chr(13),"
")%>
<%=replace(EXPLAIN, chr(13),"
")%>
<% END SUB '¼³¸í Å×À̺í SUB ExplainTable(explain) arr_exp = SPLIT(explain, "//") IF ISARRAY(ARR_EXP) THEN %>
<% if trim(arr_exp(5))<>"" then%> <% end if if trim(arr_exp(2))<>"" then%> <% end if if trim(arr_exp(1))<>"" then%> <% end if if trim(arr_exp(0))<>"" then%> <% end if%>
<%=replace(arr_exp(5), chr(13), "
")%>
<%=replace(arr_exp(2), chr(13), "
")%>
<%=replace(arr_exp(1), chr(13), "
")%>
<%=replace(arr_exp(0), chr(13), "
")%>
 
<% END IF END SUB %>