<%@ Language=VBScript %> <% Response.Expires=-1 If Session("ValidUser") <> 1 then Response.Redirect "login.asp" Else Session("LastPage") = Session("CurrentPage") Session("CurrentPage") = "TPWagerBetConfirm.asp" End if %> <% 'response.write("LastPage:" & Session("LastPage") & "
") 'response.write("CurrentPage:" & Session("CurrentPage") & "
") %> <% pStr="private,no-cache, must-revalidate" response.expiresAbsolute=#2000-01-01# response.addheader "pragma","no-cache" response.addheader "cache-control",pStr %> <% '///////////////////////////////////////////////////////////////////////////////////// '/ '/ Functions '/ '///////////////////////////////////////////////////////////////////////////////////// Function IIf( expr, truepart, falsepart ) IIf = falsepart If expr Then IIf = truepart End Function Function CollectFormParameters() Dim oParamsRS Set oParamsRS = Server.CreateObject("ADODB.Recordset") oParamsRS.CursorType = 3 oParamsRS.CursorLocation = 3 oParamsRS.CursorLocation = adUseClient SET oParamsRS = BuildRecordset For each inputField in Request.Form For each inputValue in Request.Form(inputField) sInput = Split(inputField,";") if ubound(sInput) > 0 and inputvalue <> "" then GetGameTypeIDFromGame sInput(1), sGameTypeID, sGameDesc ' response.write sInput(0) oParamsRS.AddNew oParamsRS.Fields("Game_ID").Value = sInput(1) oParamsRS.Fields("GameLine_ID").Value = sInput(2) oParamsRS.Fields("Length").Value = sInput(3) oParamsRS.Fields("GameType_ID").Value = sGameTypeID oParamsRS.Fields("Location").Value = iif(instr(sInput(0), "Visitor"),"Visitor", "Home") oParamsRS.Fields("GameDesc").Value = sGameDesc oParamsRS.Fields("InputValue").Value = inputValue oParamsRS.Fields("InputField").Value = sInput(0) oParamsRS.Fields("League").Value = sInput(4) oParamsRS.Fields("LeagueConf").Value = "" oParamsRS.Fields("GameTypeOrder").Value = GetGameTypeOrder(sGameTypeID) oParamsRS.Fields("PeriodOrder").Value = GetPeriodOrder(sInput(3)) oParamsRS.Fields("LeagueOrder").Value = GetLeagueOrder(sInput(4)) oParamsRS.Fields("BetParamOrder").Value = BetParamOrder(sInput(0)) End If Next Next 'response.write "
Recordset Recordcount: " & oParamsRS.recordcount & "
" SET CollectFormParameters = oParamsRS End Function Public Function GetGameTypeOrder(inGameTypeID) Select case cint(inGameTypeID) case 1 GetGameTypeOrder = 1 case 2 GetGameTypeOrder = 2 case 3 GetGameTypeOrder = 3 case 4 GetGameTypeOrder = 4 case 5 GetGameTypeOrder = 5 case 6 GetGameTypeOrder = 6 case 7 GetGameTypeOrder = 7 case 8 GetGameTypeOrder = 8 case else ' response.write "I am: " & inGameTypeID & "
" End Select End Function Public Function GetPeriodOrder(inPeriod) Select case inPeriod case "Game" GetPeriodOrder = 1 case "1stHalf" GetPeriodOrder = 2 case "2ndHalf" GetPeriodOrder = 3 case "1stQtr" GetPeriodOrder = 4 case "2ndQtr" GetPeriodOrder = 5 case "3rdQtr" GetPeriodOrder = 6 case "4thQtr" GetPeriodOrder = 7 case else 'response.write "I am: " & inPeriod & "
" End Select End Function Public Function GetLeagueOrder(inLeague) Select case inLeague case "NFL" GetLeagueOrder = 1 case "NBA" GetLeagueOrder = 2 case "College" GetLeagueOrder = 3 case else 'response.write "I am: " & inLeague & "
" End Select End Function Public Function BetParamOrder(inParamOrder) Select case inParamOrder case "chkVisitorSpread" BetParamOrder = 1 case "chkVisitorMoneyLine" BetParamOrder = 2 case "chkTotalPointOver" BetParamOrder= 3 case "chkVisitorTeamTotalPointsOver" BetParamOrder= 4 case "chkVisitorTeamTotalPointsUnder" BetParamOrder= 5 case "chkHomeSpread" BetParamOrder= 6 case "chkHomeMoneyLine" BetParamOrder= 7 case "chkTotalPointsUnder" BetParamOrder= 8 case "chkHomeTeamTotalPointsOver" BetParamOrder= 9 case "chkHomeTeamTotalPointsUnder" BetParamOrder= 10 case else 'response.write "I am: " & inParamOrder & "
" End Select End Function Public Function BuildRecordset() Set oRS2 = Server.CreateObject("ADODB.Recordset") oRS2.CursorType = 3 oRS2.CursorLocation = 3 oRS2.CursorLocation = adUseClient oRS2.Fields.Append "Game_ID", adDouble, , adFldMayBeNull oRS2.Fields.Append "GameLine_ID", adDouble, , adFldMayBeNull oRS2.Fields.Append "Length", adVarChar, 50, adFldMayBeNull oRS2.Fields.Append "GameType_ID", adDouble, , adFldMayBeNull oRS2.Fields.Append "GameDesc", adVarChar, 50, adFldMayBeNull oRS2.Fields.Append "InputValue", adVarChar, 50, adFldMayBeNull oRS2.Fields.Append "InputField", adVarChar, 50, adFldMayBeNull oRS2.Fields.Append "Location", adVarChar, 50, adFldMayBeNull oRS2.Fields.Append "League", adVarChar, 50, adFldMayBeNull oRS2.Fields.Append "LeagueConf", adVarChar, 50, adFldMayBeNull oRS2.Fields.Append "GameTypeOrder", adInteger, , adFldMayBeNull oRS2.Fields.Append "PeriodOrder", adInteger, , adFldMayBeNull oRS2.Fields.Append "LeagueOrder", adInteger, , adFldMayBeNull oRS2.Fields.Append "BetParamOrder", adInteger, , adFldMayBeNull oRS2.open Set BuildRecordset = oRS2 End Function Sub GetGameTypeIDFromGame(pGameID, pGameTypeID, pGameDesc) strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn set oCmd = Server.CreateObject("ADODB.Command") With oCmd .ActiveConnection = oConn .CommandText = "GetGameTypeFromGame" .CommandType = adCmdStoredProc 'Add Input Parameters .Parameters.Append .CreateParameter("@Game_ID", adBigInt, adParamInput, , pGameID) .Parameters.Append .CreateParameter("@GameType_ID", adBigInt, adParamOutput, , 0) .Parameters.Append .CreateParameter("@GameDesc", advarchar, adParamOutput, 50, 0) 'Execute the function 'If not returning a recordset, use the adExecuteNoRecords parameter option .Execute, , adExecuteNoRecords pGameTypeID= .Parameters("@GameType_ID") pGameDesc= .Parameters("@GameDesc") End With End Sub Sub GetBetFigures(dBetAmount, dJuice, dRiskAmount, dWinAmount) if dJuice > 0 then dWinAmount = round(dBetAmount * (abs(dJuice)/100), 2) dRiskAmount = dBetAmount else dRiskAmount = round(dBetAmount * (abs(dJuice)/100), 2) dWinAmount = dBetAmount end if End Sub Function GetBetTypeID(inDesc, inNumberBets, inTPFootballSpread, inTPBasketballSpread) strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn If inTPFootballSpread <> 0 then sSql = "SELECT Bet_Type_ID FROM Bet_Type " & _ "WHERE (Description LIKE '%" & inDesc & "%') AND " & _ "(Number_Bets = " & inNumberBets & ") AND (TP_Football_Points = " & inTPFootballSpread & ")" Else sSql = "SELECT Bet_Type_ID FROM Bet_Type " & _ "WHERE (Description LIKE '%" & inDesc & "%') AND " & _ "(Number_Bets = " & inNumberBets & ") AND (TP_Basketball_Points = " & inTPBasketballSpread & ")" End if Set RS = Server.CreateObject("ADODB.Recordset") RS.CursorType = 3 RS.CursorLocation = 3 RS.ActiveConnection = oConn RS.Open sSql GetBetTypeID = RS.Fields("Bet_Type_ID").value & "" End Function Function GetMyClientID() strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn sSql = "Select * from Clients where upper(userid) = '" & ucase(Session("Usercode")) & "' " & _ "And Password = '" & Request.Form("txtPassword")& "'" Set RS = Server.CreateObject("ADODB.Recordset") RS.CursorType = 3 RS.CursorLocation = 3 RS.ActiveConnection = oConn RS.Open sSql GetMyClientID = RS.Fields("Client_ID").value & "" End Function Public Function GetTPGameLineInfo(inGameID, inGameLineID, inFootballModifier, inBasketballModifier) strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn 'response.write ("inGameID: ") & inGameID & "
" 'response.write ("inGameLineID: ") & inGameLineID & "
" 'response.write ("inFootballModifier: ") & inFootballModifier & "
" 'response.write ("inBasketballModifier: ") & inBasketballModifier & "
" set oCmd = Server.CreateObject("ADODB.Command") With oCmd .ActiveConnection = oConn .CommandText = "GetTPGameLineInfo" .CommandType = adCmdStoredProc 'Add Input Parameters .Parameters.Append .CreateParameter("@Game_ID", adBigInt, adParamInput, , inGameID) .Parameters.Append .CreateParameter("@Game_Line_ID", adBigInt, adParamInput, , inGameLineID ) .Parameters.Append .CreateParameter("@FootballModifier", adDouble, adParamInput, , inFootballModifier) .Parameters.Append .CreateParameter("@BasketballModifier", adDouble, adParamInput, , inBasketballModifier) 'Execute the function Set GetTPGameLineInfo = .Execute End With End Function Sub InsertBet(pBetTypeID, pDesc, pWagerAmount, pPayAmount, pSequence, pConfirmationNo) strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn set oCmd = Server.CreateObject("ADODB.Command") With oCmd .ActiveConnection = oConn .CommandText = "InsertBet" .CommandType = adCmdStoredProc 'Add Input Parameters .Parameters.Append .CreateParameter("@BetType_ID", adBigInt, adParamInput, , pBetTypeID) .Parameters.Append .CreateParameter("@Desc", advarchar, adParamInput, 50, pDesc) .Parameters.Append .CreateParameter("@Client_ID", adBigInt, adParamInput, , GetMyClientID ) .Parameters.Append .CreateParameter("@BetAmount", adCurrency, adParamInput, , pWagerAmount) .Parameters.Append .CreateParameter("@PayAmount", adCurrency, adParamInput, , pPayAmount) .Parameters.Append .CreateParameter("@Sequence", adBigInt, adParamOutput, , 0) .Parameters.Append .CreateParameter("@ConfirmationNo", advarchar, adParamOutput, 50, 0) 'Execute the function 'If not returning a recordset, use the adExecuteNoRecords parameter option .Execute, , adExecuteNoRecords pSequence= .Parameters("@Sequence") pConfirmationNo = .Parameters("@ConfirmationNo") End With End Sub Function DidGameLineChange(sGameID, sGameLineID) strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn 'response.write("The GameID: " & sGameID & "
") 'response.write("The GameLineID: " & sGameLineID & "
") GetGameTypeIDFromGame sGameID, sGameTypeID, sGameDesc if cdbl(sGameTypeID) = 2 then sSql = "SELECT dbo.CurrentFootballLine(" & sGameID & ") As CurrentLine " elseif cdbl(sGameTypeID) = 5 then sSql = "SELECT dbo.CurrentBasketballLine(" & sGameID & ") As CurrentLine " end if Set RS = Server.CreateObject("ADODB.Recordset") RS.CursorType = 3 RS.CursorLocation = 3 RS.ActiveConnection = oConn RS.Open sSql sCurrentGameLineID = RS.Fields("CurrentLine").value & "" If cdbl(sCurrentGameLineID) <> cdbl(sGameLineID) then DidGameLineChange = True Else DidGameLineChange = False End If 'response.write("The CurrentGameLineID: " & sCurrentGameLineID & "
") End Function Function InsertBetLine(sBet_ID, sGameLine_ID, sPeriod, sSelection, sTeam, sSpread, sJuice, sBetType, sTeamLeague, sGame_ID) strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn 'response.write("sBet_ID: " & sBet_ID & "
") 'response.write("sGameLine_ID: " & sGameLine_ID & "
" ) 'response.write("sPeriod: " & sPeriod & "
" ) 'response.write("sSelection: " & sSelection & "
" ) 'response.write("sTeam: " & sTeam & "
" ) 'response.write("sSpread: " & sSpread & "
" ) 'response.write("sJuice: " & sJuice & "
" ) 'response.write("sBetType: " & sBetType& "
" ) 'response.write("sTeamLeague: " & sTeamLeague & "
" ) 'response.write("sGame_ID: " & sGame_ID & "
" ) set oCmd = Server.CreateObject("ADODB.Command") With oCmd .ActiveConnection = oConn .CommandText = "InsertBetLine" .CommandType = adCmdStoredProc 'Add Input Parameters .Parameters.Append .CreateParameter("@Bet_ID", adBigInt, adParamInput, , sBet_ID) .Parameters.Append .CreateParameter("@Game_ID", adBigInt, adParamInput, , sGame_ID) .Parameters.Append .CreateParameter("@GameLine_ID", adBigInt, adParamInput, , sGameLine_ID) .Parameters.Append .CreateParameter("@Period", advarchar, adParamInput, 50, sPeriod) .Parameters.Append .CreateParameter("@Selection", advarchar, adParamInput, 50, sSelection) .Parameters.Append .CreateParameter("@Team", advarchar, adParamInput, 50, sTeam) .Parameters.Append .CreateParameter("@Spread", adDouble, adParamInput, , sSpread) .Parameters.Append .CreateParameter("@Juice", adDouble, adParamInput, , sJuice) .Parameters.Append .CreateParameter("@BetType", advarchar, adParamInput, 50, sBetType) .Parameters.Append .CreateParameter("@TeamLeague", advarchar, adParamInput, 50, sTeamLeague) 'Execute the function 'If not returning a recordset, use the adExecuteNoRecords parameter option .Execute, , adExecuteNoRecords End With End Function '///////////////////////////////////////////////////////////////////////////////////// '/ '/ Main Section '/ '///////////////////////////////////////////////////////////////////////////////////// 'Get Method 'For each inputField in Request.QueryString ' For each inputValue in Request.QueryString(inputField) ' response.write inputField & " = " & inputValue & "
" ' Next 'Next Dim oRS Dim iCount Dim strConn Dim oConn Dim sSQL Dim sInput Dim sBetTeam Dim sHeading Dim bLineChanged Dim bConfirm1 Dim bConfirm2 Dim sbgcolor %> Sure Bet <% If Session("ValidUser") <> 1 then Response.write "" Else Response.write "" End if %>
 
 
 

 

<% 'Response.write("Football Main - chkFootball: " & "" & Request.Form("chkFootball")) & "

" 'Response.write("Football (NFL) - chkFootballNFL: " & "" & Request.Form("chkFootballNFL")) & "

" 'Response.write("Football (NFL) FULL - chkNFLFull: " & "" & Request.Form("chkNFLFull")) & "

" 'Response.write("Football (NFL) Half - chkNFLhalf: " & "" & Request.Form("chkNFLhalf")) & "

" 'Response.write("Football (NFL) Qtr - chkNFLquarter: " & "" & Request.Form("chkNFLquarter")) & "

" 'Response.write("Football (College) - chkColFoot: " & "" & Request.Form("chkColFoot")) & "

" 'Response.write("Football (College) FULL - chkColFootFull: " & "" & Request.Form("chkColFootFull")) & "

" 'Response.write("Football (College) Half - chkColFoothalf: " & "" & Request.Form("chkColFoothalf")) & "

" 'Response.write("Football (College) Qtr - chkColFootquarter: " & "" & Request.Form("chkColFootquarter")) & "

" 'Response.write("Football (Canadian) - chkCanadaFoot: " & "" & Request.Form("chkCanadaFoot")) & "

" 'Response.write("Football (Arena) - chkArenaFoot: " & "" & Request.Form("chkArenaFoot")) & "

" 'Response.write("From Page: " & "" & Request.Form("page")) & "

" 'response.write("Football ... " & Request.Form("Football")) & "

" 'Determine the heading here. 'sHeading = "Selections Have Been Made, Please Review & Enter Wager Amount!" 'sHeading = "The Following Wager Has Been Made, Please Review and Enter Password To Confirm!" sbgcolor = "#EBEBEB" sWagerType = " -- Teaser Bet --" if trim(Request.Form("page")) = "WagerTPChoices" then Response.write("

") 'Response.write("From Page: " & Request.Form("page")) sHeading = "Selections Have Been Made, Please Review & Enter Wager Amount!" bConfirm1 = true bConfirm2 = False elseif trim(Request.Form("page")) = "TPWagerBetConfirm" then Response.write("") 'Response.write("From Page: " & Request.Form("page")) bConfirm1 = false bConfirm2 = true sHeading = "The Following Wager Has Been Made, Please Review and Enter Password To Confirm!" else 'Check The Password Here 'Response.write("User Code: " & Session("Usercode")) strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn sSql = "Select * from Clients where upper(userid) = '" & ucase(Session("Usercode")) & "' " & _ "And Password = '" & Request.Form("txtPassword")& "'" Set oRS = Server.CreateObject("ADODB.Recordset") oRS.CursorType = 3 oRS.CursorLocation = 3 oRS.ActiveConnection = oConn oRS.Open sSql 'Response.Write(oRS.RecordCount) if oRS.RecordCount <> 0 then Response.write("") 'Response.write("From Page: " & Request.Form("page")) bConfirm1 = false bConfirm2 = false bWrongPassword = False bPasswordAccepted = True sHeading = "Your Bet has been accepted ... Print this page for your records." else 'Session("Usercode") = "" 'Session("ValidUser") = 0 'Response.Redirect "login.asp" 'Response.Redirect "123.asp" Response.write("") 'Response.write("From Page: " & Request.Form("page")) bConfirm1 = false bConfirm2 = true bWrongPassword = true bPasswordAccepted = False sHeading = "The Following Wager Has Been Made, Please Review and Enter Password To Confirm!" end if end if sLineChangedText = "This Line Has Changed! - Please Review Before Continuing" %> <% strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn if bPasswordAccepted then 'server.transfer "Confirmation.asp" InsertBet Request.Form("BetTypeID"), "Teaser Bet", Request.Form("txtWagerAmount"), Request.Form("Payout"), sSequenceID, sConfirmationNo end if Set oRS = Server.CreateObject("ADODB.Recordset") oRS.CursorType = 3 oRS.CursorLocation = 3 iCount = 1 SET oRSParams = CollectFormParameters oRSParams.Sort="GameTypeOrder, LeagueOrder, PeriodOrder, Game_ID, BetParamOrder" oRSParams.movefirst Do while not oRSParams.EOF 'response.write "Game_ID: " & oRSParams.fields("Game_ID").value & "
" 'response.write "GameLine_ID: " & oRSParams.fields("GameLine_ID").value & "
" 'response.write "Length: " & oRSParams.fields("Length").value & "
" 'response.write "GameType_ID: " & oRSParams.fields("GameType_ID").value & "
" 'response.write "GameDesc: " & oRSParams.fields("GameDesc").value & "
" 'response.write "InputValue: " & oRSParams.fields("InputValue").value & "
" 'response.write "InputField: " & oRSParams.fields("InputField").value & "
" 'response.write "Location: " & oRSParams.fields("Location").value & "
" 'response.write "League: " & oRSParams.fields("League").value & "
" 'response.write "League Conf: " & oRSParams.fields("LeagueConf").value & "
" 'response.write "GameTypeOrder: " & oRSParams.fields("GameTypeOrder").value & "
" 'response.write "PeriodOrder: " & oRSParams.fields("PeriodOrder").value & "
" 'response.write "LeagueOrder: " & oRSParams.fields("LeagueOrder").value & "
" 'response.write "BetParamOrder: " & oRSParams.fields("BetParamOrder").value & "
" response.write "" ' response.write "QueryString/Football: " & Request.Form("Football") & "

" ' response.write "QueryString/Basketball: " & Request.Form("Basketball") & "

" ' response.write "QueryString/WagerType: " & Request.Form("WagerType") & "

" iFootballModifier = iif(Request.Form("Football") = "", 0, Request.Form("Football")) iBasketballModifier = iif(Request.Form("Basketball") = "", 0, Request.Form("Basketball")) if oRS.State = 1 Then oRS.Close 'Make sure we dont process the continue flag 'oRS.Open "Exec GetTPGameLineInfo" & cint(oRSParams.fields("Game_ID").value) & ", " & cint(oRSParams.fields("GameLine_ID").value), val(iFootballModifier), val(iBasketballModifier), oConn Set oRS = GetTPGameLineInfo(oRSParams.fields("Game_ID").value, oRSParams.fields("GameLine_ID").value, iFootballModifier, iBasketballModifier) 'response.write "GameLine RecordCount: " & oRS.Recordcount & "
" 'response.write "count " & cstr(icount) & "
" 'response.write "InputField: " & oRSParams.fields("InputField").value & "
" 'response.write "Game_ID: " & oRSParams.fields("Game_ID").value & "
" 'response.write "GameLine_ID: " & oRSParams.fields("GameLine_ID").value & "
" 'response.write "Length: " & oRSParams.fields("Length").value & "
" Select case trim(oRSParams.fields("InputField").value) case "chkVisitorSpread" sBetType = "Spread" sTeamName = oRS.fields("Visitor_Team_Name").value & " (" & oRS.fields("Visitor_Team_GameID").value & ")" Select Case oRSParams.fields("Length").value case "Game" bLineChanged = DidGameLineChange(cint(oRSParams.fields("Game_ID").value),cint(oRSParams.fields("GameLine_ID").value)) sLength = oRSParams.fields("Length").value sLimits = replace(iif(oRS.fields("Visitor_Final_Line").value & "" = 0, "PK", oRS.fields("Visitor_Final_Line").value),".5","½") & " " & oRS.fields("Visitor_Final_Line_Juice").value sJuice = iif(sJuice = "", oRS.fields("Visitor_Final_Line_Juice").value, sJuice & ";" & oRS.fields("Visitor_Final_Line_Juice").value) 'GetBetFigures oRSParams.fields("InputValue").value, oRS.fields("Visitor_Final_Line_Juice").value, dRiskAmount, dWinAmount if bPasswordAccepted then InsertBetLine sSequenceID, cint(oRSParams.fields("GameLine_ID").value), oRSParams.fields("Length").value, _ sBetType, sTeamName, oRS.fields("Visitor_Final_Line").value, oRS.fields("Visitor_Final_Line_Juice").value, oRS.fields("Type").value, oRS.fields("Team_League").value, cint(oRS.fields("Game_ID").value) sComments1 = "Wager Confirmation # " & sConfirmationNo sComments2 = "Bet ID # " & sSequenceID Else sComments1 = "" sComments2 = "" End If End Select case "chkHomeSpread" sBetType = "Spread" sTeamName = oRS.fields("Home_Team_Name").value & " (" & oRS.fields("Home_Team_GameID").value & ")" Select Case oRSParams.fields("Length").value case "Game" bLineChanged = DidGameLineChange(cint(oRSParams.fields("Game_ID").value),cint(oRSParams.fields("GameLine_ID").value)) sLength = oRSParams.fields("Length").value sLimits = replace(iif(oRS.fields("Home_Final_Line").value & "" = 0, "PK", oRS.fields("Home_Final_Line").value),".5","½") & " " & oRS.fields("Home_Final_Line_Juice").value sJuice = iif(sJuice = "", oRS.fields("Home_Final_Line_Juice").value, sJuice & ";" & oRS.fields("Home_Final_Line_Juice").value) 'GetBetFigures oRSParams.fields("InputValue").value, oRS.fields("Home_Final_Line_Juice").value, dRiskAmount, dWinAmount if bPasswordAccepted then InsertBetLine sSequenceID, cint(oRSParams.fields("GameLine_ID").value), oRSParams.fields("Length").value, _ sBetType, sTeamName, oRS.fields("Home_Final_Line").value, oRS.fields("Home_Final_Line_Juice").value, oRS.fields("Type").value, oRS.fields("Team_League").value, cint(oRS.fields("Game_ID").value) sComments1 = "Wager Confirmation # " & sConfirmationNo sComments2 = "Bet ID # " & sSequenceID else sComments1 = "" sComments2 = "" End If End Select case "chkTotalPointOver" sBetType = "Game Total Points(Over)" sTeamName = oRS.fields("Visitor_Team_Name").value & " (" & oRS.fields("Visitor_Team_GameID").value & ")/" & _ oRS.fields("Home_Team_Name").value Select Case oRSParams.fields("Length").value case "Game" bLineChanged = DidGameLineChange(cint(oRSParams.fields("Game_ID").value),cint(oRSParams.fields("GameLine_ID").value)) sLength = oRSParams.fields("Length").value sLimits = replace(iif(oRS.fields("Final_Total_Over").value & "" = 0, "PK", oRS.fields("Final_Total_Over").value),".5","½") & " " & oRS.fields("Final_Total_Over_Juice").value sJuice = iif(sJuice = "", oRS.fields("Final_Total_Over_Juice").value, sJuice & ";" & oRS.fields("Final_Total_Over_Juice").value) 'GetBetFigures oRSParams.fields("InputValue").value, oRS.fields("Final_Total_Over_Juice").value, dRiskAmount, dWinAmount if bPasswordAccepted then InsertBetLine sSequenceID, cint(oRSParams.fields("GameLine_ID").value), oRSParams.fields("Length").value, _ sBetType, sTeamName, oRS.fields("Final_Total_Over").value, oRS.fields("Final_Total_Over_Juice").value, oRS.fields("Type").value, oRS.fields("Team_League").value, cint(oRS.fields("Game_ID").value) sComments1 = "Wager Confirmation # " & sConfirmationNo sComments2 = "Bet ID # " & sSequenceID else sComments1 = "" sComments2 = "" End If End Select case "chkTotalPointsUnder" sBetType = "Game Total Points(Under)" sTeamName = oRS.fields("Visitor_Team_Name").value & "/" & _ oRS.fields("Home_Team_Name").value & " (" & oRS.fields("Home_Team_GameID").value & ")" Select Case oRSParams.fields("Length").value case "Game" bLineChanged = DidGameLineChange(cint(oRSParams.fields("Game_ID").value),cint(oRSParams.fields("GameLine_ID").value)) sLength = oRSParams.fields("Length").value sLimits = replace(iif(oRS.fields("Final_Total_Under").value & "" = 0, "PK", oRS.fields("Final_Total_Under").value),".5","½") & " " & oRS.fields("Final_Total_Under_Juice").value sJuice = iif(sJuice = "", oRS.fields("Final_Total_Under_Juice").value, sJuice & ";" & oRS.fields("Final_Total_Under_Juice").value) 'GetBetFigures oRSParams.fields("InputValue").value, oRS.fields("Final_Total_Under_Juice").value, dRiskAmount, dWinAmount if bPasswordAccepted then InsertBetLine sSequenceID, cint(oRSParams.fields("GameLine_ID").value), oRSParams.fields("Length").value, _ sBetType, sTeamName, oRS.fields("Final_Total_Under").value, oRS.fields("Final_Total_Under_Juice").value, oRS.fields("Type").value, oRS.fields("Team_League").value, cint(oRS.fields("Game_ID").value) sComments1 = "Wager Confirmation # " & sConfirmationNo sComments2 = "Bet ID # " & sSequenceID else sComments1 = "" sComments2 = "" End If End Select End Select 'response.write "GameTypeOrder" & oRSParams.fields("GameTypeOrder").value & "
" 'response.write "LeagueOrder" & oRSParams.fields("LeagueOrder").value & "
" 'response.write "Game_ID" & oRSParams.fields("Game_ID").value & "
" 'response.write "PeriodOrder" & oRSParams.fields("PeriodOrder").value & "
" 'response.write "BetParamOrder" & oRSParams.fields("BetParamOrder").value & "
" %>

<% ' if sbgcolor = "#EBEBEB" then sbgcolor = "#CCCCCC" else sbgcolor = "#EBEBEB" end if iCount = iCount + 1 oRSParams.Movenext Loop %> <% If bConfirm1 Then Response.write("") Response.write("") Response.write("") elseif bConfirm2 Then Response.write("") Response.write("") Response.write("") Response.write("") end if %> <% If bConfirm2 Then sInput = Split(sJuice,";") 'Response.Write("Wager Amount:" & Request.Form("txtWagerAmount")) & "
" 'Response.Write("Juices: " & sJuice) & "
" 'Response.write("Items: " & ubound(sInput)+ 1) & "
" set oCmd = Server.CreateObject("ADODB.Command") iFootballModifier = iif(Request.Form("Football") = "", 0, Request.Form("Football")) iBasketballModifier = iif(Request.Form("Basketball") = "", 0, Request.Form("Basketball")) 'sWager_Type = Request.Form("WagerType") 'sBet_Type_ID = GetBetTypeID(sWager_Type, ubound(sInput)+ 1, iFootballModifier, iBasketballModifier) response.write "" ' response.write("iFootballModifier: " & iFootballModifier & "
") ' response.write("iBasketballModifier: " & iBasketballModifier & "
") Select Case ubound(sInput)+ 1 case 2 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = 0 dJuice4 = 0 dJuice5 = 0 dJuice6 = 0 dJuice7 = 0 dJuice8 = 0 dJuice9 = 0 dJuice10 = 0 dJuice11 = 0 dJuice12 = 0 dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 3 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = 0 dJuice5 = 0 dJuice6 = 0 dJuice7 = 0 dJuice8 = 0 dJuice9 = 0 dJuice10 = 0 dJuice11 = 0 dJuice12 = 0 dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 4 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = 0 dJuice6 = 0 dJuice7 = 0 dJuice8 = 0 dJuice9 = 0 dJuice10 = 0 dJuice11 = 0 dJuice12 = 0 dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 5 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = 0 dJuice7 = 0 dJuice8 = 0 dJuice9 = 0 dJuice10 = 0 dJuice11 = 0 dJuice12 = 0 dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 6 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = sInput(5) dJuice7 = 0 dJuice8 = 0 dJuice9 = 0 dJuice10 = 0 dJuice11 = 0 dJuice12 = 0 dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 7 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = sInput(5) dJuice7 = sInput(6) dJuice8 = 0 dJuice9 = 0 dJuice10 = 0 dJuice11 = 0 dJuice12 = 0 dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 8 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = sInput(5) dJuice7 = sInput(6) dJuice8 = sInput(7) dJuice9 = 0 dJuice10 = 0 dJuice11 = 0 dJuice12 = 0 dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 9 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = sInput(5) dJuice7 = sInput(6) dJuice8 = sInput(7) dJuice9 = sInput(8) dJuice10 = 0 dJuice11 = 0 dJuice12 = 0 dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 10 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = sInput(5) dJuice7 = sInput(6) dJuice8 = sInput(7) dJuice9 = sInput(8) dJuice10 = sInput(9) dJuice11 = 0 dJuice12 = 0 dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 11 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = sInput(5) dJuice7 = sInput(6) dJuice8 = sInput(7) dJuice9 = sInput(8) dJuice10 = sInput(9) dJuice11 = sInput(10) dJuice12 = 0 dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 12 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = sInput(5) dJuice7 = sInput(6) dJuice8 = sInput(7) dJuice9 = sInput(8) dJuice10 = sInput(9) dJuice11 = sInput(10) dJuice12 = sInput(11) dJuice13 = 0 dJuice14 = 0 dJuice15 = 0 Case 13 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = sInput(5) dJuice7 = sInput(6) dJuice8 = sInput(7) dJuice9 = sInput(8) dJuice10 = sInput(9) dJuice11 = sInput(10) dJuice12 = sInput(11) dJuice13 = sInput(12) dJuice14 = 0 dJuice15 = 0 Case 14 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = sInput(5) dJuice7 = sInput(6) dJuice8 = sInput(7) dJuice9 = sInput(8) dJuice10 = sInput(9) dJuice11 = sInput(10) dJuice12 = sInput(11) dJuice13 = sInput(12) dJuice14 = sInput(13) dJuice15 = 0 Case 15 dJuice1 = sInput(0) dJuice2 = sInput(1) dJuice3 = sInput(2) dJuice4 = sInput(3) dJuice5 = sInput(4) dJuice6 = sInput(5) dJuice7 = sInput(6) dJuice8 = sInput(7) dJuice9 = sInput(8) dJuice10 = sInput(9) dJuice11 = sInput(10) dJuice12 = sInput(11) dJuice13 = sInput(12) dJuice14 = sInput(13) dJuice15 = sInput(14) End Select With oCmd .ActiveConnection = oConn .CommandText = "TP_Payout" .CommandType = adCmdStoredProc 'Add Input Parameters .Parameters.Append .CreateParameter("@TPType", advarchar, adParamInput, 20, 1) .Parameters.Append .CreateParameter("@BetAmount", adCurrency, adParamInput, , Request.Form("txtWagerAmount")) .Parameters.Append .CreateParameter("@NumberBets", adInteger, adParamInput, , (ubound(sInput) + 1)) .Parameters.Append .CreateParameter("@FootballSpread", adInteger, adParamInput, , iFootballModifier) .Parameters.Append .CreateParameter("@BasketballSpread", adInteger, adParamInput, , iBasketballModifier) .Parameters.Append .CreateParameter("@Juice1", adInteger, adParamInput, , dJuice1) .Parameters.Append .CreateParameter("@Juice2", adInteger, adParamInput, , dJuice2) .Parameters.Append .CreateParameter("@Juice3", adInteger, adParamInput, , dJuice3) .Parameters.Append .CreateParameter("@Juice4", adInteger, adParamInput, , dJuice4) .Parameters.Append .CreateParameter("@Juice5", adInteger, adParamInput, , dJuice5) .Parameters.Append .CreateParameter("@Juice6", adInteger, adParamInput, , dJuice6) .Parameters.Append .CreateParameter("@Juice7", adInteger, adParamInput, , dJuice7) .Parameters.Append .CreateParameter("@Juice8", adInteger, adParamInput, , dJuice8) .Parameters.Append .CreateParameter("@Juice9", adInteger, adParamInput, , dJuice9) .Parameters.Append .CreateParameter("@Juice10", adInteger, adParamInput, , dJuice10) .Parameters.Append .CreateParameter("@Juice11", adInteger, adParamInput, , dJuice11) .Parameters.Append .CreateParameter("@Juice12", adInteger, adParamInput, , dJuice12) .Parameters.Append .CreateParameter("@Juice13", adInteger, adParamInput, , dJuice13) .Parameters.Append .CreateParameter("@Juice14", adInteger, adParamInput, , dJuice14) .Parameters.Append .CreateParameter("@Juice15", adInteger, adParamInput, , dJuice15) 'Add Output Parameters .Parameters.Append .CreateParameter("@Payout", adCurrency, adParamOutput, , 0) 'Execute the function 'If not returning a recordset, use the adExecuteNoRecords parameter option .Execute, , adExecuteNoRecords 'response.write "Hi: " & .Parameters("@Payout") sPayout = formatnumber(.Parameters("@Payout"), 2) End With End IF %> <% If bConfirm2 Then %> <% response.write "" %> <% End If %> <% If bPasswordAccepted Then %> <% End If %> <% End If %> <% If bPasswordAccepted Then %>

Confirmation Number: <%= sConfirmationNo %>   

Bet Type: Parle

Bet Amount: <%= Request.Form("txtWagerAmount") %>

Possible Win Amount: <%= Request.Form("Payout") %> US

<% End If %>

<% = sHeading %>

 

Lines effective:<%= Now()%> - (EST)
Please wait........the Game lines will appear below.
Wager Type: <% = sWagerType %>
Selection # <% = cstr(iCount) %> : <% = sTeamName %>   <% = " " & oRS.fields("GameDate").value & " " & oRS.fields("GameTime").value %> <% if bLineChanged Then response.write sLineChangedText %>
<% = oRS.Fields("Team_League").value & " " & oRS.Fields("Type").value %> <% = sBetType %> <% = sLimits %>   for  <% = sLength %> <%= sComments1 %>
  <%= sComments2 %>

Amount:    Risking   $<%= Request.Form("txtWagerAmount")%>   To Win    $<%= sPayout %>  USD

Amount:    Risking   $<%= Request.Form("txtWagerAmount")%>   To Win    $<%= Request.Form("Payout") %>  USD

 
 
 
 

 

<% If bConfirm1 Then %>

Please enter a risk amount for the Teaser, then press continue.

<% End If %> <% If bConfirm2 Then %>

All Wagers are Final!

No Exceptions!

Please Review Wagers Carefully & Renter Password To Confirm Wagers!

 

<% If bWrongPassword then %>

You entered the wrong password! ReEnter it Now!

<% End If %>