⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trandumper.htm

📁 用jsp编的一个网络程序
💻 HTM
📖 第 1 页 / 共 3 页
字号:
				strONE = Right(strTmp,1)
				If strONE = "" or strONE = "." or strONE = ":" or strONE = "" or strONE = "?" or strONE = "%" or (strONE >="0" and strONE <="9") then strTmp = strTmp & "<BR>"
				Desc(K) = Desc(K) & " " & strTmp & vbCrLf
			End If
		End If
	Loop
	a.Close
	MM = i

	If top.hid.randomans = 1 Then
		Randomize
		For i = 1 To MM
			MMAns = 0
			Do 
 				MMAns = MMAns + 1
			Loop Until Len(Body(i, MMAns)) <= 0 or MMAns > MAXIMJ
			MMAns = MMAns - 1
			For j = 1 to MMAns 
				newj1 = Int(j*Rnd) + 1
				tmp = Body(i, j)
				Body(i, j) = Body(i, newj1)
				Body(i, newj1) = tmp
				Ans(i) = SwitchOnStr(Ans(i), Opti(i, j), Opti(i, newj1))
			Next
		Next
	End If
End Sub

Function SwitchOnStr(s, c1, c2) 
Dim p1, p2, tmp1, tmp2, s1, s2 


p1 = InStr(s, c1)
p2 = InStr(s, c2)
If c1 = c2 or len(s) < 1 or (p1 = 0 and p2 = 0) then
 SwitchOnStr = s
 Exit Function
End If
If p1 = 0 then
  SwitchOnStr = Replace(s, c2, c1)
  Exit Function
End if
If p2 = 0 then
  SwitchOnStr = Replace(s, c1, c2)
  Exit Function
End if

If p1 < p2 then
 s1 = Left(s, p1-1) & c2
 tmp1 = Right(s, len(s)-p1)
else
 s1 = Left(s, p2-1) & c1
 tmp1 = Right(s, len(s)-p2)
End If

p1 = InStr(tmp1, c1)
p2 = InStr(tmp1, c2)

If len(tmp1) < 1 or (p1 = 0 and p2 = 0) then
 SwitchOnStr = s1
 Exit Function
End If
If p1 = 0 then
  SwitchOnStr = s1 & Replace(tmp1, c2, c1)
  Exit Function
End if
If p2 = 0 then
  SwitchOnStr = s1 & Replace(tmp1, c1, c2)
  Exit Function
End if
If p1 < p2 then
 s2 = Left(tmp1, p1-1) & c2
 tmp2 = Right(tmp1, len(tmp1)-p1)
else
 s2 = Left(tmp1, p2-1) & c1
 tmp2 = Right(tmp1, len(tmp1)-p2)
End If
SwitchOnStr = s1 & s2 & tmp2
End function


Sub window_onLoad()
	If location.search = "" Then
		InvalidLoad()
	ElseIf location.search = "?index" Then
		IndexFrame()
	ElseIf location.search = "?hid" Then
		Set filesys = Nothing
		learnmode = 0
		randomquest = 0
		randomans = 0
		AA = "DEFAULT"
		FOLDER = ""
		LOGO = "<center><table border=0><tr><img id=GIF src='./images/logo.jpg'></tr></table></center><table border=0 width=90%><tr><td align=right><i><font face='verdana,arial,helvetica' size=1 color=black><b>Revised by: </font><font face='verdana,arial,helvetica' size=1 color=brown>Delphi</b></font></tr></table><br><br>"
	ElseIf location.search = "?first" Then
		FirstPage()
	ElseIf location.search = "?second" Then
		SecondPage()
	ElseIf location.search = "?review" Then
		Review()
	ElseIf location.search = "?frame" Then
		WriteFrame()
	ElseIf location.search = "?up" Then
		learnmode = top.hid.learnmode
		randomquest = top.hid.randomquest
		randomans = top.hid.randomans
		ReadFile()
	ElseIf location.search = "?topp" Then
		WriteTopp()
	ElseIf location.search = "?left" Then
		document.write "<html><body  background='./images/bg1.gif' leftmargin=0>&nbsp;<p>&nbsp;<p>&nbsp;<p><img id=GIF src='./images/blank.gif'></body></html>"
	ElseIf location.search= "?right" Then
		document.write "<html><body  background='./images/bg1.gif'></body></html>"
	ElseIf location.search= "?0" Then
		parent.up.II=0
		HomePage()
	ElseIf location.search= "?1" Then
		If top.hid.learnmode=1 Then 
			parent.up.JJ = ""
			For i = 1 To parent.up.MM
				parent.up.JJ = parent.up.JJ & "[" & i & "]"
			Next
		End If
		parent.left.GIF.src="./images/blank.gif"
		parent.up.II = parent.up.II + 1
		If InStr(parent.up.JJ, "[" & parent.up.II & "]") > 0 Then 
			parent.up.DISAB = "DISABLED"
		Else
			parent.up.DISAB = ""
		End If
		If parent.up.II = 1 Then 
			parent.topp.Marked.disabled = False
			parent.down.prev.disabled = True
			parent.down.nextt.disabled = False
			parent.down.answ.disabled = False
			parent.down.review.disabled = False
		Else
			parent.down.prev.disabled = False
		End If
		If parent.up.II = parent.up.MM Then parent.down.nextt.disabled = True
		If parent.up.Markk(parent.up.II) = 1 then
			parent.topp.Marked.checked = True
		Else
			parent.topp.Marked.checked = False
		End If
		WriteSide()
	ElseIf location.search= "?2" Then
		parent.left.GIF.src="./images/blank.gif"
		If parent.up.II > 1 Then parent.up.II = parent.up.II - 1
		If InStr(parent.up.JJ, "[" & parent.up.II & "]") > 0 Then 
			parent.up.DISAB = "DISABLED"
		Else
			parent.up.DISAB = ""
		End If
		If parent.up.II = 1 Then parent.down.prev.disabled = True
		If parent.up.II < parent.up.MM Then parent.down.nextt.disabled = False
		If parent.up.Markk(parent.up.II) = 1 then
			parent.topp.Marked.checked = True
		Else
			parent.topp.Marked.checked = False
		End If
		WriteSide()
	ElseIf location.search= "?down" Then
		WriteDown()
	Else
	End If
End Sub

Sub InvalidLoad()
document.write 	"<html><title>TranDumper V2.1</title><body background='./images/bg1.gif'><center><table border=0><tr><img id=GIF src='./images/logo.jpg'></tr></table></center><table border=0 width=90%><tr><td align=right><i><font face='verdana,arial,helvetica' size=1 color=black><b>Revised by: </font><font face='verdana,arial,helvetica' size=1 color=brown>Delphi</b></font></tr></table><br><br>" &_
		"<center><br><br><H1>Open this program using the ""readme.htm"" file!</h1><br><br><br><button onClick=document.location.href='./readme.htm'><font face=Verdana><b>Load Trandumper V2.1</b></font></button></center></body></html>"
End Sub


Sub Review()
	Dim intHI
	Dim myII
	myII = 0
	parent.left.GIF.src="./images/blank.gif"
	If (parent.up.MM mod 4 = 0) Then
		intHI = Int(parent.up.MM / 4)
	Else
		intHI = Int(parent.up.MM / 4) + 1
	End If
	document.write "<html><body><br><center><table border=5 cellspacing=0 cellpadding=0><tr valign=top>"
	For j = 1 To 4
		document.write "<td width=120><table cellspacing=0 cellpadding=0>"
		For i = 1 To intHI
			myII = myII + 1
			If myII > parent.up.MM Then Exit For
			document.write "<tr><td align=right><nobr><button onClick=""parent.up.II=" & myII-1 & ";parent.side.location.href='Trandumper.htm?1';""><font face=Verdana style='font-size:12px'>"
			document.write myII 
			If Len(myII) <2 Then document.write "&nbsp;&nbsp;"
			document.write "(" & Left(top.hid.AA,1) & parent.up.S(myII) 
			If Len(parent.up.S(myII)) < 2 Then document.write "&nbsp;&nbsp;"
			document.write ")."  & "</button>"
			If (parent.up.Usr(myII) <> "" and InStr(parent.up.JJ, "[" & myII & "]") > 0) Then
				document.write "<td><nobr><font "
				If ChkAnswer(myII) = True Then
					document.write "color=blue"
				Else
					document.write "color=red"
				End If
				document.write " face=Verdana style='font-size:16px'><b>" & parent.up.Usr(myII) & "</b></font>"
			Else
				document.write "<td><font face=Verdana style='font-size:16px;background-color:red;'>"
				If parent.up.Usr(myII) <> "" Then
					document.write parent.up.Usr(myII)
				Else
					document.write "&nbsp;|&nbsp;</font>"
				End If
			End If
			document.write "</tr>"
		Next
		document.write "</table></td>"
	Next
	document.write "</tr></table>"
	document.write "<button onClick=""if((gotoo.value.slice(0,1).toUpperCase()>='A') && (gotoo.value.slice(0,1).toUpperCase()<='Z')) {parent.up.II=parent.up.R(gotoo.value.slice(1))-1;} else {parent.up.II=gotoo.value-1};parent.side.location.href='Trandumper.htm?1'"">Review Item</button>"
	document.write "<input type=text ID=gotoo NAME=gotoo size=4 maxlength=4>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
	document.write "<button onClick=""if (WRONG.value.length>0) {parent.up.SaveWrong();}"">Save Wrong To</button>"
	document.write "<input type=text ID=WRONG NAME=WRONG size=15 maxlength=30 value='Z.My Wrongs.txt'>"
	document.write "</body></html>"
End Sub

Sub IndexFrame()
	document.write "<title>TranDumper V2.1 - If you receive an ActiveX dialog box, click ""Yes"" to proceed</title>" &_
	"<frameset framespacing=0 rows='0,*' frameborder=NO>" &_
		"<frame src='./Trandumper.htm?hid' name='hid' marginwidth=0 frameborder=NO scrolling=NO NORESIZE>" &_
		"<frame src='./Trandumper.htm?first' name='main' marginwidth=0 frameborder=NO scrolling=AUTO NORESIZE>" &_
	"</frameset>"
End Sub

Sub FirstPage()
	Dim f, fc, f1, s, a, strTmp(20), isEnd
	Dim PATH, i 

	PATH = mid(location.pathname, 2, len(location.pathname)-15)
  PATH = Replace(PATH, "%20", " ")

  If Typename(top.hid.filesys) = "Nothing" then   
 		Set top.hid.filesys = CreateObject("Scripting.FileSystemObject")
	End If	

 	Set f = top.hid.filesys.GetFolder(PATH)
	Set fc = f.SubFolders
	i = 0
	strPAGE = "<dd><font face='verdana,arial,helvetica' size=2 color=black><b>Please select one exam:</b></font><p>" &_
			"<center><table border=0 cellpadding=10><tr align=center>"
	For Each s in fc
		If UCase(right(s, 6)) <> "IMAGES" Then
			If i mod 7 =0 Then strPAGE = strPAGE & "</tr><tr align=center>"
			i = i + 1
			strTmp(i) = Right(s, Len(s) - Len(PATH))
			strPAGE = strPAGE & "<td><a onClick=""VBSCript:top.hid.FOLDER='" & PATH & strTmp(i) & "\':document.location.href='./trandumper.htm?second'""><img src='./images/icon.gif' border=0><br><font face='verdana,arial,helvetica' color=brown size=2><b><i>" & strTmp(i) & "</i></b></font></a>"
		End If
	Next
	top.document.title = "TranDumper V2.1"
	document.write "<html><body background='./images/bg1.gif'>" & top.hid.LOGO & strPAGE & "</tr></table><br><br>" &_
	"<center><button onClick=""VBScript:top.window.close""><font size=2 face=Arail><b>&nbsp;&nbsp;&nbsp;Exit&nbsp;&nbsp;&nbsp;</b></font></button></center></body></html>"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -