<%@ Language=VBScript %> <% Option Explicit %> <% Response.Expires = 0 %> Windows NT Server 4.0 <% Sub PrintPage %>

Содержание

<% set ts = fs.OpenTextFile(root & list(cur)) Response.Write(ts.ReadAll) ts.close() %>

<% End Sub %> <% Dim root, asked, cur, curmax, user, file, list, ques, ans, fs, ts root = Application("root") asked = Session("asked") cur = Session("cur") curmax = Session("curmax") user = Session("user") list = Application("list") ques = Application("ques") ans = Application("ans") set fs = Server.CreateObject("Scripting.FileSystemObject") ' response.write cur ' response.write "--" ' response.write Application("nitem") if (asked) then if (Request.Form("R1") = ans(cur)) then asked = false if (user <> "") then file = Application("file") set ts = fs.CreateTextFile(file, True) ts.WriteLine(curmax) ts.close() end if if (cur = Application("nitem")) then cur = 0 end if PrintPage else curmax = curmax - 1 cur = curmax asked = false %>

Неправильный ответ

Вам необходимо еще раз более внимательно просмотреть предыдущий материал.

<% end if else if (Request.Form("B1") <> "") then cur = cur - 1 elseif (Request.Form("B2") <> "") then cur = cur + 1 elseif (Request.Form("P") <> "") then cur = CInt(Request.Form("P")) end if if (cur < 0 or cur > Application("nitem")) then cur = 0 end if if (cur <= curmax) then PrintPage else curmax = curmax + 1 cur = curmax if (ques(cur) <> "") then asked = true set ts = fs.OpenTextFile(root & ques(cur)) Response.Write(ts.ReadAll) ts.close() else if (user <> "") then file = Application("file") set ts = fs.CreateTextFile(file, True) ts.WriteLine(curmax) ts.close() end if PrintPage end if end if end if Session("cur") = cur Session("curmax") = curmax Session("asked") = asked %>