⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calendar.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 2 页
字号:
    		If intJumpLoop = intMonth Then Response.Write(" selected")
    		Response.Write(">" & getMonthName(intJumpLoop) & "</option>")
    		
    	Next
    
     
%>
   </select>
   &nbsp;<a href="calendar.asp?<% 
   
   	'Calculate if we need to chnage years
   	If intMonth = 12 Then 
   		Response.Write("M=1&Y=" & intYear+1) 
   	Else 
   		Response.Write("M=" & intMonth+1 & "&Y=" & intYear) 
   	End If
   	
   	%><% = strQsSID2 %>"><% = strTxtNext %> &gt;&gt;</a></td>
 </tr>
</table>
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
 <tr class="tableLedger">
  <td width="100%" colspan="8" align="left"><% = strMonth & " " & intYear %></td>
 </tr><%
 

'Loop through to display the weeks of the month (we use 6 as this is the most required to cover an entire month)
For intWeekLoop = 1 TO 6

%>
 <tr valign="top">
  <td align="center" height="80" width="2%" class="calLedger" valign="middle"><a href="calendar_week.asp?M=<% = intMonth %>&Y=<% = intYear %>&W=<% = intWeekLoop %><% = strQsSID2 %>" title="<% = strTxtViewWeekInDetail %>">&gt;<br />&gt;<br />&gt;<br />&gt;</a></td><%
   	
   	'Display ledger info
   	
   	'Loop through the 7 days of the week
   	For intDayLoopCounter = 1 TO 7 
   	
   		'Increment the day by 1
   		If intDay > 0 Then intDay = intDay + 1
   			
   		'See if this is the first day of the month
		If intFistDayOfMonth = intDayLoopCounter AND intDay = 0 Then intDay = 1

		'Write the table cell
		Response.Write(vbCrLf & "  <td width=""14%""")
		
		'Calculate the class for the table cell
		If intDay => 1 AND intDay <= intMaxNoMonthDays Then
			
			'If today place a red border around the day
			If intMonth = Month(dtmNow) AND intDay = Day(dtmNow) AND intYear = Year(dtmNow) Then 
				Response.Write(" class=""calTodayCell""")
			Else
				Response.Write(" class=""calDateCell""")
			End If
		
		'Else the day is not a date in this month
		Else
			Response.Write(" class=""calEmptyDateCell""")
		End If
		
		
		Response.Write(" style=""padding:0px"">")
		Response.Write("<div class=""calLedger"">")
		
			
		'If this is a day in the month display day number
		If intDay => 1 AND intDay <= intMaxNoMonthDays Then Response.Write("<span style=""float:right"">" & intDay & "</span>")
		
		'Display the day
		Select Case intDayLoopCounter
			Case 1
				Response.Write(strTxtSun)
			Case 2
				Response.Write(strTxtMon)
			Case 3
				Response.Write(strTxtTue)
			Case 4
				Response.Write(strTxtWed)
			Case 5
				Response.Write(strTxtThu)
			Case 6
				Response.Write(strTxtFri)
			Case 7
				Response.Write(strTxtSat)
		End Select
		
		Response.Write("</div>")
		
		Response.Write("<div style=""padding:4px"">")
		
		
		
		'See if we have an event to display
		If isArray(saryBirthdays) AND intDay => 1 AND intDay <= intMaxNoMonthDays Then
			
			'Initlise the loop array
			intDbArrayLoop = 0
			intNoOfBirthdays = 0
			intAge = 0
			strMemBirthdays = ""
			
			'Loop through the events array
			Do While intDbArrayLoop <= Ubound(saryBirthdays,2)
			
				'If bitrhday is found for this date display it
				If intMonth = Month(saryBirthdays(2,intDbArrayLoop)) AND intDay = Day(saryBirthdays(2,intDbArrayLoop)) Then 
					
					'If we have been around once before then place a comma between the entries
					If intAge <> 0 Then strMemBirthdays = strMemBirthdays & ", "
					
					'Calculate the age (use months / 12 as counting years is not accurate) (use FIX to get the whole number)
					intAge = Fix(DateDiff("m", saryBirthdays(2,intDbArrayLoop), intYear & "-" & intMonth & "-" & intDay)/12)
					
					'Place the bitrhdays into a string to show as as title for the link
					strMemBirthdays = strMemBirthdays & saryBirthdays(1,intDbArrayLoop) & "(" & intAge & ")"
					
					'Initilise variables for the first birthday, it only 1 birthday found we display this data
					strUserName = saryBirthdays(1,intDbArrayLoop)
					lngUserProfile = saryBirthdays(0,intDbArrayLoop)
					
					'Increment the number of birthdays
					intNoOfBirthdays = intNoOfBirthdays + 1
				End If
			
				'Move to next array position
				intDbArrayLoop = intDbArrayLoop + 1
			Loop
			
			'Write the HTML for the date
			'If 1 birthday display the user birthday
			If intNoOfBirthdays = 1 Then
				Response.Write("<em><img src=""" & strImagePath & "calendar_birthday." & strForumImageType & """ alt=""" & strTxtBirthdays & """ title=""" & strTxtBirthdays & """ /> <a href=""member_profile.asp?PF=" & lngUserProfile & strQsSID2 & """ rel=""nofollow"">" & strUserName & "</a> (" & intAge & ")</em>")
			'If more than 1 birhday display the number
			ElseIf intNoOfBirthdays > 1 Then
				Response.Write("<em><img src=""" & strImagePath & "calendar_birthday." & strForumImageType & """ alt=""" & strTxtBirthdays & """ title=""" & strTxtBirthdays & """ /> <a href=""calendar_week.asp?M=" & intMonth & "&Y=" & intYear & "&W=" & intWeekLoop & strQsSID2 & """ title=""" & strMemBirthdays & """>" & intNoOfBirthdays & " " & strTxtBirthdays & "</a></em>")
			End If
		End If
		
		
		
		
		'See if we have an event to display
		If isArray(sarryEvents) AND intDay => 1 AND intDay <= intMaxNoMonthDays Then
			
			'Initlise the loop array
			intDbArrayLoop = 0
			
			'Loop through the events array
			Do While intDbArrayLoop <= Ubound(sarryEvents,2)
			
				'If there isn't an end date set, set the end date as the event start date to prevent errors
				If isDate(sarryEvents(3,intDbArrayLoop)) = False Then sarryEvents(3,intDbArrayLoop) = sarryEvents(2,intDbArrayLoop)
			
				'If an event is found for this date display it
				If CDate(intYear & "-" & intMonth & "-" & intDay) >= CDate(sarryEvents(2,intDbArrayLoop)) AND CDate(intYear & "-" & intMonth & "-" & intDay) <= CDate(sarryEvents(3,intDbArrayLoop)) Then
					
					'Read the event details
					strSubject = sarryEvents(1,intDbArrayLoop)
					strMessage = sarryEvents(4,intDbArrayLoop)
					
					'Remove HTML from message for subject link title
					strMessage = removeHTML(strMessage, 100, true)
					
					'Trim the subject
					strSubject = TrimString(strSubject, 25)
			
					'Clean up input to prevent XXS hack
					strMessage = formatInput(strMessage)
					strSubject = formatInput(strSubject)
					
					'Place in a <br /> if birthdays are displayed
					If intNoOfBirthdays > 0 Then Response.Write("<br />")
					
					'Write the HTML for the event
					Response.Write("<img src=""" & strImagePath & "calendar_event." & strForumImageType & """ alt=""" & strTxtEvent & """ title=""" & strTxtEvent & """ /> <a href=""forum_posts.asp?TID=" & sarryEvents(0,intDbArrayLoop) & strQsSID2 & """ title=""" & strMessage & """>" & strSubject & "</a><br />")
				End If
			
				'Move to next array position
				intDbArrayLoop = intDbArrayLoop + 1
			Loop
		End If
		
		Response.Write("</div>")
	Next
   
%></td>
 </tr><%
 
	'If we have run out of weeks in this month exit loop
	If intMaxNoMonthDays =< intDay Then Exit For
Next

%>
</table>
<table class="basicTable" cellspacing="0" cellpadding="3" align="center">
 <tr>
   <td align="right" nowrap><a href="calendar.asp?<% 
   
   	'Calculate if we need to chnage years
   	If intMonth = 1 Then 
		Response.Write("M=12&Y=" & intYear-1) 
	Else 
		Response.Write("M=" & intMonth-1 & "&Y=" & intYear) 
	End If
	
	%><% = strQsSID2 %>">&lt;&lt; <% = strTxtPrevious %></a>&nbsp;
    <select onchange="linkURL(this)" name="calSelect" id="calSelect"><%
    
    	'Setup list options
    	For intJumpLoop = 1 TO 12
    	
    		Response.Write(vbCrLf & "     <option value=""calendar.asp?M=" & intJumpLoop & "&Y=" & intYear & strQsSID2&"""")
    		If intJumpLoop = intMonth Then Response.Write(" selected")
    		Response.Write(">" & getMonthName(intJumpLoop) & "</option>")
    		
    	Next
    
     
%>
    </select>
   &nbsp;<a href="calendar.asp?<% 
   
   	'Calculate if we need to chnage years
   	If intMonth = 12 Then 
   		Response.Write("M=1&Y=" & intYear+1) 
   	Else 
   		Response.Write("M=" & intMonth+1 & "&Y=" & intYear) 
   	End If
   	
   	%><% = strQsSID2 %>"><% = strTxtNext %> &gt;&gt;</a></td>
  </tr>
</table>
<table cellspacing="3" cellpadding="0" align="center" class="basicTable">
 <tr valign="top">
  <td width="25%"><%

'Call the sub procedure to write the calendar
If intMonth = 1 Then
	Call displayMonth(12, intYear-1, 1)
Else
	Call displayMonth(intMonth-1, intYear, 1)
End If

%>
  </td>
  <td width="25%"><%

'Call the sub procedure to write the calendar
If intMonth = 12 Then
	Call displayMonth(1, intYear+1, 1)
Else
	Call displayMonth(intMonth+1, intYear, 1)
End If

%>
  </td>
  <td width="50%">&nbsp;</td>
 </tr>
</table>
<br />
<div align="center"><%

'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
If blnLCode = True Then
	
	If blnTextLinks = True Then
		Response.Write("<span class=""text"" style=""font-size:10px"">Bulletin Board Software by <a href=""http://www.webwizforums.com"" target=""_blank"" style=""font-size:10px"">Web Wiz Forums&reg;</a> version " & strVersion & "</span>")
	Else
  		Response.Write("<a href=""http://www.webwizforums.com"" target=""_blank""><img src=""webwizforums_image.asp"" border=""0"" title=""Bulletin Board Software by Web Wiz Forums&reg; version " & strVersion& """ alt=""Bulletin Board Software by Web Wiz Forums&reg; version " & strVersion& """ /></a>")
	End If

	Response.Write("<br /><span class=""text"" style=""font-size:10px"">Copyright &copy;2001-2008 <a href=""http://www.webwizguide.com"" target=""_blank"" style=""font-size:10px"">Web Wiz</a></span>")
End If
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******

'Display the process time
If blnShowProcessTime Then Response.Write "<span class=""smText""><br /><br />" & strTxtThisPageWasGeneratedIn & " " & FormatNumber(Timer() - dblStartTime, 3) & " " & strTxtSeconds & "</span>"
%>
</div>
<!-- #include file="includes/footer.asp" -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -