<% option explicit response.buffer = true Session.LCID = 1041 %> <% dim thePageTitle, thePageName, thePageNameLinks thePageTitle = "TIPS MATCHER" thePageName = "tips_showMatcher.asp" thePageNameLinks = "tips_showMatcher.asp" ' 61 = tips_showTipsKupong.asp call countClickPage(61, strUserID_donRollo) dim intActualSessionUserID intActualSessionUserID = int(session("userID")) 'response.write "intActualSessionUserID = " &intActualSessionUserID& "
" dim intRequestTipsOmgangID intRequestTipsOmgangID = int(request("tipsOmgangID")) 'response.write "intRequestTipsOmgangID = " &intRequestTipsOmgangID& "
" dim intYLocation intYLocation = int(request("yLocation")) 'response.write "intYLocation = " &intYLocation& "
" dim intGotoYLocation intGotoYLocation = int(request("gotoYLocation")) 'response.write "intGotoYLocation = " &intGotoYLocation& "
" '*************** OPEN THE DATABASE dim conn set conn = Server.CreateObject ("ADODB.Connection") conn.Open "Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=191516-poker;User=191516_vt67146;Password=DBpoker0;Option=3;" dim sql, rs sql = "SELECT " sql = sql & "O.tipsSystemID, " sql = sql & "O.lockStatus, " sql = sql & "O.fileName, " sql = sql & "O.tipsVariantID, " sql = sql & "V.variant " sql = sql & "FROM tbl_tipsOmgang O " sql = sql & "INNER JOIN tbl_tipsVariant V ON O.tipsVariantID = V.tipsVariantID " sql = sql & "WHERE " sql = sql & "O.tipsOmgangID = "&intRequestTipsOmgangID&";" set rs = conn.execute(sql) dim intTipsSystemID, intLockStatus, strFileName dim intTipsVariantID, strVariant intTipsSystemID = int(rs("tipsSystemID")) intLockStatus = int(rs("lockStatus")) strFileName = trim(rs("fileName")) intTipsVariantID = int(rs("tipsVariantID")) strVariant = trim(rs("variant")) 'response.write "intTipsSystemID = " &intTipsSystemID& "
" 'response.write "intLockStatus = " &intLockStatus& "
" 'response.write "strFileName = " &strFileName& "
" 'response.write "intTipsVariantID = " &intTipsVariantID& "
" dim sqlLoop1, rsLoop1 sqlLoop1 = "SELECT " sqlLoop1 = sqlLoop1 & "tipsMatcherID, " sqlLoop1 = sqlLoop1 & "matchNr, " sqlLoop1 = sqlLoop1 & "hemmaLag, " sqlLoop1 = sqlLoop1 & "bortalag, " sqlLoop1 = sqlLoop1 & "tipsRam, " sqlLoop1 = sqlLoop1 & "hasTipsRam_1, " sqlLoop1 = sqlLoop1 & "hasTipsRam_x, " sqlLoop1 = sqlLoop1 & "hasTipsRam_2, " sqlLoop1 = sqlLoop1 & "tipsG1, " sqlLoop1 = sqlLoop1 & "hasTipsG1_1, " sqlLoop1 = sqlLoop1 & "hasTipsG1_x, " sqlLoop1 = sqlLoop1 & "hasTipsG1_2, " sqlLoop1 = sqlLoop1 & "tipsG2, " sqlLoop1 = sqlLoop1 & "hasTipsG2_1, " sqlLoop1 = sqlLoop1 & "hasTipsG2_x, " sqlLoop1 = sqlLoop1 & "hasTipsG2_2 " sqlLoop1 = sqlLoop1 & "FROM tbl_tipsMatcher " sqlLoop1 = sqlLoop1 & "WHERE " sqlLoop1 = sqlLoop1 & "tipsOmgangID = "&intRequestTipsOmgangID&" " sqlLoop1 = sqlLoop1 & "AND " sqlLoop1 = sqlLoop1 & "hasBeenDeleted = 0 " sqlLoop1 = sqlLoop1 & "ORDER BY matchNr" set rsLoop1 = conn.execute(sqlLoop1) dim arrMatcher If NOT rsLoop1.EOF Then arrMatcher = rsLoop1.GetRows() Else ReDim arrMatcher(0,-1) End if dim intTotalMatcher intTotalMatcher = UBound(arrMatcher,2)+1 'response.write "intTotalMatcher = " &intTotalMatcher& "
" sql = "SELECT " sql = sql & "SUM(OK_enkel) AS antalEnkel, " sql = sql & "SUM(OK_hel) AS antalHel, " sql = sql & "SUM(OK_halv) AS antalHalv, " sql = sql & "SUM(OK_G1) AS antalG1, " sql = sql & "SUM(OK_G2) AS antalG2, " sql = sql & "SUM(hasTipsG1_1) AS hasTipsG1_1, " sql = sql & "SUM(hasTipsG1_x) AS hasTipsG1_x, " sql = sql & "SUM(hasTipsG1_2) AS hasTipsG1_2, " sql = sql & "SUM(hasTipsG2_1) AS hasTipsG2_1, " sql = sql & "SUM(hasTipsG2_x) AS hasTipsG2_x, " sql = sql & "SUM(hasTipsG2_2) AS hasTipsG2_2 " sql = sql & "FROM tbl_tipsMatcher " sql = sql & "WHERE " sql = sql & "tipsOmgangID = "&intRequestTipsOmgangID&";" 'response.write sql 'response.end set rs = conn.execute(sql) dim intAntalEnkel intAntalEnkel = cint(rs("antalEnkel")) 'response.write "intAntalEnkel = " &intAntalEnkel& "
" dim intAntalHel intAntalHel = cint(rs("antalHel")) 'response.write "intAntalHel = " &intAntalHel& "
" dim intAntalHalv intAntalHalv = cint(rs("antalHalv")) 'response.write "intAntalHalv = " &intAntalHalv& "
" dim intAntalG1 intAntalG1 = cint(rs("antalG1")) 'response.write "intAntalG1 = " &intAntalG1& "
" dim intAntalG2 intAntalG2 = cint(rs("antalG2")) 'response.write "intAntalG2 = " &intAntalG2& "
" dim intHasTipsG1_1 intHasTipsG1_1 = cint(rs("hasTipsG1_1")) 'response.write "intHasTipsG1_1 = " &intHasTipsG1_1& "
" dim intHasTipsG1_x intHasTipsG1_x = cint(rs("hasTipsG1_x")) 'response.write "intHasTipsG1_x = " &intHasTipsG1_x& "
" dim intHasTipsG1_2 intHasTipsG1_2 = cint(rs("hasTipsG1_2")) 'response.write "intHasTipsG1_2 = " &intHasTipsG1_2& "
" dim intHasTipsG1 intHasTipsG1 = cint(intHasTipsG1_1+intHasTipsG1_x+intHasTipsG1_2) 'response.write "intHasTipsG1 = " &intHasTipsG1& "
" dim intHasTipsG2_1 intHasTipsG2_1 = cint(rs("hasTipsG2_1")) 'response.write "intHasTipsG2_1 = " &intHasTipsG2_1& "
" dim intHasTipsG2_x intHasTipsG2_x = cint(rs("hasTipsG2_x")) 'response.write "intHasTipsG2_x = " &intHasTipsG2_x& "
" dim intHasTipsG2_2 intHasTipsG2_2 = cint(rs("hasTipsG2_2")) 'response.write "intHasTipsG2_2 = " &intHasTipsG2_2& "
" dim intHasTipsG2 intHasTipsG2 = cint(intHasTipsG2_1+intHasTipsG2_x+intHasTipsG2_2) 'response.write "intHasTipsG2 = " &intHasTipsG2& "
" dim intLockSumStatus : intLockSumStatus = 0 select case intTipsSystemID case 2 if intAntalEnkel = 4 then intLockSumStatus = intLockSumStatus + 1 end if if intAntalHel = 3 then intLockSumStatus = intLockSumStatus + 1 end if if intAntalHalv = 6 then intLockSumStatus = intLockSumStatus + 1 end if if intHasTipsG1 = 3 then if intAntalG1 = 3 then intLockSumStatus = intLockSumStatus + 1 end if end if if intHasTipsG2 = 3 then if intAntalG2 = 3 then intLockSumStatus = intLockSumStatus + 1 end if end if case 3 if intAntalEnkel = 1 then intLockSumStatus = intLockSumStatus + 1 end if if intAntalHel = 6 then intLockSumStatus = intLockSumStatus + 1 end if if intAntalHalv = 6 then intLockSumStatus = intLockSumStatus + 1 end if if intHasTipsG1 = 3 then if intAntalG1 = 3 then intLockSumStatus = intLockSumStatus + 1 end if end if if intHasTipsG2 = 3 then if intAntalG2 = 3 then intLockSumStatus = intLockSumStatus + 1 end if end if end select if intLockStatus = 1 then intLockSumStatus = 99 end if 'response.write "intLockSumStatus = " &intLockSumStatus& "
" %> www.donRollo.se <% if intGotoYLocation = 1 then %> <% else %> <% end if %>
<% call showLogin() %>
<% call showHeader() %>
<% call showMenu() %>
<% call mainPage() %>
<% call showBottom() %>
<% sub mainPage() %>
<% showTravMenu() %>
<% if intTotalMatcher <> 0 then %> <% end if %>
Välj system och fyll i korrekta tecken. Fyller du i fel antal tecken så inga problem - sidan håller koll på alla rader så att allt blir korrekt. När allt är klart skapas en textfil som du sedan KAN lämna in på SvS via "egna rader". Inga konstigheter.
<% if intLockStatus = 1 then %> <% else %> <% end if %>
Välj vilket system du vill använda och fyll sedan i alla tecken. Textfilen skapas när du låser systemet. Då görs också en sista kontroll att allt är korrekt ifyllt.
<% if intLockStatus = 1 then %>
Du har valt system:    <%if intTipsSystemID = 2 then%><%else%><%end if%> 3-6-108 med 12-rättsgaranti

<%if intTipsSystemID = 3 then%><%else%><%end if%> 6-6-324 med 11-rättsgaranti
<% else %>
Välj vilket system du vill använda:  checked<%end if%> onClick="nextStepValtTipsSystem();"> 3-6-108 med 12-rättsgaranti

checked<%end if%> onClick="nextStepValtTipsSystem();"> 6-6-324 med 11-rättsgaranti
<% end if %>
Systemet gäller för <%=strVariant%>
<% dim strMatchNr_loop2, strHemmaLag_loop2, strBortaLag_loop2 dim strTipsRam_loop2, strTipsG1_loop2, strTipsG2_loop2 dim intHasTipsRam_1_loop2, intHasTipsRam_x_loop2, intHasTipsRam_2_loop2 dim intCurrentProduct : intCurrentProduct = 0 dim intTipsMatcherID, intNextTipsMatcherID dim intHasTipsG1_1_loop2, intHasTipsG1_x_loop2, intHasTipsG1_2_loop2 dim intHasTipsG2_1_loop2, intHasTipsG2_x_loop2, intHasTipsG2_2_loop2 do until intCurrentProduct = 13 intTipsMatcherID = int(arrMatcher(0,intCurrentProduct)) strMatchNr_loop2 = int(arrMatcher(1,intCurrentProduct)) strHemmaLag_loop2 = trim(arrMatcher(2,intCurrentProduct)) strBortaLag_loop2 = trim(arrMatcher(3,intCurrentProduct)) strTipsRam_loop2 = trim(arrMatcher(4,intCurrentProduct)) intHasTipsRam_1_loop2 = int(arrMatcher(5,intCurrentProduct)) intHasTipsRam_x_loop2 = int(arrMatcher(6,intCurrentProduct)) intHasTipsRam_2_loop2 = int(arrMatcher(7,intCurrentProduct)) strTipsG1_loop2 = trim(arrMatcher(8,intCurrentProduct)) intHasTipsG1_1_loop2 = int(arrMatcher(9,intCurrentProduct)) intHasTipsG1_x_loop2 = int(arrMatcher(10,intCurrentProduct)) intHasTipsG1_2_loop2 = int(arrMatcher(11,intCurrentProduct)) strTipsG2_loop2 = trim(arrMatcher(12,intCurrentProduct)) intHasTipsG2_1_loop2 = int(arrMatcher(13,intCurrentProduct)) intHasTipsG2_x_loop2 = int(arrMatcher(14,intCurrentProduct)) intHasTipsG2_2_loop2 = int(arrMatcher(15,intCurrentProduct)) %> <% select case strMatchNr_loop2 case 3, 6, 9 %> <% end select %> <% intCurrentProduct = intCurrentProduct + 1 loop %>
Nr Hemmalag Bortalag   Ram G1 G2
<%=strMatchNr_loop2%>. <%=strHemmaLag_loop2%> <%=strBortalag_loop2%>
<% if intLockStatus = 1 then %> <% else %> <% end if %>
   
<% if intLockStatus = 1 then %> <% else %> <% end if %>
   
<% if intLockStatus = 1 then %> <% else %> <% end if %>
   
<% select case intTipsSystemID case 2 %> <% select case intLockSumStatus case 5 %> <% case 99 %> <% end select %>
Du har valt att använda system 3-6-108 med 12-rättsgaranti
<% if intAntalEnkel = 4 then %> <% else %> <% end if %> <% if intAntalHel = 3 then %> <% else %> <% end if %> <% if intAntalHalv = 6 then %> <% else %> <% end if %> <% if intHasTipsG1 = 3 then %> <% if intAntalG1 = 3 then %> <% else %> <% end if %> <% else %> <% end if %> <% if intHasTipsG2 = 3 then %> <% if intAntalG2 = 3 then %> <% else %> <% end if %> <% else %> <% end if %>
<%=intAntalEnkel%> av 4 <%=intAntalHel%> av 3 <%=intAntalHalv%> av 6 <%=intHasTipsG1%> av 3 <%=intHasTipsG2%> av 3
Alla tecken är nu korrekt ifylla och du kan nu låsa kupongen. Vid låsning skapas en textfil som du kan lämna in som "egna rader" på Svs.   
Systemet är nu låst och klart. Textfilen ser du här under. Vill du ändra ditt tips måste du först låsa upp. Då tas också textfilen bort.   
Klicka på fil-ikonen och spara sedan filen på din dator via "Spara som..." -->  
Klicka här för att rätta ditt system -->  
<% case 3 %> <% select case intLockSumStatus case 5 %> <% case 99 %> <% end select %>
Du har valt att använda system 6-6-324 med 11-rättsgaranti
<% if intAntalEnkel = 1 then %> <% else %> <% end if %> <% if intAntalHel = 6 then %> <% else %> <% end if %> <% if intAntalHalv = 6 then %> <% else %> <% end if %> <% if intHasTipsG1 = 3 then %> <% if intAntalG1 = 3 then %> <% else %> <% end if %> <% else %> <% end if %> <% if intHasTipsG2 = 3 then %> <% if intAntalG2 = 3 then %> <% else %> <% end if %> <% else %> <% end if %>
<%=intAntalEnkel%> av 1 <%=intAntalHel%> av 6 <%=intAntalHalv%> av 6 <%=intHasTipsG1%> av 3 <%=intHasTipsG2%> av 3
Alla tecken är nu korrekt ifylla och du kan nu låsa kupongen. Vid låsning skapas en textfil som du kan lämna in som "egna rader" på Svs.   
Systemet är nu låst och klart. Textfilen ser du här under. Vill du ändra ditt tips måste du först låsa upp. Då tas också textfilen bort.   
Klicka på fil-ikonen och spara sedan filen på din dator via "Spara som..." -->  
<% end select %>
<% end sub %> <% function getTipsImage(theNr) dim intNr, strImage intNr = int(theNr) select case intNr case 1 strImage = "top_0.gif" case 2 strImage = "middle_0.gif" case 3 strImage = "bottom_0.gif" case 4 strImage = "top_0.gif" case 5 strImage = "middle_0.gif" case 6 strImage = "bottom_0.gif" case 7 strImage = "top_0.gif" case 8 strImage = "middle_0.gif" case 9 strImage = "bottom_0.gif" case 10 strImage = "top_0.gif" case 11 strImage = "middle_0.gif" case 12 strImage = "middle_0.gif" case 13 strImage = "bottom_0.gif" end select getTipsImage = strImage end function function getSingleTips(theNr, hasTecken, the123) dim intNr, strImage, intThe123, intHasTecken intNr = int(theNr) intThe123 = int(the123) intHasTecken = int(hasTecken) select case intNr case 1, 4, 7, 10 select case intThe123 case 1 if intHasTecken = 1 then strImage = "top_1_on.gif" else strImage = "top_1_off.gif" end if case 2 if intHasTecken = 1 then strImage = "top_x_on.gif" else strImage = "top_x_off.gif" end if case 3 if intHasTecken = 1 then strImage = "top_2_on.gif" else strImage = "top_2_off.gif" end if end select case 2, 5, 8, 11, 12 select case intThe123 case 1 if intHasTecken = 1 then strImage = "middle_1_on.gif" else strImage = "middle_1_off.gif" end if case 2 if intHasTecken = 1 then strImage = "middle_x_on.gif" else strImage = "middle_x_off.gif" end if case 3 if intHasTecken = 1 then strImage = "middle_2_on.gif" else strImage = "middle_2_off.gif" end if end select case 3, 6, 9, 13 select case intThe123 case 1 if intHasTecken = 1 then strImage = "bottom_1_on.gif" else strImage = "bottom_1_off.gif" end if case 2 if intHasTecken = 1 then strImage = "bottom_x_on.gif" else strImage = "bottom_x_off.gif" end if case 3 if intHasTecken = 1 then strImage = "bottom_2_on.gif" else strImage = "bottom_2_off.gif" end if end select end select getSingleTips = strImage end function function getSingleTipsMouseOver(theNr, hasTecken, the123) dim intNr, strImage, intThe123, intHasTecken intNr = int(theNr) intThe123 = int(the123) intHasTecken = int(hasTecken) select case intNr case 1, 4, 7, 10 select case intThe123 case 1 if intHasTecken = 1 then strImage = "top_1_off.gif" else strImage = "top_1_on.gif" end if case 2 if intHasTecken = 1 then strImage = "top_x_off.gif" else strImage = "top_x_on.gif" end if case 3 if intHasTecken = 1 then strImage = "top_2_off.gif" else strImage = "top_2_on.gif" end if end select case 2, 5, 8, 11, 12 select case intThe123 case 1 if intHasTecken = 1 then strImage = "middle_1_off.gif" else strImage = "middle_1_on.gif" end if case 2 if intHasTecken = 1 then strImage = "middle_x_off.gif" else strImage = "middle_x_on.gif" end if case 3 if intHasTecken = 1 then strImage = "middle_2_off.gif" else strImage = "middle_2_on.gif" end if end select case 3, 6, 9, 13 select case intThe123 case 1 if intHasTecken = 1 then strImage = "bottom_1_off.gif" else strImage = "bottom_1_on.gif" end if case 2 if intHasTecken = 1 then strImage = "bottom_x_off.gif" else strImage = "bottom_x_on.gif" end if case 3 if intHasTecken = 1 then strImage = "bottom_2_off.gif" else strImage = "bottom_2_on.gif" end if end select end select getSingleTipsMouseOver = strImage end function function get36108Message(theType,intAntal) dim strTemp select case theType case 1 select case intAntal case 0 strTemp = "Du har ännu inte valt några säkra matcher" case 1 strTemp = "Du har valt 1 säker match, fattas tre..." case 2 strTemp = "Du har valt 2 säkra matcher, två kvar..." case 3 strTemp = "Du har valt 3 säkra matcher, en kvar..." case 4 strTemp = "Du har valt korrekt antal säkra matcher" case 5 strTemp = "Du har valt 1 säker för mycket..." case 6 strTemp = "Du har valt 2 säkra för mycket..." case 7 strTemp = "Du har valt 3 säkra för mycket..." case 8 strTemp = "Du har valt 4 säkra för mycket..." case 9 strTemp = "Du har valt 5 säkra för mycket..." case 10 strTemp = "Du har valt 6 säkra för mycket..." case 11 strTemp = "Du har valt 7 säkra för mycket..." case 12 strTemp = "Du har valt 8 säkra för mycket..." case 13 strTemp = "Du har valt 9 säkra för mycket..." end select case 2 select case intAntal case 0 strTemp = "Du har ännu inte valt någon helgardering" case 1 strTemp = "Du har valt 1 helgardering, fattas två..." case 2 strTemp = "Du har valt 2 helgarderingar, en kvar..." case 3 strTemp = "Du har valt korrekt antal helgarderingar" case 4 strTemp = "Du har valt 1 helgardering för mycket..." case 5 strTemp = "Du har valt 2 helgarderingar för mycket..." case 6 strTemp = "Du har valt 3 helgarderingar för mycket..." case 7 strTemp = "Du har valt 4 helgarderingar för mycket..." case 8 strTemp = "Du har valt 5 helgarderingar för mycket..." case 9 strTemp = "Du har valt 6 helgarderingar för mycket..." case 10 strTemp = "Du har valt 7 helgarderingar för mycket..." case 11 strTemp = "Du har valt 8 helgarderingar för mycket..." case 12 strTemp = "Du har valt 9 helgarderingar för mycket..." case 13 strTemp = "Du har valt 10 helgarderingar för mycket..." end select case 3 select case intAntal case 0 strTemp = "Du har ännu inte valt någon halvgardering" case 1 strTemp = "Du har valt 1 halvgardering, fattas fem..." case 2 strTemp = "Du har valt 2 halvgarderingar, fattas fyra..." case 3 strTemp = "Du har valt 3 halvgarderingar, fattas tre..." case 4 strTemp = "Du har valt 4 halvgarderingar, fattas två..." case 5 strTemp = "Du har valt 5 halvgarderingar, fattas en..." case 6 strTemp = "Du har valt korrekt antal halvgarderingar" case 7 strTemp = "Du har valt 1 halvgardering för mycket..." case 8 strTemp = "Du har valt 2 halvgarderingar för mycket..." case 9 strTemp = "Du har valt 3 halvgarderingar för mycket..." case 10 strTemp = "Du har valt 4 halvgarderingar för mycket..." case 11 strTemp = "Du har valt 5 halvgarderingar för mycket..." case 12 strTemp = "Du har valt 6 halvgarderingar för mycket..." case 13 strTemp = "Du har valt 7 halvgarderingar för mycket..." end select case 4 select case intAntal case 0 strTemp = "Du har ännu inte valt någon G1" case 1 strTemp = "Du har valt 1 G1, fattas två..." case 2 strTemp = "Du har valt 2 G1, en kvar..." case 3 strTemp = "Du har valt korrekt antal G1" case 4 strTemp = "Du har valt 1 G1 för mycket..." case 5 strTemp = "Du har valt 2 G1 för mycket..." case 6 strTemp = "Du har valt 3 G1 för mycket..." case 7 strTemp = "Du har valt 4 G1 för mycket..." case 8 strTemp = "Du har valt 5 G1 för mycket..." case 9 strTemp = "Du har valt 6 G1 för mycket..." case 10 strTemp = "Du har valt 7 G1 för mycket..." case 11 strTemp = "Du har valt 8 G1 för mycket..." case 12 strTemp = "Du har valt 9 G1 för mycket..." case 13 strTemp = "Du har valt 10 G1 för mycket..." end select case 5 select case intAntal case 0 strTemp = "Du har ännu inte valt någon G2" case 1 strTemp = "Du har valt 1 G2, fattas två..." case 2 strTemp = "Du har valt 2 G2, en kvar..." case 3 strTemp = "Du har valt korrekt antal G2" case 4 strTemp = "Du har valt 1 G2 för mycket..." case 5 strTemp = "Du har valt 2 G2 för mycket..." case 6 strTemp = "Du har valt 3 G2 för mycket..." case 7 strTemp = "Du har valt 4 G2 för mycket..." case 8 strTemp = "Du har valt 5 G2 för mycket..." case 9 strTemp = "Du har valt 6 G2 för mycket..." case 10 strTemp = "Du har valt 7 G2 för mycket..." case 11 strTemp = "Du har valt 8 G2 för mycket..." case 12 strTemp = "Du har valt 9 G2 för mycket..." case 13 strTemp = "Du har valt 10 G2 för mycket..." end select case else end select get36108Message = strTemp end function %>