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

📄 calendar_week.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 2 页
字号:
vbCrLf & "Software: Web Wiz Forums(TM) ver. " & strVersion & "" & _
vbCrLf & "Info: http://www.webwizforums.com" & _
vbCrLf & "Copyright: (C)2001-2008 Web Wiz(TM). All rights reserved" & _
vbCrLf & "******************************************************* */" & _
vbCrLf & "//-->" & vbCrLf)
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******

'If RSS feed is enabled then have an alt link to it for browers that support RSS Feeds
If blnRSS Then Response.Write(vbCrLf & "<link rel=""alternate"" type=""application/rss+xml"" title=""RSS 2.0"" href=""RSS_calendar_feed.asp" & strQsSID1 & """ />")
%>
<link href="<% = strCSSfile %>default_style.css" rel="stylesheet" type="text/css" />
<!-- #include file="includes/header.asp" -->
<!-- #include file="includes/status_bar_header_inc.asp" -->
<table class="basicTable" cellspacing="0" cellpadding="3" align="center">
 <tr>
  <td align="left"><h1><% = strTxtCalendar & ": " & strMonth & " " & intYear %></h1></td>
 </tr>
</table>
<table cellspacing="5" cellpadding="0" align="center" class="basicTable">
 <tr>
  <td nowrap><!--#include file="includes/calendar_jump_inc.asp" --></td>
 </tr>
</table>
<table cellspacing="2" cellpadding="0" class="basicTable" align="center">
  <tr>
    <td width="25%" height="10"><%

'Display calendar of previous month
If intMonthSmCalendar = 1 Then
	Call displayMonth(12, intYear-1, 1)
Else
	Call displayMonth(intMonthSmCalendar-1, intYear, 1)
End If

%></td>
    <td width="75%" rowspan="3" valign="top">
     <table cellspacing="1" cellpadding="3" class="tableBorder" align="center"><%

'Loop through the days of the week
For intDayLoopCounter = 1 TO 7 


	'If the first day on the month is not on a sunday, the we also need to show the last days of the previous month
	If intFistDayOfMonth > 1 AND intDayLoopCounter = 1 AND intWeek = 1 Then
		
		'Go back to last month (if not January (month=1))
		If intMonth = 1 Then
			intMonth = 12
			intYear = intYear - 1
		'Else just go to the next month
		Else 
			intMonth = intMonth - 1
		End If

		'Calculate the day on the previous month to show from
		intDay = getMonthDayNo(intMonth, intYear) - (intFistDayOfMonth - 2)
	End If


	'If we have reached the end of the month, jump to next month
	If intDay > getMonthDayNo(intMonth, intYear) Then
		
		'See if we need to jump to next year
		If intMonth = 12 Then
			intMonth = 1
			intYear = intYear + 1
		'Else just go to the next month
		Else 
			intMonth = intMonth + 1
		End If
		
		'Reset day
		intDay = 1
	End If
	
	
	'If this is the first day in the month display a ledger
	If intDay = 1 OR intDayLoopCounter = 1 Then
		'Display the ledger with the month
		Response.Write(vbCrLf & "      <tr class=""tableLedger"">" & _
		vbCrLf & "      <td colspan=""2""><a href=""calendar.asp?M=" & intMonth & "&Y=" & intYear & strQsSID2 & """>" & getMonthName(intMonth) & " " & intYear & "</a></td>" & _
		vbCrLf & "       </tr>")
	End If
	
	
	'Write the day
	Response.Write(vbCrLf & "      <tr class=""calLedger"">" & _
	vbCrLf & "       <td colspan=""2"">")
	Select Case intDayLoopCounter
		Case 1
			Response.Write(strTxtSunday)
		Case 2
			Response.Write(strTxtMonday)
		Case 3
			Response.Write(strTxtTuesday)
		Case 4
			Response.Write(strTxtWednesday)
		Case 5
			Response.Write(strTxtThursday)
		Case 6
			Response.Write(strTxtFriday)
		Case 7
			Response.Write(strTxtSaturday)
	End Select	
	Response.Write("</td>" & _
	vbCrLf & "      </tr>")	
	
	'Write the date and event details
	Response.Write(vbCrLf & "      <tr height=""41"" class=""calDateCell"">" & _
	vbCrLf & "       <td width=""41"" ")
	
	'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""")
	End If
	
	Response.Write(" align=""center"" style=""font-size:17px"">" & intDay & "</td>" & _
	vbCrLf & "       <td valign=""top"">")
	
	
	'See if we have any birthdays to display
	If isArray(saryBirthdays) AND intDay => 1 Then
		
		'Initlise the loop array
		intDbArrayLoop = 0
		intAge = 0
		
		'Loop through the birthdays array
		Do While intDbArrayLoop <= Ubound(saryBirthdays,2)
		
			'If an 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 
					Response.Write("<img src=""" & strImagePath & "calendar_birthday." & strForumImageType & """ alt=""" & strTxtBirthdays & """ title=""" & strTxtBirthdays & """ /> ")
				Else
					Response.Write(", ")
				End If
				
				'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)
				
				'Write the HTML for the birthday
				Response.Write("<em><a href=""member_profile.asp?PF=" & saryBirthdays(0,intDbArrayLoop) & strQsSID2 &  """ rel=""nofollow"">" & saryBirthdays(1,intDbArrayLoop) & "</a> (" & intAge & ")</em>")
			End If
		
			'Move to next array position
			intDbArrayLoop = intDbArrayLoop + 1
		Loop
	End If
	
	
	'See if we have an event to display
	If isArray(sarryEvents) AND intDay => 1 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)
				
				'Clean up input to prevent XXS hack
				strMessage = formatInput(strMessage)
				strSubject = formatInput(strSubject)
				
				'Place in a <br /> if birthdays are displayed
				If intAge > 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("</td>" & _
	vbCrLf & "      </tr>")	
	
	
	'Increment the day by 1	
	intDay = intDay + 1
Next

%>

    </table>
   </td>
  </tr>
  <tr>
    <td height="10"><%

'Display calendar for this month
Call displayMonth(intMonthSmCalendar, intYear, 1)

%></td>
  </tr>
  <tr>
    <td valign="top"><%

'Display calendar of next month
If intMonthSmCalendar = 12 Then
	Call displayMonth(1, intYear + 1, 1)
Else
	Call displayMonth(intMonthSmCalendar + 1, intYear, 1)
End If

%></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 + -