*** ASP – TABLE CURSOR – SEQUENTIALLY WRITTEN WHILE RECORDSET VALUE IS NOT EMPTY
<%
Dim bTableOpen : bTableOpen = False
Dim sLastID : sLastID = “”
DisplayPicks.MoveFirst
Do Until DisplayPicks.EOF
If DisplayPicks (“UserID”) <> sLastID Then
If bTableOpen Then %>
</TABLE>
<% bTableOpen = False
End If %>
<!– TABLE –>
<H3><font color=”#3a297d”><%= DisplayPicks.Fields.Item(“FirstName”).Value %>’su0026amp;nbsp;Pick’s </font></H3>
<% bTableOpen = True
sLastID = DisplayPicks (“UserID”)
End If
‘ sLastID = DisplayPicks (“UserID”)
‘write your row of data here using your recordset
%>
<%
‘ While ((Repeat1__numRows <> 0) AND (NOT DisplayPicks.EOF))
%>
<%
DisplayPicks.MoveNext
Loop
%>
*** ASP – DISPLAYS GRAPHIC TYPE BASED ON RECORDSET VALUE
<%
IF DisplayPicks.Fields.Item(“Pick_Sport”).value = “NFL” THEN
Response.Write “<img name=’NFL’ border=’0′ src=’/images/footballicon.jpg’>”
ELSE
IF DisplayPicks.Fields.Item(“Pick_Sport”).value = “CFB” THEN
Response.Write “<img name=’NFL’ border=’0′ src=’/images/footballicon.jpg’>”
ELSE
IF DisplayPicks.Fields.Item(“Pick_Sport”).value = “NBA” THEN
Response.Write “<img name=’NFL’ border=’0′ src=’/images/basketballicon.jpg’>”
ELSE
IF DisplayPicks.Fields.Item(“Pick_Sport”).value = “CBB” THEN
Response.Write “<img name=’NFL’ border=’0′ src=’/images/basketballicon.jpg’>”
ELSE
IF DisplayPicks.Fields.Item(“Pick_Sport”).value = “MLB” THEN
Response.Write “<img name=’NFL’ border=’0′ src=’/images/baseballicon.jpg’>”
END IF
END IF
END IF
END IF
End IF
%>
*** ASP/VBSCRIPT FUNCTION – WRITES SEQUENTIAL DATE INTO SELECT FORM
<%
Function AddWorkingDays(nDaystoAdd)
‘Adds working days based on a five day week
Dim dtEndDate, dtStartDate
Dim iLoop
dtStartDate = FormatDateTime((Now-0),vbShortDate)
‘First add whole weeks
dtEndDate=FormatDateTime((Now-7),vbShortDate)
dtEndDate=DateAdd(“ww”,Int(nDaysToAdd/5),dtStartDate)
‘Add any odd days
For iLoop = 1 To (nDaysToAdd Mod 5)
dtEndDate=DateAdd(“d”,1,dtEndDate)
‘ removed weekend code from here
Next
AddWorkingDays = FormatDateTime(dtEndDate,vbShortDate)
End Function
%>
<%
‘ removed option selected code from here
For X = 0 To 6
strDate = addWorkingDays(X)
Response.Write “<OPTION value=” u0026amp; strDate u0026amp; “>” u0026amp; strDate u0026amp; “</option>”
Next
%>