Advertisement
Advertisement
| 07.24.2008 at 08:53AM PDT, ID: 23592565 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: |
Set objRecordset = Server.CreateObject("ADODB.Recordset")
objRecordset.Open "EventsTbl", strConn, adOpenStatic, adLockPessimistic, adCmdTable
Dim dDate ' Date we're displaying calendar for
Dim iDIM ' Days In Month
Dim iDOW ' Day Of Week that month starts on
Dim iCurrent ' Variable we use to hold current day of month as we write table
Dim iPosition ' Variable we use to hold current position in table
If IsDate(Request.QueryString("date")) Then
dDate = CDate(Request.QueryString("date"))
Else
If IsDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year")) Then
dDate = CDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year"))
Else
dDate = Date()
If Request.QueryString.Count <> 0 Then
Response.Write "The date you picked was not a valid date. The calendar was set to today's date.<BR><BR>"
End If
End If
End If
iDIM = GetDaysInMonth(Month(dDate), Year(dDate))
iDOW = GetWeekdayMonthStartsOn(Month(dDate), Year(dDate))
Response.Write "<div id='EventsCalContainer'>"
Response.Write "<table id='Events' width='285px' height='230px' cellspacing='2' cellpadding='0'>"
Response.Write "<tr>"
Response.Write "<td bgcolor='#f1f1f1' align='center' colspan='7'>"
Response.Write "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
Response.Write "<tr>"
Response.Write "<td align='right'><b><A HREF='index.asp?date=" & SubtractOneMonth(dDate) & "' style='color: #FFFFFF'><--</A></b></TD>"
Response.Write "<td id='CalCurrDate'>" & MonthName(Month(dDate)) & " " & Year(dDate) & "</td>"
Response.Write "<td align='left'><b><A HREF='index.asp?date=" & AddOneMonth(dDate) & "' style='color: #FFFFFF'>--></A></b></TD>"
Response.Write "<td align='right' valign='top'> </td>"
Response.Write "</tr>"
Response.Write "</TABLE>"
Response.Write "</td>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td class='CalDayofMonth'>Sun</td>"
Response.Write "<td class='CalDayofMonth'>Mon</td>"
Response.Write "<td class='CalDayofMonth'>Tue</td>"
Response.Write "<td class='CalDayofMonth'>Wed</td>"
Response.Write "<td class='CalDayofMonth'>Thu</td>"
Response.Write "<td class='CalDayofMonth'>Fri</td>"
Response.Write "<td class='CalDayofMonth'>Sat</td>"
Response.Write "</tr>"
If iDOW <> 1 Then
Response.Write(vbTab & "<tr>" & vbCrLf)
iPosition = 1
Do While iPosition < iDOW
Response.Write(vbTab & vbTab & "<td> </td>" & vbCrLf)
iPosition = iPosition + 1
Loop
End If
'-- Write days of month in proper day slots --
iCurrent = 1
iPosition = iDOW
Do While iCurrent <= iDIM
'-- open the table row --
If iPosition = 1 Then
Response.Write(vbTab & "<tr>" & vbCrLf)
End If
Response.Write(vbTab & vbTab & "<td align=left valign=top height=30>" & iCurrent)
If Not objRecordset.BOF Then
objRecordset.MoveFirst
Do Until objRecordset.EOF
If objRecordset.Fields("Year") = Year(dDate) Then
If objRecordset.Fields("Month") = Month(dDate) Then
If objRecordset.Fields("Day") = iCurrent Then
Response.Write("<div class='ActiveEvent'><b><a href=" & Chr(34) & "display_event.asp?ID=" & objRecordset.Fields("ID") & Chr(34) & ">" & objRecordset.Fields("Title") & "</a></b></div>")
'Else
'Response.Write(iCurrent)
End If
End If
End If
objRecordset.MoveNext
Loop
Else
End If
'-- Close the table row --
If iPosition = 7 Then
Response.Write vbTab & "</tr>" & vbCrLf
iPosition = 0
End If
'-- Increment variables --
iCurrent = iCurrent + 1
iPosition = iPosition + 1
Loop
If iPosition <> 1 Then
Do While iPosition <= 7
Response.Write(vbTab & vbTab & "<td> </td>" & vbCrLf)
iPosition = iPosition + 1
Loop
Response.Write vbTab & "</tr>" & vbCrLf
End If
Response.Write "</table>"
Response.Write "</div>"
|