 |
<%
Select Case Request("return").Item
Case "account_update":
Response.Write "Your account details have been successfully changed | "
Case "password":
Response.Write "Your password has been successfully changed | "
Case "played":
Response.Write "Your game sheet has been submitted. Watch the "Results" page as the week progresses | "
Case Else
Response.Write " | "
End Select
%>
| Season Tickets |
|
| Number owned |
|
| Weeks remaining |
|
| |
|
| Weekly Credits |
|
| Total Weekly Credits Bought |
|
| Total weekly sheets submitted so far: |
|
| Remaining Weekly Credits |
|
 |
|
 |
|
<%
Set rs = Server.CreateObject ("ADODB.Recordset")
sSQL = "SELECT * FROM MemberPurchase "
sSQL = sSQL & " WHERE parent_id = " & gsMemberId
sSQL = sSQL & " AND game_type = 'SEASONAL'"
sSQL = sSQL & " AND game_purchased = 'Football Crazy'"
sSQL = sSQL & " AND purchase_status = 'Success'"
rs.Open sSQL, con, 3, 3
' Get a recordset of games played this week
bNoRecords = True
If Not rs.EOF Then
sSQL = "SELECT * FROM Gamesheet WHERE week_id = " & giWeekId
sSQL = sSQL & " AND (is_deleted IS NULL OR is_deleted = '')"
Set rsPlayed = Server.CreateObject ("ADODB.Recordset")
rsPlayed.Open sSQL, con, 3, 3
If Not rsPlayed.EOF Then bNoRecords = False
End If
%>
|
A seasonal game in every division: Premiership, Championshp, League 1, League 2 |
<% End If %> |
<%
While Not rs.EOF
If Not bNoRecords Then
rsPlayed.MoveFirst
rsPlayed.Find "member_purchase_id = " & rs("id").Value
If rsPlayed.EOF Then
sImage = "images/buttons/play.gif"
Else
sImage = "images/buttons/completed.gif"
End If
Else
sImage = "images/buttons/play.gif"
End If
%>
| |
Game name: <%= rs("game_name").Value %> |
|
<%
rs.MoveNext
Wend
If rs.RecordCount <> 0 Then
%>
| |
|
|
<%
End If
rs.Close
%>
| |
|
 |
|
<%
Set rs = Server.CreateObject ("ADODB.Recordset")
sSQL = "SELECT * FROM MemberPurchase "
sSQL = sSQL & " WHERE parent_id = " & gsMemberId
sSQL = sSQL & " AND game_type = 'WEEKLY'"
sSQL = sSQL & " AND game_purchased = 'Season Ticket'"
sSQL = sSQL & " AND purchase_status = 'Success'"
rs.Open sSQL, con, 3, 3
' Get a recordset of games played this week
'If Not rs.EOF Then
' sSQL = "SELECT * FROM Gamesheet WHERE week_id = " & giWeekId
' sSQL = sSQL & " AND (is_deleted IS NULL OR is_deleted = '')"
' Set rsPlayed = Server.CreateObject ("ADODB.Recordset")
' rsPlayed.Open sSQL, con, 3, 3
' bPlayed = True
' If rsPlayed.EOF Then bPlayed = False
'End If
%>
|
Play the weekly game every week of the season. |
|
<%
'While Not rs.EOF
' If bPlayed Then
' rsPlayed.MoveFirst
' rsPlayed.Find "member_purchase_id = " & rs("id").Value
' End If
' If rsPlayed.EOF Then
' sImage = "images/buttons/play.gif"
' Else
' sImage = "images/buttons/completed.gif"
' End If
%>
<%
' rs.MoveNext
'Wend
'If rs.RecordCount <> 0 Then
%>
<%
'End If
'rs.Close
%>
| |
|
 |
|
<%
Set rs = Server.CreateObject ("ADODB.Recordset")
sSQL = "SELECT * FROM MemberPurchase "
sSQL = sSQL & " WHERE parent_id = " & gsMemberId
sSQL = sSQL & " AND game_type = 'WEEKLY'"
'sSQL = sSQL & " AND game_purchased = 'Weekly Game'"
sSQL = sSQL & " AND purchase_status = 'Success'"
rs.Open sSQL, con, 3, 3
' Get a recordset of games played this week
If Not rs.EOF Then
sSQL = "SELECT * FROM Gamesheet WHERE week_id = " & giWeekId
sSQL = sSQL & " AND (is_deleted IS NULL OR is_deleted = '')"
Set rsPlayed = Server.CreateObject ("ADODB.Recordset")
rsPlayed.Open sSQL, con, 3, 3
bPlayed = True
If rsPlayed.EOF Then bPlayed = False
End If
%>
|
Predict every result in the Premiership for one week, with prizes at the end of the week. |
|
<%
While Not rs.EOF
If bPlayed Then
rsPlayed.MoveFirst
rsPlayed.Find "member_purchase_id = " & rs("id").Value
End If
If rsPlayed.EOF Then
sImage = "images/buttons/play.gif"
Else
sImage = "images/buttons/completed.gif"
End If
%>
| |
Game name: |
|
<%
rs.MoveNext
Wend
If rs.RecordCount <> 0 Then
%>
| |
|
|
<%
End If
rs.Close
%>
| |
|
|
|
|
<%
Set rs = Server.CreateObject ("ADODB.Recordset")
sSQL = "SELECT * FROM MemberPurchase, League "
sSQL = sSQL & " WHERE parent_id = " & gsMemberId
sSQL = sSQL & " AND game_type = 'SEASONAL'"
'sSQL = sSQL & " AND game_purchased = 'Seasonal Game'"
sSQL = sSQL & " AND purchase_status = 'Success'"
sSQL = sSQL & " AND league.league_id = memberpurchase.league_id"
rs.Open sSQL, con, 3, 3
' Get a recordset of games played this week
If Not rs.EOF Then
sSQL = "SELECT * FROM Gamesheet WHERE week_id = " & giWeekId
sSQL = sSQL & " AND (is_deleted IS NULL OR is_deleted = '')"
Set rsPlayed = Server.CreateObject ("ADODB.Recordset")
rsPlayed.Open sSQL, con, 3, 3
bPlayed = True
If rsPlayed.EOF Then bPlayed = False
End If
%>
|
Predict results in your chosen division every week of the season, with prizes each month and at the end of the season. |
|
<%
While Not rs.EOF
If bPlayed Then
rsPlayed.MoveFirst
rsPlayed.Find "member_purchase_id = " & rs("id").Value
End If
If rsPlayed.EOF Then
sImage = "images/buttons/play.gif"
Else
sImage = "images/buttons/completed.gif"
End If
%>
| |
Game name: |
League: |
|
<%
rs.MoveNext
Wend
If rs.RecordCount <> 0 Then
%>
| |
|
|
<%
End If
rs.Close
%>
| |
|
|
|
|
|
Seasonal Game -
Pos. |
Name |
|
<%
iRow = 1
For j = 1 To 10
%>
|
|
|
<%
If Not rs.EOF Then rs.MoveNext
If rs.EOF Then Exit For
iRow = iRow + 1
Next
%>
|
|
|
<%
' Show their own teams at the foot
While Not rs.EOF
If rs("member_id").Value = gsMemberId Then
%>
<%= iRow %>. |
<%= rs("game_name").Value %> |
<%= rs("total_points").Value %> |
<%
End If
rs.MoveNext
iRow = iRow + 1
Wend
rs.Close
%>
<%
End If
End If
Next
%>
|
Pos. |
Name |
|
<%
' Get a recordset of results for the chosen week
Set rs = Server.CreateObject ("ADODB.Recordset")
sSQL = "SELECT * FROM (SELECT id, member_id, game_name, team_supported, league_name, SUM(IIf(IsNull(total_points_awarded), 0, total_points_awarded)) as total_points "
sSQL = sSQL & " FROM qryLeaderboardWeekly "
sSQL = sSQL & " WHERE week_id = " & iWeekId
sSQL = sSQL & " GROUP BY id, member_id, game_name, team_supported, league_name) fred "
sSQL = sSQL & " ORDER BY total_points DESC"
rs.Open sSQL, con
If Not rs.EOF Then
iRow = 1
bFound = False
For i = 1 To 10
%>
|
|
|
<%
If rs("member_id").Value = gsMemberId Then bFound = True
rs.MoveNext
If rs.EOF Then Exit For
iRow = iRow + 1
Next
%>
|
|
|
<%
' Now show the first (i.e. highest placed) weekly result for the current member
While Not rs.EOF and Not bFound
If rs("member_id").Value = gsMemberId Then
bFound = True
%>
. |
|
|
<%
End If
iRow = iRow + 1
rs.MoveNext
Wend
End If
rs.Close
%>
|
|