<%@ Language=VBScript %> <% Response.Expires=-1 'Response.write Session("ValidUser") If Session("ValidUser") <> 1 then Response.Redirect "login.asp" Else Session("LastPage") = Session("CurrentPage") Session("CurrentPage") = "ClientDataDisplay.asp" End if '///////////////////////////////////////////////////////////////////////////////////// '/ '/ Functions '/ '///////////////////////////////////////////////////////////////////////////////////// Function GetDailyData() strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn sSql = "Select * from vwBetsWebView where upper(userid) = '" & ucase(Session("Usercode")) & "' " Set RS = Server.CreateObject("ADODB.Recordset") RS.CursorType = 3 RS.CursorLocation = 3 RS.ActiveConnection = oConn RS.Open sSql Set GetDailyData = RS End Function '///////////////////////////////////////////////////////////////////////////////////// '/ '/ Main Section '/ '///////////////////////////////////////////////////////////////////////////////////// Dim oRS Dim iResult Dim strConn Dim oConn Dim sSQL Dim iColor iColor=0 strConn = ";DRIVER={SQL Server};UID=BetUser;PWD=12NewYorkcitY2006;DATABASE=Betrci;SERVER=localhost;" Set oConn = server.CreateObject("adodb.connection") oConn.Open strConn %> Sure Bet <% Select case ucase(Request.QueryString("Type")) case "DAILY" sHeading = "Daily Figures for Client: " & Session("Usercode") Set oRS = GetDailyData Response.write "Recordcount is: " & oRS.recordcount & "
" case "PENDING" sHeading = "Pending Wagers for Client: " & Session("Usercode") Set oRS = GetDailyData Response.write "Recordcount is: " & oRS.recordcount & "
" case "ACTIVITY" sHeading = "Activity for Client: " & Session("Usercode") Set oRS = GetDailyData Response.write "Recordcount is: " & oRS.recordcount & "
" End Select Response.write("Page Type: " & "" & Request.QueryString("Type")) & "

" %> <% If Session("ValidUser") <> 1 then Response.write "" Else Response.write "" End if %>
 
 

<%= sHeading %>

 

<% Do While Not oRS.EOF %> <% oRS.Movenext Loop %>
Date / Time
Confirmation #
Bet Type
Wager
To Win
Result
  <%= oRS.Fields("Timestamp").value %>
 <%= oRS.Fields("BetType").value %>
 <%= FormatCurrency(oRS.Fields("BetAmount").value, 2) %>
<%= FormatCurrency(oRS.Fields("PayAmount").value, 2) %>
 <%= oRS.Fields("BetResult").value %>