on error resume next
dim i,kk,matchcount,datecount
dim leaguecount
dim loaded
datecount=0
dim bgc
dim week(8)
week(0)=""
week(1)="星期日"
week(2)="星期一"
week(3)="星期二"
week(4)="星期三"
week(5)="星期四"
week(6)="星期五"
week(7)="星期六"
dim matchdata(),oddsdata() '保存比赛时间等信息
dim tr_xml()
dim html0(25)
dim GoalCn(20)
GoalCn(0)="平手"
GoalCn(1)="平手/半球"
GoalCn(2)="半球"
GoalCn(3)="半球/一球"
GoalCn(4)="一球"
GoalCn(5)="一球/球半"
GoalCn(6)="球半"
GoalCn(7)="球半/两球"
GoalCn(8)="两球"
GoalCn(9)="两球/两球半"
GoalCn(10)="两球半"
GoalCn(11)="两球半/三球"
GoalCn(12)="三球"
GoalCn(13)="三球/三球半"
GoalCn(14)="三球半"
GoalCn(15)="三球半/四球"
GoalCn(16)="四球"
GoalCn(17)="四球/四球半"
GoalCn(18)="四球半"
GoalCn(19)="四球半/五球"
GoalCn(20)="五球"
function Goal2GoalCn(goal)
'数字盘口转汉汉字
on error resume next
if goal>=0 then
Goal2GoalCn=GoalCn(cint(goal*4))
else
Goal2GoalCn="受让"& GoalCn(abs(cint(goal*4)))
end if
end function
dim code
code = parent.coms.document.getElementById("code").innerText
if (code=null or code="") then code="big5"
if (code="big5") then
call loadodds(1)
else
call loadodds(0)
end if
on error resume next
sub loadodds(language)
loaded=0
m_language=language
myxml.async = false
myxml.load "xml\ODDS_ALL.xml"
set kk=myxml.childNodes.item(1).childNodes.item(0)
matchcount=kk.childNodes.length
redim tr_xml(matchcount-1)
redim matchdata(matchcount-1,14) '赛事数据
redim oddsdata(matchcount-1,14,6)'赔率数据
If matchcount>=0 Then
Call MakeTable_V()
end if
call matkeleague()
document.getElementById("loadtext").innerhtml="全部数据加载成功! 没有必要的话请不要再刷新本页面"
settimeout "NotDisplay()",3000
end sub
'隐藏加载提示
sub NotDisplay()
document.getElementById("loading").style.display="none"
end sub
'语言转换
sub selLanguage(language)
settimeout "loadodds("&language&")",10
end sub
sub MakeTable_V()
dim ii
ii=0
dim j
for i=0 to matchcount-1
matchdata(i,0)=kk.childNodes.item(i).childNodes.item(0).Text 'ID
matchdata(i,1)=kk.childNodes.item(i).childNodes.item(1).Text '类型背景色
matchdata(i,2)=split(kk.childNodes.item(i).childNodes.item(2).Text,",")(m_language)'选择的语言对类的类型名
matchdata(i,3)=split(kk.childNodes.item(i).childNodes.item(3).Text,",")(0)'开赛时间
matchdata(i,4)=split(kk.childNodes.item(i).childNodes.item(4).Text,",")(m_language)'主队名
matchdata(i,5)=split(kk.childNodes.item(i).childNodes.item(5).Text,",")(m_language)'客队名
matchdata(i,6)=split(kk.childNodes.item(i).childNodes.item(6).Text,",")(0) '主队ID
matchdata(i,7)=split(kk.childNodes.item(i).childNodes.item(6).Text,",")(1) '客队ID
Neutrality=kk.childNodes.item(i).childNodes.item(8).Text'中立场
matchdata(i,8)=kk.childNodes.item(i).childNodes.item(9).Text'上盘
if matchdata(i,8)="2" then
matchdata(i,9)=matchdata(i,5) '上盘
matchdata(i,10)=matchdata(i,4) '下盘
else
matchdata(i,9)=matchdata(i,4)
matchdata(i,10)=matchdata(i,5)
end if
arr=split(kk.childNodes.item(i).childNodes.item(10).Text,";") '各公司赔率
zoudi=split(kk.childNodes.item(i).childNodes.item(11).Text,",") '走地情况
closepan=split(kk.childNodes.item(i).childNodes.item(12).Text,",") '封盘情况
'for j=LBound(arr) To UBound(arr)
for j=0 to companyCount-1
oddsdata(i,j+1,0)=split(arr(fromid(j)),",")(0) '赔率ID
oddsdata(i,j+1,1)=split(arr(fromid(j)),",")(1) '盘口
oddsdata(i,j+1,2)=split(arr(fromid(j)),",")(2)'上盘水位
oddsdata(i,j+1,3)=split(arr(fromid(j)),",")(3)'下盘水位
oddsdata(i,j+1,4)=split(arr(fromid(j)),",")(4)'初盘口
oddsdata(i,j+1,5)=zoudi(fromid(j)) '走地
oddsdata(i,j+1,6)=closepan(fromid(j)) '封盘
next
matchdata(i,11)=true '是否显示
matchdata(i,12)=true '是否到时
if (selSclass=1 or oddsdata(i,1,0)<>"") and (seldate="" or InStr(seldate, formatdatetime(matchdata(i,3),vbshortdate))>0) then '筛选
if (i Mod 2=0) then bgc="#F5F5F5" else bgc="#EBF0FC" end if
html0(0) = "
"
if matchdata(i,8)="2" then '判断哪个队是上盘球队,2:客上盘
html0(3) = "
"
if Neutrality="True" then
html0(3) = html0(3) & "
"& matchdata(i,5)&"(中)
"
html0(4) = "
"& matchdata(i,4)&"
"
else
html0(3) = html0(3) & "
"& matchdata(i,5)&"
"
html0(4) = "
"& matchdata(i,4)&"(主)
"
end if
else
html0(3) = "
"
if Neutrality="True" then
html0(3) = html0(3) & "
"& matchdata(i,4)&"(中)
"
html0(4) = "
"& matchdata(i,5)&"
"
else
html0(3) = html0(3) & "
"& matchdata(i,4)&"(主)
"
html0(4) = "
"& matchdata(i,5)&"
"
end if
end if
html0(5)=""
for j=0 to companyCount-1
html0(5)=html0(5)&"
"
html0(5)=html0(5)&"
"
html0(5)=html0(5)&"
"
if oddsdata(i,company(j,3),1)<>"" then
if abs(oddsdata(i,company(j,3),1)-oddsdata(i,company(j,3),4))>=0.5 then
'html0(5)=html0(5)&"●"
end if
end if
html0(5)=html0(5)&""&oddsdata(i,company(j,3),2)&""
''html0(5)=html0(5)&""&oddsdata(i,company(j,3),2)&""
if oddsdata(i,company(j,3),5)="True" then html0(5)=html0(5)&" "
html0(5)=html0(5)&"
"
if oddsdata(i,company(j,3),6)="True" then
''html0(5)=html0(5)&"(封)"
else
''html0(5)=html0(5)&"(封)"
end if
html0(5)=html0(5)&""&oddsdata(i,company(j,3),3)&"
" & tr_xml(i)
datecount=datecount+1
matchdate1=matchdate1 & formatdatetime(matchdata(i,3),vbshortdate)
matchdate = matchdate & " "
End If
else
tr_xml(i)=""
matchdata(i,11)=false '是否显示
matchdata(i,12)=false '是否到时
end if
next
''document.getElementById("scheduleDate").innerhtml=matchdate
oddsHead="
"
oddsHead=oddsHead&"
选
"
oddsHead=oddsHead&"
赛事
"
oddsHead=oddsHead&"
对阵球队
"
for i=0 to companyCount-1
oddsHead=oddsHead&"
"&company(i,2) & "
"
document.getElementById("company"&company(i,1)).checked=true
next
''oddsHead=oddsHead& "
分析
"
''oddsHead=oddsHead&"
赔率
"
oddsHead=oddsHead& "
"
''if 170+companycount*70<549 then tableWidth=549 else tableWidth=170+companycount*70
tableWidth=551
oddshtml="
" & oddsHead
For ii = 0 To matchcount-1
oddshtml=oddshtml&vbCrLf & tr_xml(ii)
Next
oddsHead=oddsHead& ""
oddshtml=oddshtml & oddsHead
oddshtml=oddshtml& "
"
document.getElementById("odds").innerhtml=oddshtml
document.getElementById("headtable").style.width=tablewidth
end sub
'联赛/杯赛名列表
sub matkeleague()
dim l
dim kk1
dim st
dim leaguehtml
set kk1=myxml.childNodes.item(1).childNodes.item(1)
l=kk1.childNodes.length
leaguecount=l
leaguehtml=""
for i=0 to l-1
st=split(kk1.childNodes.item(i).Text,",")(m_language)
leaguehtml=leaguehtml & "
"
next
leaguehtml="
" & leaguehtml & "
"
document.getElementById("myleague").innerHTML=leaguehtml
end sub